blob: 969e1d51c6efe6e6d52fb32a63e3561bf65b4b84 [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 \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011150 initgroups kill killpg lchmod lchown 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
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012584# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12585# macro is not defined in android-ndk-r13.
12586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12587$as_echo_n "checking for lockf... " >&6; }
12588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12589/* end confdefs.h. */
12590#include <unistd.h>
12591int
12592main ()
12593{
12594lockf(0, F_LOCK, 0);
12595 ;
12596 return 0;
12597}
12598_ACEOF
12599if ac_fn_c_try_link "$LINENO"; then :
12600
12601$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12602
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12604$as_echo "yes" >&6; }
12605else
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12607$as_echo "no" >&6; }
12608
12609fi
12610rm -f core conftest.err conftest.$ac_objext \
12611 conftest$ac_exeext conftest.$ac_ext
12612
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012613# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012614# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12616$as_echo_n "checking for getaddrinfo... " >&6; }
12617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012619
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012620#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012621#include <sys/socket.h>
12622#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012623#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012624
Martin v. Löwis11437992002-04-12 09:54:03 +000012625int
12626main ()
12627{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012628getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ;
12630 return 0;
12631}
12632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012634 have_getaddrinfo=yes
12635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638rm -f core conftest.err conftest.$ac_objext \
12639 conftest$ac_exeext conftest.$ac_ext
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12641$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012642if test $have_getaddrinfo = yes
12643then
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12645$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012646 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012648else
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012650
12651if test "${enable_ipv6+set}" = set; then
12652 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12653else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012654 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012655fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012656else
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659
Stefan Krah19c21392012-11-22 23:47:32 +010012660#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012661#include <sys/types.h>
12662#include <netdb.h>
12663#include <string.h>
12664#include <sys/socket.h>
12665#include <netinet/in.h>
12666
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012667int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012668{
12669 int passive, gaierr, inet4 = 0, inet6 = 0;
12670 struct addrinfo hints, *ai, *aitop;
12671 char straddr[INET6_ADDRSTRLEN], strport[16];
12672
12673 for (passive = 0; passive <= 1; passive++) {
12674 memset(&hints, 0, sizeof(hints));
12675 hints.ai_family = AF_UNSPEC;
12676 hints.ai_flags = passive ? AI_PASSIVE : 0;
12677 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012678 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012679 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12680 (void)gai_strerror(gaierr);
12681 goto bad;
12682 }
12683 for (ai = aitop; ai; ai = ai->ai_next) {
12684 if (ai->ai_addr == NULL ||
12685 ai->ai_addrlen == 0 ||
12686 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12687 straddr, sizeof(straddr), strport, sizeof(strport),
12688 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12689 goto bad;
12690 }
12691 switch (ai->ai_family) {
12692 case AF_INET:
12693 if (strcmp(strport, "54321") != 0) {
12694 goto bad;
12695 }
12696 if (passive) {
12697 if (strcmp(straddr, "0.0.0.0") != 0) {
12698 goto bad;
12699 }
12700 } else {
12701 if (strcmp(straddr, "127.0.0.1") != 0) {
12702 goto bad;
12703 }
12704 }
12705 inet4++;
12706 break;
12707 case AF_INET6:
12708 if (strcmp(strport, "54321") != 0) {
12709 goto bad;
12710 }
12711 if (passive) {
12712 if (strcmp(straddr, "::") != 0) {
12713 goto bad;
12714 }
12715 } else {
12716 if (strcmp(straddr, "::1") != 0) {
12717 goto bad;
12718 }
12719 }
12720 inet6++;
12721 break;
12722 case AF_UNSPEC:
12723 goto bad;
12724 break;
12725 default:
12726 /* another family support? */
12727 break;
12728 }
12729 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012730 freeaddrinfo(aitop);
12731 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012732 }
12733
12734 if (!(inet4 == 0 || inet4 == 2))
12735 goto bad;
12736 if (!(inet6 == 0 || inet6 == 2))
12737 goto bad;
12738
12739 if (aitop)
12740 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012741 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742
12743 bad:
12744 if (aitop)
12745 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012746 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012747}
12748
Martin v. Löwis11437992002-04-12 09:54:03 +000012749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012751 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012759fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012762
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12764$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12765
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012766if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012767then
12768 if test $ipv6 = yes
12769 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012770 echo 'Fatal: You must get working getaddrinfo() function.'
12771 echo ' or you can specify "--disable-ipv6"'.
12772 exit 1
12773 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012774else
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012777
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012779
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012780for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012781do :
12782 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012783if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012786_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012787
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788fi
12789done
12790
Michael W. Hudson54241132001-12-07 15:38:26 +000012791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012792# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12794$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012795if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797else
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800#include <sys/types.h>
12801#include <sys/time.h>
12802#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Martin v. Löwis11437992002-04-12 09:54:03 +000012804int
12805main ()
12806{
12807if ((struct tm *) 0)
12808return 0;
12809 ;
12810 return 0;
12811}
12812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012814 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12821$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012822if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012825
12826fi
12827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12829$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012830if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012834/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835#include <sys/types.h>
12836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012837
Martin v. Löwis11437992002-04-12 09:54:03 +000012838int
12839main ()
12840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841struct tm tm;
12842 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ;
12845 return 0;
12846}
12847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012848if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012849 ac_cv_struct_tm=time.h
12850else
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12856$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012857if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860
12861fi
12862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863ac_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 +000012864#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866"
Victor Stinnere0be4232011-10-25 13:06:09 +020012867if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012868
12869cat >>confdefs.h <<_ACEOF
12870#define HAVE_STRUCT_TM_TM_ZONE 1
12871_ACEOF
12872
12873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012875
Martin v. Löwis11437992002-04-12 09:54:03 +000012876if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12877
Matthias Kloseb9621712010-04-24 17:59:49 +000012878$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879
12880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12882"
Victor Stinnere0be4232011-10-25 13:06:09 +020012883if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885else
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887fi
12888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012889cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891_ACEOF
12892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12894$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012895if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012899/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012900#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012901#if !HAVE_DECL_TZNAME
12902extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Martin v. Löwis11437992002-04-12 09:54:03 +000012905int
12906main ()
12907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ;
12910 return 0;
12911}
12912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012914 ac_cv_var_tzname=yes
12915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012918rm -f core conftest.err conftest.$ac_objext \
12919 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12922$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012923 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012924
Matthias Kloseb9621712010-04-24 17:59:49 +000012925$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927 fi
12928fi
12929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930ac_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 +020012931if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
12933cat >>confdefs.h <<_ACEOF
12934#define HAVE_STRUCT_STAT_ST_RDEV 1
12935_ACEOF
12936
12937
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012938fi
12939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940ac_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 +020012941if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012942
Martin v. Löwis11437992002-04-12 09:54:03 +000012943cat >>confdefs.h <<_ACEOF
12944#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12945_ACEOF
12946
12947
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012948fi
12949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950ac_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 +020012951if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012952
12953cat >>confdefs.h <<_ACEOF
12954#define HAVE_STRUCT_STAT_ST_FLAGS 1
12955_ACEOF
12956
12957
12958fi
12959
Matthias Kloseb9621712010-04-24 17:59:49 +000012960ac_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 +020012961if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012962
12963cat >>confdefs.h <<_ACEOF
12964#define HAVE_STRUCT_STAT_ST_GEN 1
12965_ACEOF
12966
12967
12968fi
12969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970ac_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 +020012971if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012972
12973cat >>confdefs.h <<_ACEOF
12974#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12975_ACEOF
12976
12977
12978fi
12979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980ac_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 +020012981if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983cat >>confdefs.h <<_ACEOF
12984#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12985_ACEOF
12986
12987
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012988fi
12989
Stefan Krah267b6392016-04-26 01:09:18 +020012990ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12991 #include <sys/types.h>
12992 #include <pwd.h>
12993
12994"
12995if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12996
12997cat >>confdefs.h <<_ACEOF
12998#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12999_ACEOF
13000
13001
13002fi
13003ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13004 #include <sys/types.h>
13005 #include <pwd.h>
13006
13007"
13008if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13009
13010cat >>confdefs.h <<_ACEOF
13011#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13012_ACEOF
13013
13014
13015fi
13016
Zachary Ware6a6967e2016-10-01 00:47:27 -050013017# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13018ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13019"
13020if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13021
13022cat >>confdefs.h <<_ACEOF
13023#define HAVE_SIGINFO_T_SI_BAND 1
13024_ACEOF
13025
13026
13027fi
13028
Michael W. Hudson54241132001-12-07 15:38:26 +000013029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13031$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013032if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013034else
Matthias Kloseb159a552010-04-25 21:00:44 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013037/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013038#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013039int
13040main ()
13041{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013042return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048 ac_cv_header_time_altzone=yes
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054fi
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13057$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061
13062fi
13063
Guido van Rossumda88dad1995-01-26 00:46:29 +000013064was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13066$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013068/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013069
13070#include <sys/types.h>
13071#include <sys/select.h>
13072#include <sys/time.h>
13073
Martin v. Löwis11437992002-04-12 09:54:03 +000013074int
13075main ()
13076{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077;
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ;
13079 return 0;
13080}
13081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013083
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013087 was_it_defined=yes
13088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13092$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13095$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013096if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013098else
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013100/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013101#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013105struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013106 ;
13107 return 0;
13108}
13109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111 ac_cv_struct_addrinfo=yes
13112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13116fi
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13119$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123
13124fi
13125
Matthias Kloseb9621712010-04-24 17:59:49 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13127$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013128if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013132/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013133
13134# include <sys/types.h>
13135# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013136int
13137main ()
13138{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013139struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 ;
13141 return 0;
13142}
13143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145 ac_cv_struct_sockaddr_storage=yes
13146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13150fi
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13153$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157
13158fi
13159
Christian Heimesdffa3942016-09-05 23:54:41 +020013160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13161$as_echo_n "checking for sockaddr_alg... " >&6; }
13162if ${ac_cv_struct_sockaddr_alg+:} false; then :
13163 $as_echo_n "(cached) " >&6
13164else
13165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13166/* end confdefs.h. */
13167
13168# include <sys/types.h>
13169# include <sys/socket.h>
13170# include <linux/if_alg.h>
13171int
13172main ()
13173{
13174struct sockaddr_alg s
13175 ;
13176 return 0;
13177}
13178_ACEOF
13179if ac_fn_c_try_compile "$LINENO"; then :
13180 ac_cv_struct_sockaddr_alg=yes
13181else
13182 ac_cv_struct_sockaddr_alg=no
13183fi
13184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13185fi
13186
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13188$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13189if test $ac_cv_struct_sockaddr_alg = yes; then
13190
13191$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13192
13193fi
13194
Guido van Rossum627b2d71993-12-24 10:39:16 +000013195# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013196
Matthias Kloseb9621712010-04-24 17:59:49 +000013197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13198$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013199if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013204$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013205int
13206main ()
13207{
13208static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013209test_array [0] = 0;
13210return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
13212 ;
13213 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013214}
Martin v. Löwis11437992002-04-12 09:54:03 +000013215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013216if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013217 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013218else
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13224$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013225if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013227
13228fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13231$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013232if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013237
Martin v. Löwis11437992002-04-12 09:54:03 +000013238int
13239main ()
13240{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013241
Martin v. Löwis11437992002-04-12 09:54:03 +000013242#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013243 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013245 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247 char const *const *pcpcc;
13248 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 /* NEC SVR4.0.2 mips cc rejects this. */
13250 struct point {int x, y;};
13251 static struct point const zero = {0,0};
13252 /* AIX XL C 1.02.0.0 rejects this.
13253 It does not let you subtract one const X* pointer from another in
13254 an arm of an if-expression whose if-part is not a constant
13255 expression */
13256 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259 ++pcpcc;
13260 ppc = (char**) pcpcc;
13261 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013262 { /* SCO 3.2v4 cc rejects this sort of thing. */
13263 char tx;
13264 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013266
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 }
13270 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13271 int x[] = {25, 17};
13272 const int *foo = &x[0];
13273 ++foo;
13274 }
13275 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13276 typedef const int *iptr;
13277 iptr p = 0;
13278 ++p;
13279 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013280 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013282 struct s { int j; const int *ap[3]; } bx;
13283 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 }
13285 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13286 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013287 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013288 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013289 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013290#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 ;
13293 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013294}
Martin v. Löwis11437992002-04-12 09:54:03 +000013295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013296if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297 ac_cv_c_const=yes
13298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13304$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308
13309fi
13310
Michael W. Hudson54241132001-12-07 15:38:26 +000013311
Guido van Rossumda88dad1995-01-26 00:46:29 +000013312works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13314$as_echo_n "checking for working signed char... " >&6; }
13315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013316/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013317
Martin v. Löwis11437992002-04-12 09:54:03 +000013318int
13319main ()
13320{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ;
13323 return 0;
13324}
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013327 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013328else
Skip Montanaro6dead952003-09-25 14:50:04 +000013329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013331
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013332
Guido van Rossum7f43da71994-08-01 12:15:30 +000013333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13336$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013337
Guido van Rossumda88dad1995-01-26 00:46:29 +000013338have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13340$as_echo_n "checking for prototypes... " >&6; }
13341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013342/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013343int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013344int
13345main ()
13346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013347return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ;
13349 return 0;
13350}
13351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb159a552010-04-25 21:00:44 +000013356 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13360$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013361
Guido van Rossumda88dad1995-01-26 00:46:29 +000013362works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13364$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013367
13368#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013369int foo(int x, ...) {
13370 va_list va;
13371 va_start(va, x);
13372 va_arg(va, int);
13373 va_arg(va, char *);
13374 va_arg(va, double);
13375 return 0;
13376}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378int
13379main ()
13380{
Guido van Rossum90eea071996-08-30 20:58:57 +000013381return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 ;
13383 return 0;
13384}
13385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013391 works=yes
13392
Guido van Rossum627b2d71993-12-24 10:39:16 +000013393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13396$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397
Martin v. Löwisd6320502004-08-12 13:45:08 +000013398# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13400$as_echo_n "checking for socketpair... " >&6; }
13401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013402/* end confdefs.h. */
13403
13404#include <sys/types.h>
13405#include <sys/socket.h>
13406
13407int
13408main ()
13409{
13410void *x=socketpair
13411 ;
13412 return 0;
13413}
13414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013418
Matthias Kloseb159a552010-04-25 21:00:44 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013420$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13423$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013424
13425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013427
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013428# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13430$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013432/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013433#include <sys/types.h>
13434#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013435int
13436main ()
13437{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013438struct sockaddr x;
13439x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 ;
13441 return 0;
13442}
13443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013444if ac_fn_c_try_compile "$LINENO"; then :
13445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13446$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013449
13450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13452$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013453
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013456
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013457# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013461if test "x$ac_cv_func_gethostbyname_r" = xyes; 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
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13466$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467 OLD_CFLAGS=$CFLAGS
13468 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013470/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013471
13472# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
Martin v. Löwis11437992002-04-12 09:54:03 +000013474int
13475main ()
13476{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013477
13478 char *name;
13479 struct hostent *he, *res;
13480 char buffer[2048];
13481 int buflen = 2048;
13482 int h_errnop;
13483
13484 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
13486 ;
13487 return 0;
13488}
13489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013493
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013496
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13498$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013500else
Skip Montanaro6dead952003-09-25 14:50:04 +000013501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13503$as_echo "no" >&6; }
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13505$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013507/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013509# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Martin v. Löwis11437992002-04-12 09:54:03 +000013511int
13512main ()
13513{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013514
13515 char *name;
13516 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013517 char buffer[2048];
13518 int buflen = 2048;
13519 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013520
Matthias Kloseb159a552010-04-25 21:00:44 +000013521 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
13523 ;
13524 return 0;
13525}
13526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013527if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
Matthias Kloseb159a552010-04-25 21:00:44 +000013532$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13535$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013537else
Skip Montanaro6dead952003-09-25 14:50:04 +000013538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13540$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13542$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13544/* end confdefs.h. */
13545
13546# include <netdb.h>
13547
13548int
13549main ()
13550{
13551
13552 char *name;
13553 struct hostent *he;
13554 struct hostent_data data;
13555
13556 (void) gethostbyname_r(name, he, &data);
13557
13558 ;
13559 return 0;
13560}
13561_ACEOF
13562if ac_fn_c_try_compile "$LINENO"; then :
13563
13564 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13565
13566
13567$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13568
13569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13570$as_echo "yes" >&6; }
13571
13572else
13573
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13575$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013582
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013585 CFLAGS=$OLD_CFLAGS
13586
13587else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 for ac_func in gethostbyname
13590do :
13591 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013592if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013594#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013595_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013596
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013597fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013598done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013599
Michael W. Hudson54241132001-12-07 15:38:26 +000013600
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013601fi
13602
Michael W. Hudson54241132001-12-07 15:38:26 +000013603
13604
13605
13606
13607
13608
Guido van Rossum627b2d71993-12-24 10:39:16 +000013609# checks for system services
13610# (none yet)
13611
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013612# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013613ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013614if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013615
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013616else
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13618$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013619if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621else
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013623LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627/* Override any GCC internal prototype to avoid an error.
13628 Use char because int might match the return type of a GCC
13629 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013630#ifdef __cplusplus
13631extern "C"
13632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013633char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013637return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ;
13639 return 0;
13640}
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013643 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013647rm -f core conftest.err conftest.$ac_objext \
13648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013649LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13652$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013653if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 cat >>confdefs.h <<_ACEOF
13655#define HAVE_LIBIEEE 1
13656_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013658 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013659
Guido van Rossum627b2d71993-12-24 10:39:16 +000013660fi
13661
Michael W. Hudson54241132001-12-07 15:38:26 +000013662
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013663fi
13664
Michael W. Hudson54241132001-12-07 15:38:26 +000013665
Guido van Rossum7f253911997-05-09 02:42:48 +000013666# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13668$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013671if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013672 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013673if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013674then
13675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13679$as_echo "yes" >&6; }
13680else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13681$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013682fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013683else
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13685$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013686fi
13687
Guido van Rossum7f253911997-05-09 02:42:48 +000013688
Guido van Rossum7f43da71994-08-01 12:15:30 +000013689# check for --with-libm=...
13690
Guido van Rossum563e7081996-09-10 18:20:48 +000013691case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013692Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013693*) LIBM=-lm
13694esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13696$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013701if test "$withval" = no
13702then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13704$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013705elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013706then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13708$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013709else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013710fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13713$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714fi
13715
Guido van Rossum7f43da71994-08-01 12:15:30 +000013716
13717# check for --with-libc=...
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13720$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013723if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013725if test "$withval" = no
13726then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13728$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013729elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013730then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13732$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013733else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013734fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013735else
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13737$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738fi
13739
Guido van Rossum7f43da71994-08-01 12:15:30 +000013740
Stefan Krah1919b7e2012-03-21 18:25:23 +010013741# **************************************
13742# * Check for gcc x64 inline assembler *
13743# **************************************
13744
13745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13746$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13748/* end confdefs.h. */
13749
13750int
13751main ()
13752{
13753
13754 __asm__ __volatile__ ("movq %rcx, %rax");
13755
13756 ;
13757 return 0;
13758}
13759_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013760if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013761 have_gcc_asm_for_x64=yes
13762else
13763 have_gcc_asm_for_x64=no
13764fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013765rm -f core conftest.err conftest.$ac_objext \
13766 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13768$as_echo "$have_gcc_asm_for_x64" >&6; }
13769if test "$have_gcc_asm_for_x64" = yes
13770then
13771
13772$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13773
13774fi
13775
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776# **************************************************
13777# * Check for various properties of floating point *
13778# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13781$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013782if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013784else
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787 ac_cv_little_endian_double=no
13788else
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013790/* end confdefs.h. */
13791
13792#include <string.h>
13793int main() {
13794 double x = 9006104071832581.0;
13795 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13796 return 0;
13797 else
13798 return 1;
13799}
13800
13801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013802if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803 ac_cv_little_endian_double=yes
13804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013809fi
13810
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811fi
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13814$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815if test "$ac_cv_little_endian_double" = yes
13816then
13817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819
13820fi
13821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13823$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013824if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013826else
13827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829 ac_cv_big_endian_double=no
13830else
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013832/* end confdefs.h. */
13833
13834#include <string.h>
13835int main() {
13836 double x = 9006104071832581.0;
13837 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13838 return 0;
13839 else
13840 return 1;
13841}
13842
13843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013845 ac_cv_big_endian_double=yes
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013851fi
13852
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853fi
13854
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13856$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857if test "$ac_cv_big_endian_double" = yes
13858then
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861
13862fi
13863
13864# Some ARM platforms use a mixed-endian representation for doubles.
13865# While Python doesn't currently have full support for these platforms
13866# (see e.g., issue 1762561), we can at least make sure that float <-> string
13867# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13869$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013870if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013872else
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875 ac_cv_mixed_endian_double=no
13876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013878/* end confdefs.h. */
13879
13880#include <string.h>
13881int main() {
13882 double x = 9006104071832581.0;
13883 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13884 return 0;
13885 else
13886 return 1;
13887}
13888
13889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013891 ac_cv_mixed_endian_double=yes
13892else
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013897fi
13898
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899fi
13900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13902$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903if test "$ac_cv_mixed_endian_double" = yes
13904then
13905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907
13908fi
13909
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013910# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013911# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013912# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013913# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013914# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013915# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013916
13917# This inline assembler syntax may also work for suncc and icc,
13918# so we try it on all platforms.
13919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13921$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013923/* end confdefs.h. */
13924
13925int
13926main ()
13927{
13928
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013929 unsigned short cw;
13930 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13931 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013932
13933 ;
13934 return 0;
13935}
13936_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013937if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938 have_gcc_asm_for_x87=yes
13939else
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013941fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013942rm -f core conftest.err conftest.$ac_objext \
13943 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13945$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013946if test "$have_gcc_asm_for_x87" = yes
13947then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013950
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13954$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13956/* end confdefs.h. */
13957
13958int
13959main ()
13960{
13961
13962 unsigned int fpcr;
13963 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13964 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13965
13966 ;
13967 return 0;
13968}
13969_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013970if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013971 have_gcc_asm_for_mc68881=yes
13972else
13973 have_gcc_asm_for_mc68881=no
13974fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013975rm -f core conftest.err conftest.$ac_objext \
13976 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13978$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13979if test "$have_gcc_asm_for_mc68881" = yes
13980then
13981
13982$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13983
13984fi
13985
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013986# Detect whether system arithmetic is subject to x87-style double
13987# rounding issues. The result of this test has little meaning on non
13988# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13989# mode is round-to-nearest and double rounding issues are present, and
13990# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13992$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013993# $BASECFLAGS may affect the result
13994ac_save_cc="$CC"
13995CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013996if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013997 ac_cv_x87_double_rounding=no
13998else
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014000/* end confdefs.h. */
14001
14002#include <stdlib.h>
14003#include <math.h>
14004int main() {
14005 volatile double x, y, z;
14006 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14007 x = 0.99999999999999989; /* 1-2**-53 */
14008 y = 1./x;
14009 if (y != 1.)
14010 exit(0);
14011 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14012 x = 1e16;
14013 y = 2.99999;
14014 z = x + y;
14015 if (z != 1e16+4.)
14016 exit(0);
14017 /* both tests show evidence of double rounding */
14018 exit(1);
14019}
14020
14021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014022if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014023 ac_cv_x87_double_rounding=no
14024else
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014029fi
14030
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014031CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14033$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014034if test "$ac_cv_x87_double_rounding" = yes
14035then
14036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014038
14039fi
14040
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014041# ************************************
14042# * Check for mathematical functions *
14043# ************************************
14044
14045LIBS_SAVE=$LIBS
14046LIBS="$LIBS $LIBM"
14047
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014048for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14049do :
14050 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14051ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014052if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014053 cat >>confdefs.h <<_ACEOF
14054#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14055_ACEOF
14056
14057fi
14058done
14059
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014060for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014061do :
14062 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14063ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014064if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014065 cat >>confdefs.h <<_ACEOF
14066#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14067_ACEOF
14068
14069fi
14070done
14071
14072ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14073"
Victor Stinnere0be4232011-10-25 13:06:09 +020014074if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014075 ac_have_decl=1
14076else
14077 ac_have_decl=0
14078fi
14079
14080cat >>confdefs.h <<_ACEOF
14081#define HAVE_DECL_ISINF $ac_have_decl
14082_ACEOF
14083ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14084"
Victor Stinnere0be4232011-10-25 13:06:09 +020014085if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014086 ac_have_decl=1
14087else
14088 ac_have_decl=0
14089fi
14090
14091cat >>confdefs.h <<_ACEOF
14092#define HAVE_DECL_ISNAN $ac_have_decl
14093_ACEOF
14094ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14095"
Victor Stinnere0be4232011-10-25 13:06:09 +020014096if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014097 ac_have_decl=1
14098else
14099 ac_have_decl=0
14100fi
14101
14102cat >>confdefs.h <<_ACEOF
14103#define HAVE_DECL_ISFINITE $ac_have_decl
14104_ACEOF
14105
14106
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014107# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14108# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14110$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014111if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014113else
14114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014116 ac_cv_tanh_preserves_zero_sign=no
14117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014119/* end confdefs.h. */
14120
14121#include <math.h>
14122#include <stdlib.h>
14123int main() {
14124 /* return 0 if either negative zeros don't exist
14125 on this platform or if negative zeros exist
14126 and tanh(-0.) == -0. */
14127 if (atan2(0., -1.) == atan2(-0., -1.) ||
14128 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14129 else exit(1);
14130}
14131
14132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014134 ac_cv_tanh_preserves_zero_sign=yes
14135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014140fi
14141
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014142fi
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14145$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014146if test "$ac_cv_tanh_preserves_zero_sign" = yes
14147then
14148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014150
14151fi
14152
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014153if test "$ac_cv_func_log1p" = yes
14154then
14155 # On some versions of AIX, log1p(-0.) returns 0. instead of
14156 # -0. See issue #9920.
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14158$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014159 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014160 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014161else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014163 if test "$cross_compiling" = yes; then :
14164 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014168
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014169 #include <math.h>
14170 #include <stdlib.h>
14171 int main() {
14172 /* Fail if the signs of log1p(-0.) and -0. can be
14173 distinguished. */
14174 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14175 return 0;
14176 else
14177 return 1;
14178 }
14179
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014180_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014181if ac_fn_c_try_run "$LINENO"; then :
14182 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014183else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014184 ac_cv_log1p_drops_zero_sign=yes
14185fi
14186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014188fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014190fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014191
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14193$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14194fi
14195if test "$ac_cv_log1p_drops_zero_sign" = yes
14196then
14197
14198$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14199
14200fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014201
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014202LIBS=$LIBS_SAVE
14203
Mark Dickinsona614f042009-11-28 12:48:43 +000014204# For multiprocessing module, check that sem_open
14205# actually works. For FreeBSD versions <= 7.2,
14206# the kernel module that provides POSIX semaphores
14207# isn't loaded by default, so an attempt to call
14208# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14210$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014211if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014213else
Matthias Kloseb9621712010-04-24 17:59:49 +000014214 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014215 ac_cv_posix_semaphores_enabled=yes
14216else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014218/* end confdefs.h. */
14219
14220#include <unistd.h>
14221#include <fcntl.h>
14222#include <stdio.h>
14223#include <semaphore.h>
14224#include <sys/stat.h>
14225
14226int main(void) {
14227 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14228 if (a == SEM_FAILED) {
14229 perror("sem_open");
14230 return 1;
14231 }
14232 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014233 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014234 return 0;
14235}
14236
14237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014238if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014239 ac_cv_posix_semaphores_enabled=yes
14240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14244 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014245fi
14246
14247
Mark Dickinsona614f042009-11-28 12:48:43 +000014248fi
14249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14251$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014252if test $ac_cv_posix_semaphores_enabled = no
14253then
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014256
14257fi
14258
Mark Dickinson10683072009-04-18 21:18:19 +000014259# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14261$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014262if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014264else
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014269/* end confdefs.h. */
14270
14271#include <unistd.h>
14272#include <fcntl.h>
14273#include <stdio.h>
14274#include <semaphore.h>
14275#include <sys/stat.h>
14276
14277int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014278 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014279 int count;
14280 int res;
14281 if(a==SEM_FAILED){
14282 perror("sem_open");
14283 return 1;
14284
14285 }
14286 res = sem_getvalue(a, &count);
14287 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014288 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014289 return res==-1 ? 1 : 0;
14290}
14291
Mark Dickinson10683072009-04-18 21:18:19 +000014292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014293if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014294 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014300fi
14301
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014302
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014303fi
14304
Matthias Kloseb9621712010-04-24 17:59:49 +000014305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14306$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014307if test $ac_cv_broken_sem_getvalue = yes
14308then
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014311
14312fi
14313
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014314ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14315"
14316if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14317 ac_have_decl=1
14318else
14319 ac_have_decl=0
14320fi
14321
14322cat >>confdefs.h <<_ACEOF
14323#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14324_ACEOF
14325ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14326"
14327if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14328 ac_have_decl=1
14329else
14330 ac_have_decl=0
14331fi
14332
14333cat >>confdefs.h <<_ACEOF
14334#define HAVE_DECL_RTLD_NOW $ac_have_decl
14335_ACEOF
14336ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14337"
14338if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14339 ac_have_decl=1
14340else
14341 ac_have_decl=0
14342fi
14343
14344cat >>confdefs.h <<_ACEOF
14345#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14346_ACEOF
14347ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14348"
14349if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14350 ac_have_decl=1
14351else
14352 ac_have_decl=0
14353fi
14354
14355cat >>confdefs.h <<_ACEOF
14356#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14357_ACEOF
14358ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14359"
14360if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14361 ac_have_decl=1
14362else
14363 ac_have_decl=0
14364fi
14365
14366cat >>confdefs.h <<_ACEOF
14367#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14368_ACEOF
14369ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14370"
14371if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14372 ac_have_decl=1
14373else
14374 ac_have_decl=0
14375fi
14376
14377cat >>confdefs.h <<_ACEOF
14378#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14379_ACEOF
14380ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14381"
14382if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14383 ac_have_decl=1
14384else
14385 ac_have_decl=0
14386fi
14387
14388cat >>confdefs.h <<_ACEOF
14389#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14390_ACEOF
14391
14392
Mark Dickinsonbd792642009-03-18 20:06:12 +000014393# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14395$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014396# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014398 enableval=$enable_big_digits; case $enable_big_digits in
14399yes)
14400 enable_big_digits=30 ;;
14401no)
14402 enable_big_digits=15 ;;
1440315|30)
14404 ;;
14405*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014406 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 +000014407esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14409$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014410
14411cat >>confdefs.h <<_ACEOF
14412#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14413_ACEOF
14414
14415
14416else
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14418$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014419fi
14420
14421
Guido van Rossumef2255b2000-03-10 22:30:29 +000014422# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014423ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014424if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
14426
Matthias Kloseb9621712010-04-24 17:59:49 +000014427$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014428
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014429 wchar_h="yes"
14430
Guido van Rossumef2255b2000-03-10 22:30:29 +000014431else
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014433
14434fi
14435
Michael W. Hudson54241132001-12-07 15:38:26 +000014436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014438# determine wchar_t size
14439if test "$wchar_h" = yes
14440then
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14443# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14444# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14446$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014447if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14451"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 if test "$ac_cv_type_wchar_t" = yes; then
14455 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014457as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014458See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459 else
14460 ac_cv_sizeof_wchar_t=0
14461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14466$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467
14468
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014471#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014472_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014473
Michael W. Hudson54241132001-12-07 15:38:26 +000014474
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014475fi
14476
Matthias Kloseb9621712010-04-24 17:59:49 +000014477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14478$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014479have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014481/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014482
14483#include <tcl.h>
14484#if TCL_UTF_MAX != 6
14485# error "NOT UCS4_TCL"
14486#endif
14487int
14488main ()
14489{
14490
14491 ;
14492 return 0;
14493}
14494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014496
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014499
14500 have_ucs4_tcl=yes
14501
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14505$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014506
Skip Montanaro6dead952003-09-25 14:50:04 +000014507# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014508if test "$wchar_h" = yes
14509then
14510 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14512$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014513 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014515else
14516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014518 ac_cv_wchar_t_signed=yes
14519else
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014521/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014522
14523 #include <wchar.h>
14524 int main()
14525 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014526 /* Success: exit code 0 */
14527 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014528 }
14529
14530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014531if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014532 ac_cv_wchar_t_signed=yes
14533else
Matthias Kloseb9621712010-04-24 17:59:49 +000014534 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14537 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014538fi
14539
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014540fi
14541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14543$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544fi
14545
Georg Brandl52d168a2008-01-07 18:10:24 +000014546# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014547if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014548 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014549then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014550 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Georg Brandl52d168a2008-01-07 18:10:24 +000014554else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014555 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014556fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14558$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014559
14560# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14562$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014563if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014565else
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 ac_cv_c_bigendian=unknown
14567 # See if we're dealing with a universal compiler.
14568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14569/* end confdefs.h. */
14570#ifndef __APPLE_CC__
14571 not a universal capable compiler
14572 #endif
14573 typedef int dummy;
14574
Skip Montanaro6dead952003-09-25 14:50:04 +000014575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576if ac_fn_c_try_compile "$LINENO"; then :
14577
14578 # Check for potential -arch flags. It is not universal unless
14579 # there are at least two -arch flags with different values.
14580 ac_arch=
14581 ac_prev=
14582 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14583 if test -n "$ac_prev"; then
14584 case $ac_word in
14585 i?86 | x86_64 | ppc | ppc64)
14586 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14587 ac_arch=$ac_word
14588 else
14589 ac_cv_c_bigendian=universal
14590 break
14591 fi
14592 ;;
14593 esac
14594 ac_prev=
14595 elif test "x$ac_word" = "x-arch"; then
14596 ac_prev=arch
14597 fi
14598 done
14599fi
14600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14601 if test $ac_cv_c_bigendian = unknown; then
14602 # See if sys/param.h defines the BYTE_ORDER macro.
14603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014604/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014605#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608int
14609main ()
14610{
Matthias Kloseb9621712010-04-24 17:59:49 +000014611#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14612 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14613 && LITTLE_ENDIAN)
14614 bogus endian macros
14615 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
14617 ;
14618 return 0;
14619}
14620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014621if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014622 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014624/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014625#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628int
14629main ()
14630{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014631#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 not big endian
14633 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
14635 ;
14636 return 0;
14637}
14638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014639if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014640 ac_cv_c_bigendian=yes
14641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014645fi
14646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14647 fi
14648 if test $ac_cv_c_bigendian = unknown; then
14649 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014651/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014652#include <limits.h>
14653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654int
14655main ()
14656{
Matthias Kloseb9621712010-04-24 17:59:49 +000014657#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14658 bogus endian macros
14659 #endif
14660
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 ;
14662 return 0;
14663}
14664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014665if ac_fn_c_try_compile "$LINENO"; then :
14666 # It does; now see whether it defined to _BIG_ENDIAN or not.
14667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14668/* end confdefs.h. */
14669#include <limits.h>
14670
14671int
14672main ()
14673{
14674#ifndef _BIG_ENDIAN
14675 not big endian
14676 #endif
14677
14678 ;
14679 return 0;
14680}
14681_ACEOF
14682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014683 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014684else
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14688fi
14689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14690 fi
14691 if test $ac_cv_c_bigendian = unknown; then
14692 # Compile a test program.
14693 if test "$cross_compiling" = yes; then :
14694 # Try to guess by grepping values from an object file.
14695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14696/* end confdefs.h. */
14697short int ascii_mm[] =
14698 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14699 short int ascii_ii[] =
14700 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14701 int use_ascii (int i) {
14702 return ascii_mm[i] + ascii_ii[i];
14703 }
14704 short int ebcdic_ii[] =
14705 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14706 short int ebcdic_mm[] =
14707 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14708 int use_ebcdic (int i) {
14709 return ebcdic_mm[i] + ebcdic_ii[i];
14710 }
14711 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713int
14714main ()
14715{
14716return use_ascii (foo) == use_ebcdic (foo);
14717 ;
14718 return 0;
14719}
14720_ACEOF
14721if ac_fn_c_try_compile "$LINENO"; then :
14722 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14723 ac_cv_c_bigendian=yes
14724 fi
14725 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14726 if test "$ac_cv_c_bigendian" = unknown; then
14727 ac_cv_c_bigendian=no
14728 else
14729 # finding both strings is unlikely to happen, but who knows?
14730 ac_cv_c_bigendian=unknown
14731 fi
14732 fi
14733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014737/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014739int
14740main ()
14741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 /* Are we little or big endian? From Harbison&Steele. */
14744 union
14745 {
14746 long int l;
14747 char c[sizeof (long int)];
14748 } u;
14749 u.l = 1;
14750 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751
14752 ;
14753 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754}
Martin v. Löwis11437992002-04-12 09:54:03 +000014755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014756if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014757 ac_cv_c_bigendian=no
14758else
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14768$as_echo "$ac_cv_c_bigendian" >&6; }
14769 case $ac_cv_c_bigendian in #(
14770 yes)
14771 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14772;; #(
14773 no)
14774 ;; #(
14775 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 ;; #(
14780 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014781 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014782 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014784
Michael W. Hudson54241132001-12-07 15:38:26 +000014785
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014786# ABI version string for Python extension modules. This appears between the
14787# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14788# from the following attributes which affect the ABI of this Python build (in
14789# this order):
14790#
14791# * The Python implementation (always 'cpython-' for us)
14792# * The major and minor version numbers
14793# * --with-pydebug (adds a 'd')
14794# * --with-pymalloc (adds a 'm')
14795# * --with-wide-unicode (adds a 'u')
14796#
14797# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014798# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14799# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014800
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14802$as_echo_n "checking ABIFLAGS... " >&6; }
14803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14804$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14806$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014807SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14809$as_echo "$SOABI" >&6; }
14810
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014811
14812case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014813 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014814 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14815 *)
14816 EXT_SUFFIX=${SHLIB_SUFFIX};;
14817esac
14818
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14820$as_echo_n "checking LDVERSION... " >&6; }
14821LDVERSION='$(VERSION)$(ABIFLAGS)'
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14823$as_echo "$LDVERSION" >&6; }
14824
doko@python.org87421192013-01-26 11:39:31 +010014825
doko@ubuntu.com55532312016-06-14 08:55:19 +020014826if test x$PLATFORM_TRIPLET = x; then
14827 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14828else
14829 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14830fi
doko@python.org87421192013-01-26 11:39:31 +010014831
14832
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014833# Check whether right shifting a negative integer extends the sign bit
14834# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14836$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014837if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014839else
Martin v. Löwis11437992002-04-12 09:54:03 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014842 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014843else
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014845/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014846
14847int main()
14848{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014849 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014850}
14851
Martin v. Löwis11437992002-04-12 09:54:03 +000014852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014854 ac_cv_rshift_extends_sign=yes
14855else
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014860fi
14861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862fi
14863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14865$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014866if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014867then
Martin v. Löwis11437992002-04-12 09:54:03 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014870
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014871fi
14872
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014873# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14875$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014876if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014878else
Martin v. Löwis11437992002-04-12 09:54:03 +000014879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014881/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014882#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014883int
14884main ()
14885{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014886
14887 FILE *f = fopen("/dev/null", "r");
14888 flockfile(f);
14889 getc_unlocked(f);
14890 funlockfile(f);
14891
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ;
14893 return 0;
14894}
14895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014896if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014897 ac_cv_have_getc_unlocked=yes
14898else
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 ac_cv_have_getc_unlocked=no
14900fi
14901rm -f core conftest.err conftest.$ac_objext \
14902 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904
Matthias Kloseb9621712010-04-24 17:59:49 +000014905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14906$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014907if test "$ac_cv_have_getc_unlocked" = yes
14908then
Martin v. Löwis11437992002-04-12 09:54:03 +000014909
Matthias Kloseb9621712010-04-24 17:59:49 +000014910$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014911
14912fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014913
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014914# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014915# save the value of LIBS so we don't actually link Python with readline
14916LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014917
Gregory P. Smith18820942008-09-07 06:24:49 +000014918# On some systems we need to link readline to a termcap compatible
14919# library. NOTE: Keep the precedence of listed libraries synchronised
14920# with setup.py.
14921py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14923$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014924for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014925 if test -z "$py_libtermcap"; then
14926 READLINE_LIBS="-lreadline"
14927 else
14928 READLINE_LIBS="-lreadline -l$py_libtermcap"
14929 fi
14930 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014932/* end confdefs.h. */
14933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934/* Override any GCC internal prototype to avoid an error.
14935 Use char because int might match the return type of a GCC
14936 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014937#ifdef __cplusplus
14938extern "C"
14939#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014940char readline ();
14941int
14942main ()
14943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014945 ;
14946 return 0;
14947}
14948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014949if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014950 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014952rm -f core conftest.err conftest.$ac_objext \
14953 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014954 if test $py_cv_lib_readline = yes; then
14955 break
14956 fi
14957done
14958# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14959#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014960if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14962$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014963else
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14965$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014966
Matthias Kloseb9621712010-04-24 17:59:49 +000014967$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014968
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014969fi
14970
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014973/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014974#include <readline/readline.h>
14975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014977 have_readline=yes
14978else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014979 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014980
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014981fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014982rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983if test $have_readline = yes
14984then
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014986/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014987#include <readline/readline.h>
14988
14989_ACEOF
14990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014994
14995fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014996rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014997
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014999/* end confdefs.h. */
15000#include <readline/readline.h>
15001
15002_ACEOF
15003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015007
15008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015009rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015010
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015011fi
15012
Martin v. Löwis0daad592001-09-30 21:09:59 +000015013# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15015$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015016if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015018else
Martin v. Löwis11437992002-04-12 09:54:03 +000015019 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015020LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024/* Override any GCC internal prototype to avoid an error.
15025 Use char because int might match the return type of a GCC
15026 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015027#ifdef __cplusplus
15028extern "C"
15029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015030char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015031int
15032main ()
15033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 ;
15036 return 0;
15037}
15038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015041else
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015044rm -f core conftest.err conftest.$ac_objext \
15045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015046LIBS=$ac_check_lib_save_LIBS
15047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15049$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015050if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015053
Martin v. Löwis0daad592001-09-30 21:09:59 +000015054fi
15055
Michael W. Hudson54241132001-12-07 15:38:26 +000015056
Thomas Wouters89d996e2007-09-08 17:39:28 +000015057# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15059$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015060if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015062else
15063 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015064LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015066/* end confdefs.h. */
15067
15068/* Override any GCC internal prototype to avoid an error.
15069 Use char because int might match the return type of a GCC
15070 builtin and then its argument prototype would still apply. */
15071#ifdef __cplusplus
15072extern "C"
15073#endif
15074char rl_completion_display_matches_hook ();
15075int
15076main ()
15077{
15078return rl_completion_display_matches_hook ();
15079 ;
15080 return 0;
15081}
15082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015083if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015084 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015088rm -f core conftest.err conftest.$ac_objext \
15089 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015090LIBS=$ac_check_lib_save_LIBS
15091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15093$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015094if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015097
15098fi
15099
15100
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015101# also in 4.0, but not in editline
15102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15103$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15104if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15105 $as_echo_n "(cached) " >&6
15106else
15107 ac_check_lib_save_LIBS=$LIBS
15108LIBS="-lreadline $READLINE_LIBS $LIBS"
15109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15110/* end confdefs.h. */
15111
15112/* Override any GCC internal prototype to avoid an error.
15113 Use char because int might match the return type of a GCC
15114 builtin and then its argument prototype would still apply. */
15115#ifdef __cplusplus
15116extern "C"
15117#endif
15118char rl_resize_terminal ();
15119int
15120main ()
15121{
15122return rl_resize_terminal ();
15123 ;
15124 return 0;
15125}
15126_ACEOF
15127if ac_fn_c_try_link "$LINENO"; then :
15128 ac_cv_lib_readline_rl_resize_terminal=yes
15129else
15130 ac_cv_lib_readline_rl_resize_terminal=no
15131fi
15132rm -f core conftest.err conftest.$ac_objext \
15133 conftest$ac_exeext conftest.$ac_ext
15134LIBS=$ac_check_lib_save_LIBS
15135fi
15136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15137$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15138if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15139
15140$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15141
15142fi
15143
15144
Martin v. Löwis0daad592001-09-30 21:09:59 +000015145# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15147$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015148if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015149 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015150else
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015152LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156/* Override any GCC internal prototype to avoid an error.
15157 Use char because int might match the return type of a GCC
15158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015159#ifdef __cplusplus
15160extern "C"
15161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015162char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015163int
15164main ()
15165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015167 ;
15168 return 0;
15169}
15170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015171if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015173else
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015176rm -f core conftest.err conftest.$ac_objext \
15177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015178LIBS=$ac_check_lib_save_LIBS
15179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15181$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015182if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015185
Guido van Rossum353ae582001-07-10 16:45:32 +000015186fi
15187
Jack Jansendd19cf82001-12-06 22:36:17 +000015188
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015191/* end confdefs.h. */
15192#include <readline/readline.h>
15193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015194if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015195 have_readline=yes
15196else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015197 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015198
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015200rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201if test $have_readline = yes
15202then
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204/* end confdefs.h. */
15205#include <readline/readline.h>
15206
15207_ACEOF
15208if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015210
Matthias Kloseb9621712010-04-24 17:59:49 +000015211$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015212
15213fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015214rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015215
15216fi
15217
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15219$as_echo_n "checking for append_history in -lreadline... " >&6; }
15220if ${ac_cv_lib_readline_append_history+:} false; then :
15221 $as_echo_n "(cached) " >&6
15222else
15223 ac_check_lib_save_LIBS=$LIBS
15224LIBS="-lreadline $READLINE_LIBS $LIBS"
15225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15226/* end confdefs.h. */
15227
15228/* Override any GCC internal prototype to avoid an error.
15229 Use char because int might match the return type of a GCC
15230 builtin and then its argument prototype would still apply. */
15231#ifdef __cplusplus
15232extern "C"
15233#endif
15234char append_history ();
15235int
15236main ()
15237{
15238return append_history ();
15239 ;
15240 return 0;
15241}
15242_ACEOF
15243if ac_fn_c_try_link "$LINENO"; then :
15244 ac_cv_lib_readline_append_history=yes
15245else
15246 ac_cv_lib_readline_append_history=no
15247fi
15248rm -f core conftest.err conftest.$ac_objext \
15249 conftest$ac_exeext conftest.$ac_ext
15250LIBS=$ac_check_lib_save_LIBS
15251fi
15252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15253$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15254if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15255
15256$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15257
15258fi
15259
15260
Martin v. Löwis82bca632006-02-10 20:49:30 +000015261# End of readline checks: restore LIBS
15262LIBS=$LIBS_no_readline
15263
Matthias Kloseb9621712010-04-24 17:59:49 +000015264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15265$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015266if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015268else
Martin v. Löwis11437992002-04-12 09:54:03 +000015269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015271 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015272else
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015274/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015275
15276int main()
15277{
15278 int val1 = nice(1);
15279 if (val1 != -1 && val1 == nice(2))
15280 exit(0);
15281 exit(1);
15282}
15283
Martin v. Löwis11437992002-04-12 09:54:03 +000015284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015285if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015286 ac_cv_broken_nice=yes
15287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015292fi
15293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294fi
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15297$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015298if test "$ac_cv_broken_nice" = yes
15299then
Martin v. Löwis11437992002-04-12 09:54:03 +000015300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015302
15303fi
15304
Matthias Kloseb9621712010-04-24 17:59:49 +000015305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15306$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015307if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311 ac_cv_broken_poll=no
15312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314/* end confdefs.h. */
15315
15316#include <poll.h>
15317
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015318int main()
15319{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015321 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015322
15323 close (42);
15324
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015325 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015327 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015329 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015330 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015331 return 1;
15332}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015333
15334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015335if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336 ac_cv_broken_poll=yes
15337else
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015344fi
15345
Matthias Kloseb9621712010-04-24 17:59:49 +000015346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15347$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015348if test "$ac_cv_broken_poll" = yes
15349then
15350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015352
15353fi
15354
Brett Cannon43802422005-02-10 20:48:03 +000015355# 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 +000015356# (which is not required by ISO C or UNIX spec) and/or if we support
15357# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015358ac_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 +000015359#include <$ac_cv_struct_tm>
15360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361"
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015363
15364cat >>confdefs.h <<_ACEOF
15365#define HAVE_STRUCT_TM_TM_ZONE 1
15366_ACEOF
15367
15368
15369fi
15370
15371if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015374
15375else
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15377"
Victor Stinnere0be4232011-10-25 13:06:09 +020015378if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015380else
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382fi
15383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015385#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386_ACEOF
15387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15389$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015390if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392else
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015394/* end confdefs.h. */
15395#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396#if !HAVE_DECL_TZNAME
15397extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015398#endif
15399
15400int
15401main ()
15402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015404 ;
15405 return 0;
15406}
15407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015408if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015409 ac_cv_var_tzname=yes
15410else
Matthias Kloseb9621712010-04-24 17:59:49 +000015411 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015413rm -f core conftest.err conftest.$ac_objext \
15414 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15417$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015418 if test $ac_cv_var_tzname = yes; then
15419
Matthias Kloseb9621712010-04-24 17:59:49 +000015420$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015421
15422 fi
15423fi
15424
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015425
Martin v. Löwis1d459062005-03-14 21:23:33 +000015426# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15428$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015429if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015431else
15432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015434 ac_cv_working_tzset=no
15435else
Matthias Kloseb9621712010-04-24 17:59:49 +000015436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015437/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015438
15439#include <stdlib.h>
15440#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015441#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015442
15443#if HAVE_TZNAME
15444extern char *tzname[];
15445#endif
15446
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015447int main()
15448{
Brett Cannon18367812003-09-19 00:59:16 +000015449 /* Note that we need to ensure that not only does tzset(3)
15450 do 'something' with localtime, but it works as documented
15451 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015452 This includes making sure that tzname is set properly if
15453 tm->tm_zone does not exist since it is the alternative way
15454 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015455
15456 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015457 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015458 */
15459
Martin v. Löwis1d459062005-03-14 21:23:33 +000015460 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015461 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15462
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015463 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015464 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015465 if (localtime(&groundhogday)->tm_hour != 0)
15466 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015467#if HAVE_TZNAME
15468 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15469 if (strcmp(tzname[0], "UTC") ||
15470 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15471 exit(1);
15472#endif
Brett Cannon18367812003-09-19 00:59:16 +000015473
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015474 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015475 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015476 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015477 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015478#if HAVE_TZNAME
15479 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15480 exit(1);
15481#endif
Brett Cannon18367812003-09-19 00:59:16 +000015482
15483 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15484 tzset();
15485 if (localtime(&groundhogday)->tm_hour != 11)
15486 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015487#if HAVE_TZNAME
15488 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15489 exit(1);
15490#endif
15491
15492#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015493 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15494 exit(1);
15495 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15496 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015497#endif
Brett Cannon18367812003-09-19 00:59:16 +000015498
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015499 exit(0);
15500}
15501
15502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015503if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015504 ac_cv_working_tzset=yes
15505else
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015510fi
15511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512fi
15513
Matthias Kloseb9621712010-04-24 17:59:49 +000015514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15515$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015516if test "$ac_cv_working_tzset" = yes
15517then
15518
Matthias Kloseb9621712010-04-24 17:59:49 +000015519$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015520
15521fi
15522
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015523# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15525$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015526if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015528else
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015530/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015531#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015532int
15533main ()
15534{
15535
15536struct stat st;
15537st.st_mtim.tv_nsec = 1;
15538
15539 ;
15540 return 0;
15541}
15542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015544 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545else
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15549fi
15550
Matthias Kloseb9621712010-04-24 17:59:49 +000015551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15552$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015553if test "$ac_cv_stat_tv_nsec" = yes
15554then
15555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015557
15558fi
15559
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015560# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15562$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015563if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015565else
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015567/* end confdefs.h. */
15568#include <sys/stat.h>
15569int
15570main ()
15571{
15572
15573struct stat st;
15574st.st_mtimespec.tv_nsec = 1;
15575
15576 ;
15577 return 0;
15578}
15579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015580if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015581 ac_cv_stat_tv_nsec2=yes
15582else
Matthias Kloseb9621712010-04-24 17:59:49 +000015583 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15586fi
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15589$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015590if test "$ac_cv_stat_tv_nsec2" = yes
15591then
15592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015594
15595fi
15596
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015597# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015598ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015599if test "$cross_compiling" = no; then
15600 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15601fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015602
15603for ac_header in curses.h ncurses.h
15604do :
15605 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15606ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15608 cat >>confdefs.h <<_ACEOF
15609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15610_ACEOF
15611
15612fi
15613
15614done
15615
15616
15617# On Solaris, term.h requires curses.h
15618for ac_header in term.h
15619do :
15620 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15621#ifdef HAVE_CURSES_H
15622#include <curses.h>
15623#endif
15624
15625"
15626if test "x$ac_cv_header_term_h" = xyes; then :
15627 cat >>confdefs.h <<_ACEOF
15628#define HAVE_TERM_H 1
15629_ACEOF
15630
15631fi
15632
15633done
15634
15635
Jack Jansen666b1e72001-10-31 12:11:48 +000015636# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15638$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015639if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015640 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015641else
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015643/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015644#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015645int
15646main ()
15647{
Jack Jansen666b1e72001-10-31 12:11:48 +000015648
15649 int rtn;
15650 rtn = mvwdelch(0,0,0);
15651
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 ;
15653 return 0;
15654}
15655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015656if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015657 ac_cv_mvwdelch_is_expression=yes
15658else
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15662fi
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15665$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015666
15667if test "$ac_cv_mvwdelch_is_expression" = yes
15668then
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
Matthias Kloseb9621712010-04-24 17:59:49 +000015670$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015671
15672fi
15673
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015674# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15675# structs since version 5.7. If the macro is defined as zero before including
15676# [n]curses.h, ncurses will expose fields of the structs regardless of the
15677# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15679$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015680if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015682else
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015684/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015685
15686 #define NCURSES_OPAQUE 0
15687 #include <curses.h>
15688
Martin v. Löwis11437992002-04-12 09:54:03 +000015689int
15690main ()
15691{
Jack Jansen666b1e72001-10-31 12:11:48 +000015692
15693 WINDOW *w;
15694 w->_flags = 0;
15695
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 ;
15697 return 0;
15698}
15699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015700if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015701 ac_cv_window_has_flags=yes
15702else
Matthias Kloseb9621712010-04-24 17:59:49 +000015703 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15706fi
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15709$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015710
Jack Jansen666b1e72001-10-31 12:11:48 +000015711
15712if test "$ac_cv_window_has_flags" = yes
15713then
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
Matthias Kloseb9621712010-04-24 17:59:49 +000015715$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015716
15717fi
15718
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15720$as_echo_n "checking for is_pad... " >&6; }
15721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15722/* end confdefs.h. */
15723#include <curses.h>
15724int
15725main ()
15726{
15727
15728#ifndef is_pad
15729void *x=is_pad
15730#endif
15731
15732 ;
15733 return 0;
15734}
15735_ACEOF
15736if ac_fn_c_try_compile "$LINENO"; then :
15737
15738$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15739
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15741$as_echo "yes" >&6; }
15742else
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15744$as_echo "no" >&6; }
15745
15746fi
15747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15748
Matthias Kloseb9621712010-04-24 17:59:49 +000015749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15750$as_echo_n "checking for is_term_resized... " >&6; }
15751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015752/* end confdefs.h. */
15753#include <curses.h>
15754int
15755main ()
15756{
15757void *x=is_term_resized
15758 ;
15759 return 0;
15760}
15761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015762if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015765
Matthias Kloseb159a552010-04-25 21:00:44 +000015766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015767$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15770$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015771
15772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15774
Matthias Kloseb9621712010-04-24 17:59:49 +000015775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15776$as_echo_n "checking for resize_term... " >&6; }
15777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015778/* end confdefs.h. */
15779#include <curses.h>
15780int
15781main ()
15782{
15783void *x=resize_term
15784 ;
15785 return 0;
15786}
15787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015788if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015791
Matthias Kloseb159a552010-04-25 21:00:44 +000015792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015793$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015794else
Matthias Kloseb9621712010-04-24 17:59:49 +000015795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15796$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015797
15798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15802$as_echo_n "checking for resizeterm... " >&6; }
15803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015804/* end confdefs.h. */
15805#include <curses.h>
15806int
15807main ()
15808{
15809void *x=resizeterm
15810 ;
15811 return 0;
15812}
15813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015814if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015817
Matthias Kloseb159a552010-04-25 21:00:44 +000015818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015819$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015820else
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15822$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015823
15824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015826
15827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15828$as_echo_n "checking for immedok... " >&6; }
15829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15830/* end confdefs.h. */
15831#include <curses.h>
15832int
15833main ()
15834{
15835
15836#ifndef immedok
15837void *x=immedok
15838#endif
15839
15840 ;
15841 return 0;
15842}
15843_ACEOF
15844if ac_fn_c_try_compile "$LINENO"; then :
15845
15846$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15847
15848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15849$as_echo "yes" >&6; }
15850else
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15852$as_echo "no" >&6; }
15853
15854fi
15855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15856
15857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15858$as_echo_n "checking for syncok... " >&6; }
15859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15860/* end confdefs.h. */
15861#include <curses.h>
15862int
15863main ()
15864{
15865
15866#ifndef syncok
15867void *x=syncok
15868#endif
15869
15870 ;
15871 return 0;
15872}
15873_ACEOF
15874if ac_fn_c_try_compile "$LINENO"; then :
15875
15876$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15877
15878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15879$as_echo "yes" >&6; }
15880else
15881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15882$as_echo "no" >&6; }
15883
15884fi
15885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15886
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15888$as_echo_n "checking for wchgat... " >&6; }
15889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15890/* end confdefs.h. */
15891#include <curses.h>
15892int
15893main ()
15894{
15895
15896#ifndef wchgat
15897void *x=wchgat
15898#endif
15899
15900 ;
15901 return 0;
15902}
15903_ACEOF
15904if ac_fn_c_try_compile "$LINENO"; then :
15905
15906$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15907
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15909$as_echo "yes" >&6; }
15910else
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15912$as_echo "no" >&6; }
15913
15914fi
15915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15916
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15918$as_echo_n "checking for filter... " >&6; }
15919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920/* end confdefs.h. */
15921#include <curses.h>
15922int
15923main ()
15924{
15925
15926#ifndef filter
15927void *x=filter
15928#endif
15929
15930 ;
15931 return 0;
15932}
15933_ACEOF
15934if ac_fn_c_try_compile "$LINENO"; then :
15935
15936$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15937
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15939$as_echo "yes" >&6; }
15940else
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942$as_echo "no" >&6; }
15943
15944fi
15945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15946
15947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15948$as_echo_n "checking for has_key... " >&6; }
15949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15950/* end confdefs.h. */
15951#include <curses.h>
15952int
15953main ()
15954{
15955
15956#ifndef has_key
15957void *x=has_key
15958#endif
15959
15960 ;
15961 return 0;
15962}
15963_ACEOF
15964if ac_fn_c_try_compile "$LINENO"; then :
15965
15966$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15967
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15969$as_echo "yes" >&6; }
15970else
15971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15972$as_echo "no" >&6; }
15973
15974fi
15975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15976
15977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15978$as_echo_n "checking for typeahead... " >&6; }
15979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15980/* end confdefs.h. */
15981#include <curses.h>
15982int
15983main ()
15984{
15985
15986#ifndef typeahead
15987void *x=typeahead
15988#endif
15989
15990 ;
15991 return 0;
15992}
15993_ACEOF
15994if ac_fn_c_try_compile "$LINENO"; then :
15995
15996$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15997
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15999$as_echo "yes" >&6; }
16000else
16001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16002$as_echo "no" >&6; }
16003
16004fi
16005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16006
16007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16008$as_echo_n "checking for use_env... " >&6; }
16009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010/* end confdefs.h. */
16011#include <curses.h>
16012int
16013main ()
16014{
16015
16016#ifndef use_env
16017void *x=use_env
16018#endif
16019
16020 ;
16021 return 0;
16022}
16023_ACEOF
16024if ac_fn_c_try_compile "$LINENO"; then :
16025
16026$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16027
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16029$as_echo "yes" >&6; }
16030else
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16032$as_echo "no" >&6; }
16033
16034fi
16035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016036# last curses configure check
16037CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16040$as_echo "$as_me: checking for device files" >&6;}
16041
16042if test "x$cross_compiling" = xyes; then
16043 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16045$as_echo_n "checking for /dev/ptmx... " >&6; }
16046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16047$as_echo "not set" >&6; }
16048 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16049 fi
16050 if test "${ac_cv_file__dev_ptc+set}" != set; then
16051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16052$as_echo_n "checking for /dev/ptc... " >&6; }
16053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16054$as_echo "not set" >&6; }
16055 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16056 fi
16057fi
16058
Matthias Kloseb9621712010-04-24 17:59:49 +000016059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16060$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016061if ${ac_cv_file__dev_ptmx+:} false; then :
16062 $as_echo_n "(cached) " >&6
16063else
16064 test "$cross_compiling" = yes &&
16065 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16066if test -r "/dev/ptmx"; then
16067 ac_cv_file__dev_ptmx=yes
16068else
16069 ac_cv_file__dev_ptmx=no
16070fi
16071fi
16072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16073$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16074if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016075
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016076fi
16077
16078if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016079
Matthias Kloseb9621712010-04-24 17:59:49 +000016080$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016081
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16084$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016085if ${ac_cv_file__dev_ptc+:} false; then :
16086 $as_echo_n "(cached) " >&6
16087else
16088 test "$cross_compiling" = yes &&
16089 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16090if test -r "/dev/ptc"; then
16091 ac_cv_file__dev_ptc=yes
16092else
16093 ac_cv_file__dev_ptc=no
16094fi
16095fi
16096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16097$as_echo "$ac_cv_file__dev_ptc" >&6; }
16098if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016099
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016100fi
16101
16102if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016103
Matthias Kloseb9621712010-04-24 17:59:49 +000016104$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016105
Neal Norwitz865400f2003-03-21 01:42:58 +000016106fi
16107
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016108if test $ac_sys_system = Darwin
16109then
16110 LIBS="$LIBS -framework CoreFoundation"
16111fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016112
Matthias Kloseb9621712010-04-24 17:59:49 +000016113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16114$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016115if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016116 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016117else
Matthias Kloseb9621712010-04-24 17:59:49 +000016118 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016119 ac_cv_have_size_t_format="cross -- assuming yes"
16120
Thomas Wouters477c8d52006-05-27 19:21:47 +000016121else
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016123/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016124
Thomas Wouters477c8d52006-05-27 19:21:47 +000016125#include <stdio.h>
16126#include <stddef.h>
16127#include <string.h>
16128
Christian Heimes2c181612007-12-17 20:04:13 +000016129#ifdef HAVE_SYS_TYPES_H
16130#include <sys/types.h>
16131#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016132
16133#ifdef HAVE_SSIZE_T
16134typedef ssize_t Py_ssize_t;
16135#elif SIZEOF_VOID_P == SIZEOF_LONG
16136typedef long Py_ssize_t;
16137#else
16138typedef int Py_ssize_t;
16139#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016140
Christian Heimes2c181612007-12-17 20:04:13 +000016141int main()
16142{
16143 char buffer[256];
16144
Thomas Wouters477c8d52006-05-27 19:21:47 +000016145 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16146 return 1;
16147
Thomas Wouters89f507f2006-12-13 04:49:30 +000016148 if (strcmp(buffer, "123"))
16149 return 1;
16150
16151 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16152 return 1;
16153
16154 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016155 return 1;
16156
16157 return 0;
16158}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016159
Thomas Wouters477c8d52006-05-27 19:21:47 +000016160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016161if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016162 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016163else
Matthias Kloseb9621712010-04-24 17:59:49 +000016164 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016168fi
16169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16172$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016173if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016174
Matthias Kloseb9621712010-04-24 17:59:49 +000016175$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016176
16177fi
16178
Matthias Kloseb9621712010-04-24 17:59:49 +000016179ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016180#ifdef HAVE_SYS_TYPES_H
16181#include <sys/types.h>
16182#endif
16183#ifdef HAVE_SYS_SOCKET_H
16184#include <sys/socket.h>
16185#endif
16186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187"
Victor Stinnere0be4232011-10-25 13:06:09 +020016188if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016189
Martin v. Löwis11437992002-04-12 09:54:03 +000016190else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016191
Matthias Kloseb9621712010-04-24 17:59:49 +000016192$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016193
16194fi
16195
Michael W. Hudson54241132001-12-07 15:38:26 +000016196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16198$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016199if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016201else
Matthias Kloseb9621712010-04-24 17:59:49 +000016202 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016203 ac_cv_broken_mbstowcs=no
16204else
Matthias Kloseb9621712010-04-24 17:59:49 +000016205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016206/* end confdefs.h. */
16207
Stefan Krah19c21392012-11-22 23:47:32 +010016208#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016209#include<stdlib.h>
16210int main() {
16211 size_t len = -1;
16212 const char *str = "text";
16213 len = mbstowcs(NULL, str, 0);
16214 return (len != 4);
16215}
16216
16217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016218if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016219 ac_cv_broken_mbstowcs=no
16220else
Matthias Kloseb9621712010-04-24 17:59:49 +000016221 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016225fi
16226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016227fi
16228
Matthias Kloseb9621712010-04-24 17:59:49 +000016229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16230$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016231if test "$ac_cv_broken_mbstowcs" = yes
16232then
16233
Matthias Kloseb9621712010-04-24 17:59:49 +000016234$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016235
16236fi
16237
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16240$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016241
16242# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016243if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016244 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016245if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016246then
16247
Matthias Kloseb9621712010-04-24 17:59:49 +000016248$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016249
Matthias Kloseb9621712010-04-24 17:59:49 +000016250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16251$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016253if test "$withval" = no
16254then
16255
16256$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16257
Matthias Kloseb9621712010-04-24 17:59:49 +000016258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16259$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016260fi
16261
Antoine Pitrou042b1282010-08-13 21:15:58 +000016262else
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16264$as_echo "no value specified" >&6; }
16265fi
16266
Antoine Pitroub52ec782009-01-25 16:34:23 +000016267
Matthias Kloseb17289e2012-03-15 19:51:34 +010016268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16269$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16270if ${ac_cv_computed_gotos+:} false; then :
16271 $as_echo_n "(cached) " >&6
16272else
16273 if test "$cross_compiling" = yes; then :
16274 if test "${with_computed_gotos+set}" = set; then
16275 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16276 else
16277 ac_cv_computed_gotos=no
16278 fi
16279else
16280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16281/* end confdefs.h. */
16282
16283int main(int argc, char **argv)
16284{
16285 static void *targets[1] = { &&LABEL1 };
16286 goto LABEL2;
16287LABEL1:
16288 return 0;
16289LABEL2:
16290 goto *targets[0];
16291 return 1;
16292}
16293
16294_ACEOF
16295if ac_fn_c_try_run "$LINENO"; then :
16296 ac_cv_computed_gotos=yes
16297else
16298 ac_cv_computed_gotos=no
16299fi
16300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16301 conftest.$ac_objext conftest.beam conftest.$ac_ext
16302fi
16303
16304fi
16305
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16307$as_echo "$ac_cv_computed_gotos" >&6; }
16308case "$ac_cv_computed_gotos" in yes*)
16309
16310$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16311
16312esac
16313
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016314case $ac_sys_system in
16315AIX*)
16316
16317$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16318 ;;
16319esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016320
Michael W. Hudson54241132001-12-07 15:38:26 +000016321
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016322
16323
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016324for h in `(cd $srcdir;echo Python/thread_*.h)`
16325do
16326 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16327done
16328
Michael W. Hudson54241132001-12-07 15:38:26 +000016329
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016330SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16332$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016333for dir in $SRCDIRS; do
16334 if test ! -d $dir; then
16335 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016336 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016337done
Matthias Kloseb9621712010-04-24 17:59:49 +000016338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16339$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016340
Stefan Krah1919b7e2012-03-21 18:25:23 +010016341# Availability of -O2:
16342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16343$as_echo_n "checking for -O2... " >&6; }
16344saved_cflags="$CFLAGS"
16345CFLAGS="-O2"
16346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16347/* end confdefs.h. */
16348
16349int
16350main ()
16351{
16352
16353
16354 ;
16355 return 0;
16356}
16357_ACEOF
16358if ac_fn_c_try_compile "$LINENO"; then :
16359 have_O2=yes
16360else
16361 have_O2=no
16362fi
16363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16365$as_echo "$have_O2" >&6; }
16366CFLAGS="$saved_cflags"
16367
16368# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16369# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16371$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16372saved_cflags="$CFLAGS"
16373CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16374if test "$have_O2" = no; then
16375 CFLAGS=""
16376fi
16377if test "$cross_compiling" = yes; then :
16378 have_glibc_memmove_bug=undefined
16379else
16380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16381/* end confdefs.h. */
16382
16383#include <stdio.h>
16384#include <stdlib.h>
16385#include <string.h>
16386void foo(void *p, void *q) { memmove(p, q, 19); }
16387int main() {
16388 char a[32] = "123456789000000000";
16389 foo(&a[9], a);
16390 if (strcmp(a, "123456789123456789000000000") != 0)
16391 return 1;
16392 foo(a, &a[9]);
16393 if (strcmp(a, "123456789000000000") != 0)
16394 return 1;
16395 return 0;
16396}
16397
16398_ACEOF
16399if ac_fn_c_try_run "$LINENO"; then :
16400 have_glibc_memmove_bug=no
16401else
16402 have_glibc_memmove_bug=yes
16403fi
16404rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16405 conftest.$ac_objext conftest.beam conftest.$ac_ext
16406fi
16407
16408CFLAGS="$saved_cflags"
16409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16410$as_echo "$have_glibc_memmove_bug" >&6; }
16411if test "$have_glibc_memmove_bug" = yes; then
16412
16413$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16414
16415fi
16416
16417if test "$have_gcc_asm_for_x87" = yes; then
16418 # Some versions of gcc miscompile inline asm:
16419 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16420 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16421 case $CC in
16422 *gcc*)
16423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16424$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16425 saved_cflags="$CFLAGS"
16426 CFLAGS="-O2"
16427 if test "$cross_compiling" = yes; then :
16428 have_ipa_pure_const_bug=undefined
16429else
16430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431/* end confdefs.h. */
16432
16433 __attribute__((noinline)) int
16434 foo(int *p) {
16435 int r;
16436 asm ( "movl \$6, (%1)\n\t"
16437 "xorl %0, %0\n\t"
16438 : "=r" (r) : "r" (p) : "memory"
16439 );
16440 return r;
16441 }
16442 int main() {
16443 int p = 8;
16444 if ((foo(&p) ? : p) != 6)
16445 return 1;
16446 return 0;
16447 }
16448
16449_ACEOF
16450if ac_fn_c_try_run "$LINENO"; then :
16451 have_ipa_pure_const_bug=no
16452else
16453 have_ipa_pure_const_bug=yes
16454fi
16455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16456 conftest.$ac_objext conftest.beam conftest.$ac_ext
16457fi
16458
16459 CFLAGS="$saved_cflags"
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16461$as_echo "$have_ipa_pure_const_bug" >&6; }
16462 if test "$have_ipa_pure_const_bug" = yes; then
16463
16464$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16465
16466 fi
16467 ;;
16468 esac
16469fi
16470
Victor Stinner4f5366e2015-01-09 02:13:19 +010016471# Check for stdatomic.h
16472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16473$as_echo_n "checking for stdatomic.h... " >&6; }
16474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16475/* end confdefs.h. */
16476
16477
16478 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016479 atomic_int value = ATOMIC_VAR_INIT(1);
16480 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016481 int main() {
16482 int loaded_value = atomic_load(&value);
16483 return 0;
16484 }
16485
16486
16487_ACEOF
16488if ac_fn_c_try_link "$LINENO"; then :
16489 have_stdatomic_h=yes
16490else
16491 have_stdatomic_h=no
16492fi
16493rm -f core conftest.err conftest.$ac_objext \
16494 conftest$ac_exeext conftest.$ac_ext
16495
16496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16497$as_echo "$have_stdatomic_h" >&6; }
16498
16499if test "$have_stdatomic_h" = yes; then
16500
16501$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16502
16503fi
16504
16505# Check for GCC >= 4.7 __atomic builtins
16506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16507$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509/* end confdefs.h. */
16510
16511
16512 volatile int val = 1;
16513 int main() {
16514 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16515 return 0;
16516 }
16517
16518
16519_ACEOF
16520if ac_fn_c_try_link "$LINENO"; then :
16521 have_builtin_atomic=yes
16522else
16523 have_builtin_atomic=no
16524fi
16525rm -f core conftest.err conftest.$ac_objext \
16526 conftest$ac_exeext conftest.$ac_ext
16527
16528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16529$as_echo "$have_builtin_atomic" >&6; }
16530
16531if test "$have_builtin_atomic" = yes; then
16532
16533$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16534
16535fi
16536
Ned Deily322f5ba2013-11-21 23:01:59 -080016537# ensurepip option
16538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16539$as_echo_n "checking for ensurepip... " >&6; }
16540
16541# Check whether --with-ensurepip was given.
16542if test "${with_ensurepip+set}" = set; then :
16543 withval=$with_ensurepip;
16544else
16545 with_ensurepip=upgrade
16546fi
16547
16548case $with_ensurepip in #(
16549 yes|upgrade) :
16550 ENSUREPIP=upgrade ;; #(
16551 install) :
16552 ENSUREPIP=install ;; #(
16553 no) :
16554 ENSUREPIP=no ;; #(
16555 *) :
16556 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16557esac
16558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16559$as_echo "$ENSUREPIP" >&6; }
16560
16561
Victor Stinner35a97c02015-03-08 02:59:09 +010016562# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16564$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16566/* end confdefs.h. */
16567
16568
16569 #include <dirent.h>
16570
16571 int main() {
16572 struct dirent entry;
16573 return entry.d_type == DT_UNKNOWN;
16574 }
16575
16576
16577_ACEOF
16578if ac_fn_c_try_link "$LINENO"; then :
16579 have_dirent_d_type=yes
16580else
16581 have_dirent_d_type=no
16582fi
16583rm -f core conftest.err conftest.$ac_objext \
16584 conftest$ac_exeext conftest.$ac_ext
16585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16586$as_echo "$have_dirent_d_type" >&6; }
16587
16588if test "$have_dirent_d_type" = yes; then
16589
16590$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16591
16592fi
16593
Victor Stinner9eb57c52015-03-19 22:21:49 +010016594# check if the Linux getrandom() syscall is available
16595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16596$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16598/* end confdefs.h. */
16599
16600
Victor Stinner1b80b242016-04-12 22:34:58 +020016601 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016602 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016603 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016604
16605 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016606 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016607 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016608 const int flags = GRND_NONBLOCK;
16609 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016610 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016611 return 0;
16612 }
16613
16614
16615_ACEOF
16616if ac_fn_c_try_link "$LINENO"; then :
16617 have_getrandom_syscall=yes
16618else
16619 have_getrandom_syscall=no
16620fi
16621rm -f core conftest.err conftest.$ac_objext \
16622 conftest$ac_exeext conftest.$ac_ext
16623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16624$as_echo "$have_getrandom_syscall" >&6; }
16625
16626if test "$have_getrandom_syscall" = yes; then
16627
16628$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16629
16630fi
16631
Victor Stinner3abf44e2015-09-18 15:38:37 +020016632# check if the getrandom() function is available
16633# the test was written for the Solaris function of <sys/random.h>
16634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16635$as_echo_n "checking for the getrandom() function... " >&6; }
16636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16637/* end confdefs.h. */
16638
16639
16640 #include <sys/random.h>
16641
16642 int main() {
16643 char buffer[1];
16644 const size_t buflen = sizeof(buffer);
16645 const int flags = 0;
16646 /* ignore the result, Python checks for ENOSYS at runtime */
16647 (void)getrandom(buffer, buflen, flags);
16648 return 0;
16649 }
16650
16651
16652_ACEOF
16653if ac_fn_c_try_link "$LINENO"; then :
16654 have_getrandom=yes
16655else
16656 have_getrandom=no
16657fi
16658rm -f core conftest.err conftest.$ac_objext \
16659 conftest$ac_exeext conftest.$ac_ext
16660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16661$as_echo "$have_getrandom" >&6; }
16662
16663if test "$have_getrandom" = yes; then
16664
16665$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16666
16667fi
16668
Guido van Rossum627b2d71993-12-24 10:39:16 +000016669# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016670ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016671
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016672ac_config_files="$ac_config_files Modules/ld_so_aix"
16673
Martin v. Löwis11437992002-04-12 09:54:03 +000016674cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016675# This file is a shell script that caches the results of configure
16676# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016677# scripts and configure runs, see configure's option --config-cache.
16678# It is not useful on other systems. If it contains results you don't
16679# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680#
Martin v. Löwis11437992002-04-12 09:54:03 +000016681# config.status only pays attention to the cache file if you give it
16682# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016683#
Skip Montanaro6dead952003-09-25 14:50:04 +000016684# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016685# loading this file, other *unset* `ac_cv_foo' will be assigned the
16686# following values.
16687
16688_ACEOF
16689
Guido van Rossumf78abae1997-01-21 22:02:36 +000016690# The following way of writing the cache mishandles newlines in values,
16691# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016693# Ultrix sh set writes to stderr and can't be redirected directly,
16694# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695(
16696 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16697 eval ac_val=\$$ac_var
16698 case $ac_val in #(
16699 *${as_nl}*)
16700 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016701 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16702$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703 esac
16704 case $ac_var in #(
16705 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016706 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16707 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708 esac ;;
16709 esac
16710 done
16711
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16714 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016715 # `set' does not quote correctly, so add quotes: double-quote
16716 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016718 "s/'/'\\\\''/g;
16719 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 *)
16722 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725 esac |
16726 sort
16727) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016728 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016729 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16733 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16735 :end' >>confcache
16736if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16737 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016738 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16740$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016741 if test ! -f "$cache_file" || test -h "$cache_file"; then
16742 cat confcache >"$cache_file"
16743 else
16744 case $cache_file in #(
16745 */* | ?:*)
16746 mv -f confcache "$cache_file"$$ &&
16747 mv -f "$cache_file"$$ "$cache_file" ;; #(
16748 *)
16749 mv -f confcache "$cache_file" ;;
16750 esac
16751 fi
16752 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016753 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016754 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16755$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016756 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016758rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016760test "x$prefix" = xNONE && prefix=$ac_default_prefix
16761# Let make expand exec_prefix.
16762test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016764DEFS=-DHAVE_CONFIG_H
16765
Skip Montanaro6dead952003-09-25 14:50:04 +000016766ac_libobjs=
16767ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016768U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016769for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16770 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016772 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16774 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016775 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16776 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016777done
16778LIBOBJS=$ac_libobjs
16779
16780LTLIBOBJS=$ac_ltlibobjs
16781
16782
Martin v. Löwis11437992002-04-12 09:54:03 +000016783
Matthias Kloseb9621712010-04-24 17:59:49 +000016784
Victor Stinnere0be4232011-10-25 13:06:09 +020016785: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016786ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016787ac_clean_files_save=$ac_clean_files
16788ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016789{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16790$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16791as_write_fail=0
16792cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016793#! $SHELL
16794# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016795# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016796# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016797# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016798
Martin v. Löwis11437992002-04-12 09:54:03 +000016799debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016800ac_cs_recheck=false
16801ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016802
Matthias Kloseb9621712010-04-24 17:59:49 +000016803SHELL=\${CONFIG_SHELL-$SHELL}
16804export SHELL
16805_ASEOF
16806cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16807## -------------------- ##
16808## M4sh Initialization. ##
16809## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811# Be more Bourne compatible
16812DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016813if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 emulate sh
16815 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016816 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016817 # is contrary to our usage. Disable this feature.
16818 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016820else
Matthias Kloseb9621712010-04-24 17:59:49 +000016821 case `(set -o) 2>/dev/null` in #(
16822 *posix*) :
16823 set -o posix ;; #(
16824 *) :
16825 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016826esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016827fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016828
16829
Matthias Kloseb9621712010-04-24 17:59:49 +000016830as_nl='
16831'
16832export as_nl
16833# Printing a long string crashes Solaris 7 /usr/bin/printf.
16834as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16835as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16836as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16837# Prefer a ksh shell builtin over an external printf program on Solaris,
16838# but without wasting forks for bash or zsh.
16839if test -z "$BASH_VERSION$ZSH_VERSION" \
16840 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16841 as_echo='print -r --'
16842 as_echo_n='print -rn --'
16843elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16844 as_echo='printf %s\n'
16845 as_echo_n='printf %s'
16846else
16847 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16848 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16849 as_echo_n='/usr/ucb/echo -n'
16850 else
16851 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16852 as_echo_n_body='eval
16853 arg=$1;
16854 case $arg in #(
16855 *"$as_nl"*)
16856 expr "X$arg" : "X\\(.*\\)$as_nl";
16857 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16858 esac;
16859 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16860 '
16861 export as_echo_n_body
16862 as_echo_n='sh -c $as_echo_n_body as_echo'
16863 fi
16864 export as_echo_body
16865 as_echo='sh -c $as_echo_body as_echo'
16866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016867
16868# The user is always right.
16869if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016870 PATH_SEPARATOR=:
16871 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16872 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16873 PATH_SEPARATOR=';'
16874 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877
16878# IFS
16879# We need space, tab and new line, in precisely that order. Quoting is
16880# there to prevent editors from complaining about space-tab.
16881# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16882# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883IFS=" "" $as_nl"
16884
16885# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016886as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016887case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888 *[\\/]* ) as_myself=$0 ;;
16889 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016890for as_dir in $PATH
16891do
16892 IFS=$as_save_IFS
16893 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016894 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16895 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016898 ;;
16899esac
16900# We did not find ourselves, most probably we were run as `sh COMMAND'
16901# in which case we are not to be found in the path.
16902if test "x$as_myself" = x; then
16903 as_myself=$0
16904fi
16905if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016906 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16907 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908fi
16909
Matthias Kloseb9621712010-04-24 17:59:49 +000016910# Unset variables that we do not need and which cause bugs (e.g. in
16911# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16912# suppresses any "Segmentation fault" message there. '((' could
16913# trigger a bug in pdksh 5.2.14.
16914for as_var in BASH_ENV ENV MAIL MAILPATH
16915do eval test x\${$as_var+set} = xset \
16916 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917done
16918PS1='$ '
16919PS2='> '
16920PS4='+ '
16921
16922# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016923LC_ALL=C
16924export LC_ALL
16925LANGUAGE=C
16926export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927
Matthias Kloseb9621712010-04-24 17:59:49 +000016928# CDPATH.
16929(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16930
16931
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016932# as_fn_error STATUS ERROR [LINENO LOG_FD]
16933# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016934# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16935# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016936# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016937as_fn_error ()
16938{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016939 as_status=$1; test $as_status -eq 0 && as_status=1
16940 if test "$4"; then
16941 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16942 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016943 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016944 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016945 as_fn_exit $as_status
16946} # as_fn_error
16947
16948
16949# as_fn_set_status STATUS
16950# -----------------------
16951# Set $? to STATUS, without forking.
16952as_fn_set_status ()
16953{
16954 return $1
16955} # as_fn_set_status
16956
16957# as_fn_exit STATUS
16958# -----------------
16959# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16960as_fn_exit ()
16961{
16962 set +e
16963 as_fn_set_status $1
16964 exit $1
16965} # as_fn_exit
16966
16967# as_fn_unset VAR
16968# ---------------
16969# Portably unset VAR.
16970as_fn_unset ()
16971{
16972 { eval $1=; unset $1;}
16973}
16974as_unset=as_fn_unset
16975# as_fn_append VAR VALUE
16976# ----------------------
16977# Append the text in VALUE to the end of the definition contained in VAR. Take
16978# advantage of any shell optimizations that allow amortized linear growth over
16979# repeated appends, instead of the typical quadratic growth present in naive
16980# implementations.
16981if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16982 eval 'as_fn_append ()
16983 {
16984 eval $1+=\$2
16985 }'
16986else
16987 as_fn_append ()
16988 {
16989 eval $1=\$$1\$2
16990 }
16991fi # as_fn_append
16992
16993# as_fn_arith ARG...
16994# ------------------
16995# Perform arithmetic evaluation on the ARGs, and store the result in the
16996# global $as_val. Take advantage of shells that can avoid forks. The arguments
16997# must be portable across $(()) and expr.
16998if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16999 eval 'as_fn_arith ()
17000 {
17001 as_val=$(( $* ))
17002 }'
17003else
17004 as_fn_arith ()
17005 {
17006 as_val=`expr "$@" || test $? -eq 1`
17007 }
17008fi # as_fn_arith
17009
17010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011if expr a : '\(a\)' >/dev/null 2>&1 &&
17012 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17013 as_expr=expr
17014else
17015 as_expr=false
17016fi
17017
17018if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17019 as_basename=basename
17020else
17021 as_basename=false
17022fi
17023
Matthias Kloseb9621712010-04-24 17:59:49 +000017024if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17025 as_dirname=dirname
17026else
17027 as_dirname=false
17028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017030as_me=`$as_basename -- "$0" ||
17031$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17032 X"$0" : 'X\(//\)$' \| \
17033 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017034$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 sed '/^.*\/\([^/][^/]*\)\/*$/{
17036 s//\1/
17037 q
17038 }
17039 /^X\/\(\/\/\)$/{
17040 s//\1/
17041 q
17042 }
17043 /^X\/\(\/\).*/{
17044 s//\1/
17045 q
17046 }
17047 s/.*/./; q'`
17048
Matthias Kloseb9621712010-04-24 17:59:49 +000017049# Avoid depending upon Character Ranges.
17050as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17051as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17052as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17053as_cr_digits='0123456789'
17054as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055
17056ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017057case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017059 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 xy) ECHO_C='\c';;
17062 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17063 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064 esac;;
17065*)
17066 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017068
Martin v. Löwis11437992002-04-12 09:54:03 +000017069rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070if test -d conf$$.dir; then
17071 rm -f conf$$.dir/conf$$.file
17072else
17073 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017074 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017076if (echo >conf$$.file) 2>/dev/null; then
17077 if ln -s conf$$.file conf$$ 2>/dev/null; then
17078 as_ln_s='ln -s'
17079 # ... but there are two gotchas:
17080 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17081 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017082 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017084 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 elif ln conf$$.file conf$$ 2>/dev/null; then
17086 as_ln_s=ln
17087 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017088 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017090else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017091 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17094rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017095
Matthias Kloseb9621712010-04-24 17:59:49 +000017096
17097# as_fn_mkdir_p
17098# -------------
17099# Create "$as_dir" as a directory, including parents if necessary.
17100as_fn_mkdir_p ()
17101{
17102
17103 case $as_dir in #(
17104 -*) as_dir=./$as_dir;;
17105 esac
17106 test -d "$as_dir" || eval $as_mkdir_p || {
17107 as_dirs=
17108 while :; do
17109 case $as_dir in #(
17110 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17111 *) as_qdir=$as_dir;;
17112 esac
17113 as_dirs="'$as_qdir' $as_dirs"
17114 as_dir=`$as_dirname -- "$as_dir" ||
17115$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17116 X"$as_dir" : 'X\(//\)[^/]' \| \
17117 X"$as_dir" : 'X\(//\)$' \| \
17118 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17119$as_echo X"$as_dir" |
17120 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17121 s//\1/
17122 q
17123 }
17124 /^X\(\/\/\)[^/].*/{
17125 s//\1/
17126 q
17127 }
17128 /^X\(\/\/\)$/{
17129 s//\1/
17130 q
17131 }
17132 /^X\(\/\).*/{
17133 s//\1/
17134 q
17135 }
17136 s/.*/./; q'`
17137 test -d "$as_dir" && break
17138 done
17139 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017140 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017141
17142
17143} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017144if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017145 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017146else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017147 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017148 as_mkdir_p=false
17149fi
17150
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017151
17152# as_fn_executable_p FILE
17153# -----------------------
17154# Test if FILE is an executable regular file.
17155as_fn_executable_p ()
17156{
17157 test -f "$1" && test -x "$1"
17158} # as_fn_executable_p
17159as_test_x='test -x'
17160as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017161
17162# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017163as_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 +000017164
17165# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017166as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017167
17168
Martin v. Löwis11437992002-04-12 09:54:03 +000017169exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017170## ----------------------------------- ##
17171## Main body of $CONFIG_STATUS script. ##
17172## ----------------------------------- ##
17173_ASEOF
17174test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17177# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017178# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179# values after options handling.
17180ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017181This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017182generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
17184 CONFIG_FILES = $CONFIG_FILES
17185 CONFIG_HEADERS = $CONFIG_HEADERS
17186 CONFIG_LINKS = $CONFIG_LINKS
17187 CONFIG_COMMANDS = $CONFIG_COMMANDS
17188 $ $0 $@
17189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190on `(hostname || uname -n) 2>/dev/null | sed 1q`
17191"
17192
Martin v. Löwis11437992002-04-12 09:54:03 +000017193_ACEOF
17194
Matthias Kloseb9621712010-04-24 17:59:49 +000017195case $ac_config_files in *"
17196"*) set x $ac_config_files; shift; ac_config_files=$*;;
17197esac
17198
17199case $ac_config_headers in *"
17200"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17201esac
17202
17203
17204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017205# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017206config_files="$ac_config_files"
17207config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017210
Matthias Kloseb9621712010-04-24 17:59:49 +000017211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017212ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017213\`$as_me' instantiates files and other configuration actions
17214from templates according to the current configuration. Unless the files
17215and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017216
Matthias Kloseb9621712010-04-24 17:59:49 +000017217Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017218
17219 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017221 --config print configuration, then exit
17222 -q, --quiet, --silent
17223 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017224 -d, --debug don't remove temporary files
17225 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017226 --file=FILE[:TEMPLATE]
17227 instantiate the configuration file FILE
17228 --header=FILE[:TEMPLATE]
17229 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017230
17231Configuration files:
17232$config_files
17233
17234Configuration headers:
17235$config_headers
17236
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017237Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17241ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017242ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017243python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017244configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017245 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017246
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017247Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017248This config.status script is free software; the Free Software Foundation
17249gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250
17251ac_pwd='$ac_pwd'
17252srcdir='$srcdir'
17253INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017254MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017255test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017256_ACEOF
17257
Matthias Kloseb9621712010-04-24 17:59:49 +000017258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17259# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017260ac_need_defaults=:
17261while test $# != 0
17262do
17263 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017264 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17266 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017267 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017268 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017269 --*=)
17270 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17271 ac_optarg=
17272 ac_shift=:
17273 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017275 ac_option=$1
17276 ac_optarg=$2
17277 ac_shift=shift
17278 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 esac
17280
Skip Montanaro6dead952003-09-25 14:50:04 +000017281 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017283 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17284 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017286 $as_echo "$ac_cs_version"; exit ;;
17287 --config | --confi | --conf | --con | --co | --c )
17288 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 debug=: ;;
17291 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017292 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017293 case $ac_optarg in
17294 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017295 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017296 esac
17297 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017298 ac_need_defaults=false;;
17299 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017300 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017301 case $ac_optarg in
17302 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17303 esac
17304 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306 --he | --h)
17307 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017308 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017309Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017311 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017312 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17313 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17314 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017315
17316 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017317 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017318Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017319
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017322
17323 esac
17324 shift
17325done
17326
Skip Montanaro6dead952003-09-25 14:50:04 +000017327ac_configure_extra_args=
17328
17329if $ac_cs_silent; then
17330 exec 6>/dev/null
17331 ac_configure_extra_args="$ac_configure_extra_args --silent"
17332fi
17333
17334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017336if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017337 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017338 shift
17339 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17340 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017342 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017343fi
17344
Martin v. Löwis11437992002-04-12 09:54:03 +000017345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017346cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347exec 5>>config.log
17348{
17349 echo
17350 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17351## Running $as_me. ##
17352_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017353 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017359
Matthias Kloseb9621712010-04-24 17:59:49 +000017360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361
17362# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017363for ac_config_target in $ac_config_targets
17364do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 case $ac_config_target in
17366 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17367 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17368 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017369 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17370 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017372 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017373 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017374 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375
Victor Stinnere0be4232011-10-25 13:06:09 +020017376 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017377 esac
17378done
17379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380
Martin v. Löwis11437992002-04-12 09:54:03 +000017381# If the user did not use the arguments to specify the items to instantiate,
17382# then the envvar interface is used. Set only those that are not.
17383# We use the long form for the default assignment because of an extremely
17384# bizarre bug on SunOS 4.1.3.
17385if $ac_need_defaults; then
17386 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17387 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17388fi
17389
Skip Montanaro6dead952003-09-25 14:50:04 +000017390# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017392# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393# Hook for its removal unless debugging.
17394# Note that there is a small window in which the directory will not be cleaned:
17395# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017396$debug ||
17397{
Victor Stinnere0be4232011-10-25 13:06:09 +020017398 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017400 : "${ac_tmp:=$tmp}"
17401 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017404}
Martin v. Löwis11437992002-04-12 09:54:03 +000017405# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017406
Martin v. Löwis11437992002-04-12 09:54:03 +000017407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017409 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017410} ||
17411{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412 tmp=./conf$$-$RANDOM
17413 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017414} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017415ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017416
Matthias Kloseb9621712010-04-24 17:59:49 +000017417# Set up the scripts for CONFIG_FILES section.
17418# No need to generate them if there are no CONFIG_FILES.
17419# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422
17423ac_cr=`echo X | tr X '\015'`
17424# On cygwin, bash can eat \r inside `` if the user requested igncr.
17425# But we know of no other shell where ac_cr would be empty at this
17426# point, so we can use a bashism as a fallback.
17427if test "x$ac_cr" = x; then
17428 eval ac_cr=\$\'\\r\'
17429fi
17430ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17431if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017432 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017433else
17434 ac_cs_awk_cr=$ac_cr
17435fi
17436
Victor Stinnere0be4232011-10-25 13:06:09 +020017437echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017438_ACEOF
17439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017440
Matthias Kloseb9621712010-04-24 17:59:49 +000017441{
17442 echo "cat >conf$$subs.awk <<_ACEOF" &&
17443 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17444 echo "_ACEOF"
17445} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017446 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17447ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448ac_delim='%!_!# '
17449for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017450 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017451 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452
Matthias Kloseb9621712010-04-24 17:59:49 +000017453 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17454 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 break
17456 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017457 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458 else
17459 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017460 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461done
Matthias Kloseb9621712010-04-24 17:59:49 +000017462rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463
Matthias Kloseb9621712010-04-24 17:59:49 +000017464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017465cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017467sed -n '
17468h
17469s/^/S["/; s/!.*/"]=/
17470p
17471g
17472s/^[^!]*!//
17473:repl
17474t repl
17475s/'"$ac_delim"'$//
17476t delim
17477:nl
17478h
17479s/\(.\{148\}\)..*/\1/
17480t more1
17481s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17482p
17483n
17484b repl
17485:more1
17486s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17487p
17488g
17489s/.\{148\}//
17490t nl
17491:delim
17492h
17493s/\(.\{148\}\)..*/\1/
17494t more2
17495s/["\\]/\\&/g; s/^/"/; s/$/"/
17496p
17497b
17498:more2
17499s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17500p
17501g
17502s/.\{148\}//
17503t delim
17504' <conf$$subs.awk | sed '
17505/^[^""]/{
17506 N
17507 s/\n//
17508}
17509' >>$CONFIG_STATUS || ac_write_fail=1
17510rm -f conf$$subs.awk
17511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17512_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017513cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 for (key in S) S_is_set[key] = 1
17515 FS = ""
17516
17517}
17518{
17519 line = $ 0
17520 nfields = split(line, field, "@")
17521 substed = 0
17522 len = length(field[1])
17523 for (i = 2; i < nfields; i++) {
17524 key = field[i]
17525 keylen = length(key)
17526 if (S_is_set[key]) {
17527 value = S[key]
17528 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17529 len += length(value) + length(field[++i])
17530 substed = 1
17531 } else
17532 len += 1 + keylen
17533 }
17534
17535 print line
17536}
17537
17538_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017540cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17541if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17542 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17543else
17544 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017545fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017546 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017547_ACEOF
17548
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017549# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17550# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551# trailing colons and then remove the whole line if VPATH becomes empty
17552# (actually we leave an empty line to preserve line numbers).
17553if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017554 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17555h
17556s///
17557s/^/:/
17558s/[ ]*$/:/
17559s/:\$(srcdir):/:/g
17560s/:\${srcdir}:/:/g
17561s/:@srcdir@:/:/g
17562s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017564x
17565s/\(=[ ]*\).*/\1/
17566G
17567s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568s/^[^=]*=[ ]*$//
17569}'
17570fi
17571
Matthias Kloseb9621712010-04-24 17:59:49 +000017572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573fi # test -n "$CONFIG_FILES"
17574
Matthias Kloseb9621712010-04-24 17:59:49 +000017575# Set up the scripts for CONFIG_HEADERS section.
17576# No need to generate them if there are no CONFIG_HEADERS.
17577# This happens for instance with `./config.status Makefile'.
17578if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017579cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017580BEGIN {
17581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582
Matthias Kloseb9621712010-04-24 17:59:49 +000017583# Transform confdefs.h into an awk script `defines.awk', embedded as
17584# here-document in config.status, that substitutes the proper values into
17585# config.h.in to produce config.h.
17586
17587# Create a delimiter string that does not exist in confdefs.h, to ease
17588# handling of long lines.
17589ac_delim='%!_!# '
17590for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017591 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17592 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017593 break
17594 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017595 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017596 else
17597 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17598 fi
17599done
17600
17601# For the awk script, D is an array of macro values keyed by name,
17602# likewise P contains macro parameters if any. Preserve backslash
17603# newline sequences.
17604
17605ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17606sed -n '
17607s/.\{148\}/&'"$ac_delim"'/g
17608t rset
17609:rset
17610s/^[ ]*#[ ]*define[ ][ ]*/ /
17611t def
17612d
17613:def
17614s/\\$//
17615t bsnl
17616s/["\\]/\\&/g
17617s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17618D["\1"]=" \3"/p
17619s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17620d
17621:bsnl
17622s/["\\]/\\&/g
17623s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17624D["\1"]=" \3\\\\\\n"\\/p
17625t cont
17626s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17627t cont
17628d
17629:cont
17630n
17631s/.\{148\}/&'"$ac_delim"'/g
17632t clear
17633:clear
17634s/\\$//
17635t bsnlc
17636s/["\\]/\\&/g; s/^/"/; s/$/"/p
17637d
17638:bsnlc
17639s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17640b cont
17641' <confdefs.h | sed '
17642s/'"$ac_delim"'/"\\\
17643"/g' >>$CONFIG_STATUS || ac_write_fail=1
17644
17645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17646 for (key in D) D_is_set[key] = 1
17647 FS = ""
17648}
17649/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17650 line = \$ 0
17651 split(line, arg, " ")
17652 if (arg[1] == "#") {
17653 defundef = arg[2]
17654 mac1 = arg[3]
17655 } else {
17656 defundef = substr(arg[1], 2)
17657 mac1 = arg[2]
17658 }
17659 split(mac1, mac2, "(") #)
17660 macro = mac2[1]
17661 prefix = substr(line, 1, index(line, defundef) - 1)
17662 if (D_is_set[macro]) {
17663 # Preserve the white space surrounding the "#".
17664 print prefix "define", macro P[macro] D[macro]
17665 next
17666 } else {
17667 # Replace #undef with comments. This is necessary, for example,
17668 # in the case of _POSIX_SOURCE, which is predefined and required
17669 # on some systems where configure will not decide to define it.
17670 if (defundef == "undef") {
17671 print "/*", prefix defundef, macro, "*/"
17672 next
17673 }
17674 }
17675}
17676{ print }
17677_ACAWK
17678_ACEOF
17679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017680 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017681fi # test -n "$CONFIG_HEADERS"
17682
17683
17684eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17685shift
17686for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687do
17688 case $ac_tag in
17689 :[FHLC]) ac_mode=$ac_tag; continue;;
17690 esac
17691 case $ac_mode$ac_tag in
17692 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017693 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 :[FH]-) ac_tag=-:-;;
17695 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17696 esac
17697 ac_save_IFS=$IFS
17698 IFS=:
17699 set x $ac_tag
17700 IFS=$ac_save_IFS
17701 shift
17702 ac_file=$1
17703 shift
17704
17705 case $ac_mode in
17706 :L) ac_source=$1;;
17707 :[FH])
17708 ac_file_inputs=
17709 for ac_f
17710 do
17711 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017712 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713 *) # Look for the file first in the build tree, then in the source tree
17714 # (if the path is not absolute). The absolute path cannot be DOS-style,
17715 # because $ac_f cannot contain `:'.
17716 test -f "$ac_f" ||
17717 case $ac_f in
17718 [\\/$]*) false;;
17719 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17720 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017721 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017723 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17724 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 done
17726
17727 # Let's still pretend it is `configure' which instantiates (i.e., don't
17728 # use $as_me), people would be surprised to read:
17729 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 configure_input='Generated from '`
17731 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17732 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 if test x"$ac_file" != x-; then
17734 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017735 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17736$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 # Neutralize special characters interpreted by sed in replacement strings.
17739 case $configure_input in #(
17740 *\&* | *\|* | *\\* )
17741 ac_sed_conf_input=`$as_echo "$configure_input" |
17742 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17743 *) ac_sed_conf_input=$configure_input;;
17744 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745
17746 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017747 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17748 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749 esac
17750 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 esac
17752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017754$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017755 X"$ac_file" : 'X\(//\)[^/]' \| \
17756 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017758$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17760 s//\1/
17761 q
17762 }
17763 /^X\(\/\/\)[^/].*/{
17764 s//\1/
17765 q
17766 }
17767 /^X\(\/\/\)$/{
17768 s//\1/
17769 q
17770 }
17771 /^X\(\/\).*/{
17772 s//\1/
17773 q
17774 }
17775 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017776 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017777 ac_builddir=.
17778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779case "$ac_dir" in
17780.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17781*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017782 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017784 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785 case $ac_top_builddir_sub in
17786 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17787 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17788 esac ;;
17789esac
17790ac_abs_top_builddir=$ac_pwd
17791ac_abs_builddir=$ac_pwd$ac_dir_suffix
17792# for backward compatibility:
17793ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
17795case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017797 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798 ac_top_srcdir=$ac_top_builddir_sub
17799 ac_abs_top_srcdir=$ac_pwd ;;
17800 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017801 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802 ac_top_srcdir=$srcdir
17803 ac_abs_top_srcdir=$srcdir ;;
17804 *) # Relative name.
17805 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17806 ac_top_srcdir=$ac_top_build_prefix$srcdir
17807 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017808esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017810
Martin v. Löwis11437992002-04-12 09:54:03 +000017811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017812 case $ac_mode in
17813 :F)
17814 #
17815 # CONFIG_FILE
17816 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017817
17818 case $INSTALL in
17819 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017821 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017822 ac_MKDIR_P=$MKDIR_P
17823 case $MKDIR_P in
17824 [\\/$]* | ?:[\\/]* ) ;;
17825 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17826 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017827_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828
Matthias Kloseb9621712010-04-24 17:59:49 +000017829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830# If the template does not know about datarootdir, expand it.
17831# FIXME: This hack should be removed a few years after 2.60.
17832ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017833ac_sed_dataroot='
17834/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835 p
17836 q
17837}
17838/@datadir@/p
17839/@docdir@/p
17840/@infodir@/p
17841/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017842/@mandir@/p'
17843case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844*datarootdir*) ac_datarootdir_seen=yes;;
17845*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17847$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850 ac_datarootdir_hack='
17851 s&@datadir@&$datadir&g
17852 s&@docdir@&$docdir&g
17853 s&@infodir@&$infodir&g
17854 s&@localedir@&$localedir&g
17855 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017856 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857esac
17858_ACEOF
17859
17860# Neutralize VPATH when `$srcdir' = `.'.
17861# Shell code in configure.ac might set extrasub.
17862# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17864ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017865$extrasub
17866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017868:t
17869/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017870s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017872s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873s&@srcdir@&$ac_srcdir&;t t
17874s&@abs_srcdir@&$ac_abs_srcdir&;t t
17875s&@top_srcdir@&$ac_top_srcdir&;t t
17876s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17877s&@builddir@&$ac_builddir&;t t
17878s&@abs_builddir@&$ac_abs_builddir&;t t
17879s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17880s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017881s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017883"
Victor Stinnere0be4232011-10-25 13:06:09 +020017884eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17885 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017888 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17889 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17890 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017892which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017893$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017894which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017895
Victor Stinnere0be4232011-10-25 13:06:09 +020017896 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017898 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17899 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017901 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 ;;
17903 :H)
17904 #
17905 # CONFIG_HEADER
17906 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 {
17909 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017910 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17911 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017912 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017913 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017914 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17915$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017916 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017917 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017918 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017919 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017920 fi
17921 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017922 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017923 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017924 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017925 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928
17929 esac
17930
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017931
17932 case $ac_file$ac_mode in
17933 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17934
17935 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017936done # for ac_tag
17937
Guido van Rossum627b2d71993-12-24 10:39:16 +000017938
Matthias Kloseb9621712010-04-24 17:59:49 +000017939as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017940_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017941ac_clean_files=$ac_clean_files_save
17942
Matthias Kloseb9621712010-04-24 17:59:49 +000017943test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017944 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017945
Martin v. Löwis11437992002-04-12 09:54:03 +000017946
17947# configure is writing to config.log, and then calls config.status.
17948# config.status does its own redirection, appending to config.log.
17949# Unfortunately, on DOS this fails, as config.log is still kept open
17950# by configure, so config.status won't be able to write to it; its
17951# output is simply discarded. So we exec the FD to /dev/null,
17952# effectively closing config.log, so it can be properly (re)opened and
17953# appended to by config.status. When coming back to configure, we
17954# need to make the FD available again.
17955if test "$no_create" != yes; then
17956 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017957 ac_config_status_args=
17958 test "$silent" = yes &&
17959 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017961 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 exec 5>>config.log
17963 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17964 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017965 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017966fi
17967if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17969$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017970fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017971
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017972
Christian Heimes75ed8902013-11-20 01:11:18 +010017973echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017974if test ! -f Modules/Setup
17975then
17976 cp $srcdir/Modules/Setup.dist Modules/Setup
17977fi
17978
Christian Heimes75ed8902013-11-20 01:11:18 +010017979echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017980if test ! -f Modules/Setup.local
17981then
17982 echo "# Edit this file for local setup changes" >Modules/Setup.local
17983fi
17984
Christian Heimes75ed8902013-11-20 01:11:18 +010017985echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017986$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017987 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017988 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017989mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017990
17991if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17992 echo "" >&6
17993 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017994 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 +000017995 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017996 echo "" >&6
17997 echo "" >&6
17998fi
17999