blob: 20d8095c252ddedb73549ae2d709667baa6c1e10 [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
Rob Boehne9d25bd12017-12-06 11:58:17 -06009127 LDSHARED='$(CC) -b'
9128 LDCXXSHARED='$(CXX) -shared'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009129 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009130 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009131 LDSHARED='$(CC) -bundle'
9132 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009133 if test "$enable_framework" ; then
9134 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009135 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9136 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009137 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009138 else
9139 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009140 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009141 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009142 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009143 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009144 LDSHARED='$(CC) -bundle'
9145 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009146 if test "$enable_framework" ; then
9147 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009148 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9149 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009150 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009151 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009152 # No framework, use the Python app as bundle-loader
9153 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009154 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009155 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009156 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009157 Darwin/*)
9158 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9159 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009160
Ned Deily36820b62014-06-25 13:44:22 -07009161 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9162 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9163 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9164 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9165 if test ${dep_target_major} -eq 10 && \
9166 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009167 then
Ned Deily36820b62014-06-25 13:44:22 -07009168 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED='$(CC) -bundle'
9170 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009171 if test "$enable_framework" ; then
9172 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009173 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9174 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009176 else
9177 # No framework, use the Python app as bundle-loader
9178 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9179 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009180 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 fi
Ned Deily36820b62014-06-25 13:44:22 -07009182 else
9183 # building for OS X 10.3 and later
9184 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9185 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9186 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009187 fi
9188 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009189 Linux*|GNU*|QNX*)
9190 LDSHARED='$(CC) -shared'
9191 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009192 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009193 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009194 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009195 LDSHARED='$(CC) -shared'
9196 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009197 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009198 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009199 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009200 OpenBSD*)
9201 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9202 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009203 LDSHARED='$(CC) -shared $(CCSHARED)'
9204 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009205 else
9206 case `uname -r` in
9207 [01].* | 2.[0-7] | 2.[0-7].*)
9208 LDSHARED="ld -Bshareable ${LDFLAGS}"
9209 ;;
9210 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009211 LDSHARED='$(CC) -shared $(CCSHARED)'
9212 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009213 ;;
9214 esac
9215 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009216 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009217 LDSHARED='$(CC) -shared'
9218 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009219 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009220 if test "$GCC" = "yes" ; then
9221 LDSHARED='$(CC) -shared'
9222 LDCXXSHARED='$(CXX) -shared'
9223 else
9224 LDSHARED='$(CC) -G'
9225 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009226 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 SCO_SV*)
9228 LDSHARED='$(CC) -Wl,-G,-Bexport'
9229 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9230 CYGWIN*)
9231 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9232 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009233 *) LDSHARED="ld";;
9234 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9237$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009238LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009239BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009241# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9243$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009244if test -z "$CCSHARED"
9245then
Guido van Rossum07397971997-04-29 21:49:50 +00009246 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009247 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009248 then CCSHARED="-fPIC";
9249 elif test `uname -p` = sparc;
9250 then CCSHARED="-xcode=pic32";
9251 else CCSHARED="-Kpic";
9252 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009253 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009254 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009255 else CCSHARED="+z";
9256 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009257 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009258 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009259 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009261 if test "$GCC" = "yes"
9262 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009263 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009264 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009265 SCO_SV*)
9266 if test "$GCC" = "yes"
9267 then CCSHARED="-fPIC"
9268 else CCSHARED="-Kpic -belf"
9269 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009270 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9273$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009275# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9277$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278if test -z "$LINKFORSHARED"
9279then
Guido van Rossum07397971997-04-29 21:49:50 +00009280 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009281 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009282 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009283 LINKFORSHARED="-Wl,-E -Wl,+s";;
9284# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009285 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009286 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009289 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009290
9291 # Issue #18075: the default maximum stack size (8MBytes) is too
9292 # small for the default recursion limit. Increase the stack size
9293 # to ensure that tests don't crash
9294 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9295
Jack Jansene578a632001-08-15 01:27:14 +00009296 if test "$enable_framework"
9297 then
Jack Jansenda49e192005-01-07 13:08:22 +00009298 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009299 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009300 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009301 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009302 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009303 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009304 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009305 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9306 then
9307 LINKFORSHARED="-Wl,--export-dynamic"
9308 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009309 SunOS/5*) case $CC in
9310 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009311 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009312 then
9313 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009314 fi;;
9315 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009316 CYGWIN*)
9317 if test $enable_shared = "no"
9318 then
9319 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9320 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009321 QNX*)
9322 # -Wl,-E causes the symbols to be added to the dynamic
9323 # symbol table so that they can be found when a module
9324 # is loaded. -N 2048K causes the stack size to be set
9325 # to 2048 kilobytes so that the stack doesn't overflow
9326 # when running test_compile.py.
9327 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9331$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009332
Michael W. Hudson54241132001-12-07 15:38:26 +00009333
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9336$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009337if test ! "$LIBRARY" = "$LDLIBRARY"
9338then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009339 case $ac_sys_system in
9340 CYGWIN*)
9341 # Cygwin needs CCSHARED when building extension DLLs
9342 # but not when building the interpreter DLL.
9343 CFLAGSFORSHARED='';;
9344 *)
9345 CFLAGSFORSHARED='$(CCSHARED)'
9346 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9349$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009350
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009351# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9352# library (with --enable-shared).
9353# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009354# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9355# if it is not required, since it creates a dependency of the shared library
9356# to LIBS. This, in turn, means that applications linking the shared libpython
9357# don't need to link LIBS explicitly. The default should be only changed
9358# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009359
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9361$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009362case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009363 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009364 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009365esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9367$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009368
9369
Guido van Rossum627b2d71993-12-24 10:39:16 +00009370# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9372$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009373if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009374 $as_echo_n "(cached) " >&6
9375else
9376 ac_check_lib_save_LIBS=$LIBS
9377LIBS="-lsendfile $LIBS"
9378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9379/* end confdefs.h. */
9380
9381/* Override any GCC internal prototype to avoid an error.
9382 Use char because int might match the return type of a GCC
9383 builtin and then its argument prototype would still apply. */
9384#ifdef __cplusplus
9385extern "C"
9386#endif
9387char sendfile ();
9388int
9389main ()
9390{
9391return sendfile ();
9392 ;
9393 return 0;
9394}
9395_ACEOF
9396if ac_fn_c_try_link "$LINENO"; then :
9397 ac_cv_lib_sendfile_sendfile=yes
9398else
9399 ac_cv_lib_sendfile_sendfile=no
9400fi
9401rm -f core conftest.err conftest.$ac_objext \
9402 conftest$ac_exeext conftest.$ac_ext
9403LIBS=$ac_check_lib_save_LIBS
9404fi
9405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9406$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009407if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009408 cat >>confdefs.h <<_ACEOF
9409#define HAVE_LIBSENDFILE 1
9410_ACEOF
9411
9412 LIBS="-lsendfile $LIBS"
9413
9414fi
9415
Matthias Kloseb9621712010-04-24 17:59:49 +00009416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9417$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009418if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009420else
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009422LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426/* Override any GCC internal prototype to avoid an error.
9427 Use char because int might match the return type of a GCC
9428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009429#ifdef __cplusplus
9430extern "C"
9431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009432char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009433int
9434main ()
9435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ;
9438 return 0;
9439}
9440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443else
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009446rm -f core conftest.err conftest.$ac_objext \
9447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009448LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9451$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009452if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 cat >>confdefs.h <<_ACEOF
9454#define HAVE_LIBDL 1
9455_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009456
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009457 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009458
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009459fi
9460 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9462$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009463if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009465else
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009467LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471/* Override any GCC internal prototype to avoid an error.
9472 Use char because int might match the return type of a GCC
9473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009474#ifdef __cplusplus
9475extern "C"
9476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009477char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009478int
9479main ()
9480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 ;
9483 return 0;
9484}
9485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009488else
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009491rm -f core conftest.err conftest.$ac_objext \
9492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9496$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009497if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 cat >>confdefs.h <<_ACEOF
9499#define HAVE_LIBDLD 1
9500_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009501
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009502 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009504fi
9505 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009506
Berker Peksag9a10ff42017-11-08 23:09:16 +03009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9508$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9510/* end confdefs.h. */
9511#include <uuid/uuid.h>
9512int
9513main ()
9514{
9515
9516#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009517void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009518#endif
9519
9520 ;
9521 return 0;
9522}
9523_ACEOF
9524if ac_fn_c_try_compile "$LINENO"; then :
9525
9526$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9527
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9529$as_echo "yes" >&6; }
9530else
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9532$as_echo "no" >&6; }
9533
9534fi
9535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9536
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009537# 'Real Time' functions on Solaris
9538# posix4 on Solaris 2.6
9539# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009541$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009544else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009545 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549/* Override any GCC internal prototype to avoid an error.
9550 Use char because int might match the return type of a GCC
9551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552#ifdef __cplusplus
9553extern "C"
9554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009555char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009556int
9557main ()
9558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 ;
9561 return 0;
9562}
9563_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564for ac_lib in '' pthread rt posix4; do
9565 if test -z "$ac_lib"; then
9566 ac_res="none required"
9567 else
9568 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009569 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574rm -f core conftest.err conftest.$ac_objext \
9575 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009576 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579done
Victor Stinnere0be4232011-10-25 13:06:09 +02009580if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009582else
9583 ac_cv_search_sem_init=no
9584fi
9585rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009586LIBS=$ac_func_search_save_LIBS
9587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9589$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009591if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009593
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009594fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009595
Martin v. Löwis519adae2003-09-20 10:47:47 +00009596
Martin v. Löwis19d17342003-06-14 21:03:05 +00009597# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9599$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009602else
9603 ac_check_lib_save_LIBS=$LIBS
9604LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608/* Override any GCC internal prototype to avoid an error.
9609 Use char because int might match the return type of a GCC
9610 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009611#ifdef __cplusplus
9612extern "C"
9613#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009614char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009615int
9616main ()
9617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009624 ac_cv_lib_intl_textdomain=yes
9625else
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630LIBS=$ac_check_lib_save_LIBS
9631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9633$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009634if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635
Matthias Kloseb9621712010-04-24 17:59:49 +00009636$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009637
Brett Cannonc6d936e2009-06-07 20:09:53 +00009638 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009639fi
9640
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009641
9642# checks for system dependent C++ extensions support
9643case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9645$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009647/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009648
Georg Brandl59e87bd2011-02-15 19:48:59 +00009649 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009650int
9651main ()
9652{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009653loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ;
9655 return 0;
9656}
Matthias Kloseb159a552010-04-25 21:00:44 +00009657
Martin v. Löwis11437992002-04-12 09:54:03 +00009658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009659if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009660
Matthias Kloseb159a552010-04-25 21:00:44 +00009661
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009663
Matthias Kloseb159a552010-04-25 21:00:44 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009665$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009666
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009667else
Matthias Kloseb159a552010-04-25 21:00:44 +00009668
9669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009670$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009671
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009673rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009675 *) ;;
9676esac
9677
Christian Heimes985ecdc2013-11-20 11:46:18 +01009678# check for systems that require aligned memory access
9679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9680$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009681if ${ac_cv_aligned_required+:} false; then :
9682 $as_echo_n "(cached) " >&6
9683else
9684 if test "$cross_compiling" = yes; then :
9685 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009686else
9687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9688/* end confdefs.h. */
9689
9690int main()
9691{
9692 char s[16];
9693 int i, *p1, *p2;
9694 for (i=0; i < 16; i++)
9695 s[i] = i;
9696 p1 = (int*)(s+1);
9697 p2 = (int*)(s+2);
9698 if (*p1 == *p2)
9699 return 1;
9700 return 0;
9701}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009702_ACEOF
9703if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009704 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009705else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009706 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009707fi
9708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9709 conftest.$ac_objext conftest.beam conftest.$ac_ext
9710fi
9711
9712
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009713fi
9714
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9716$as_echo "$ac_cv_aligned_required" >&6; }
9717if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009718
9719$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9720
9721fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009722
9723# str, bytes and memoryview hash algorithm
9724
9725
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9727$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9728
9729# Check whether --with-hash_algorithm was given.
9730if test "${with_hash_algorithm+set}" = set; then :
9731 withval=$with_hash_algorithm;
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9733$as_echo "$withval" >&6; }
9734case "$withval" in
9735 siphash24)
9736 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9737
9738 ;;
9739 fnv)
9740 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9741
9742 ;;
9743 *)
9744 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9745 ;;
9746esac
9747
9748else
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9750$as_echo "default" >&6; }
9751fi
9752
9753
Charles-François Natalid30b0222014-05-08 23:08:51 +01009754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9755$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9756
9757# Check whether --with-address_sanitizer was given.
9758if test "${with_address_sanitizer+set}" = set; then :
9759 withval=$with_address_sanitizer;
9760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9761$as_echo "$withval" >&6; }
9762BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9763LDFLAGS="-fsanitize=address $LDFLAGS"
9764
9765else
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9767$as_echo "no" >&6; }
9768fi
9769
9770
Guido van Rossum70c7f481998-03-26 18:44:10 +00009771# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9773$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009774if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009776else
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009778LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782/* Override any GCC internal prototype to avoid an error.
9783 Use char because int might match the return type of a GCC
9784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009785#ifdef __cplusplus
9786extern "C"
9787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009788char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009789int
9790main ()
9791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ;
9794 return 0;
9795}
9796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802rm -f core conftest.err conftest.$ac_objext \
9803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9807$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009808if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009809 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009810fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009811 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9813$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009814if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009816else
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009818LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822/* Override any GCC internal prototype to avoid an error.
9823 Use char because int might match the return type of a GCC
9824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825#ifdef __cplusplus
9826extern "C"
9827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009828char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009829int
9830main ()
9831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ;
9834 return 0;
9835}
9836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009839else
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842rm -f core conftest.err conftest.$ac_objext \
9843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009844LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9847$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009848if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009849 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009850fi
9851 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9854$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009857if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9860$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009861LIBS="$withval $LIBS"
9862
9863else
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866fi
9867
Guido van Rossum7f43da71994-08-01 12:15:30 +00009868
Victor Stinner8291b5e2015-03-20 16:03:14 +01009869
9870
9871
9872
9873
9874
9875
9876if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9877 if test -n "$ac_tool_prefix"; then
9878 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9879set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9881$as_echo_n "checking for $ac_word... " >&6; }
9882if ${ac_cv_path_PKG_CONFIG+:} false; then :
9883 $as_echo_n "(cached) " >&6
9884else
9885 case $PKG_CONFIG in
9886 [\\/]* | ?:[\\/]*)
9887 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9888 ;;
9889 *)
9890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9891for as_dir in $PATH
9892do
9893 IFS=$as_save_IFS
9894 test -z "$as_dir" && as_dir=.
9895 for ac_exec_ext in '' $ac_executable_extensions; do
9896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9897 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9899 break 2
9900 fi
9901done
9902 done
9903IFS=$as_save_IFS
9904
9905 ;;
9906esac
9907fi
9908PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9909if test -n "$PKG_CONFIG"; then
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9911$as_echo "$PKG_CONFIG" >&6; }
9912else
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
9915fi
9916
9917
9918fi
9919if test -z "$ac_cv_path_PKG_CONFIG"; then
9920 ac_pt_PKG_CONFIG=$PKG_CONFIG
9921 # Extract the first word of "pkg-config", so it can be a program name with args.
9922set dummy pkg-config; ac_word=$2
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9924$as_echo_n "checking for $ac_word... " >&6; }
9925if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9926 $as_echo_n "(cached) " >&6
9927else
9928 case $ac_pt_PKG_CONFIG in
9929 [\\/]* | ?:[\\/]*)
9930 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9931 ;;
9932 *)
9933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9934for as_dir in $PATH
9935do
9936 IFS=$as_save_IFS
9937 test -z "$as_dir" && as_dir=.
9938 for ac_exec_ext in '' $ac_executable_extensions; do
9939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9940 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9942 break 2
9943 fi
9944done
9945 done
9946IFS=$as_save_IFS
9947
9948 ;;
9949esac
9950fi
9951ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9952if test -n "$ac_pt_PKG_CONFIG"; then
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9954$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9955else
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
9958fi
9959
9960 if test "x$ac_pt_PKG_CONFIG" = x; then
9961 PKG_CONFIG=""
9962 else
9963 case $cross_compiling:$ac_tool_warned in
9964yes:)
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9967ac_tool_warned=yes ;;
9968esac
9969 PKG_CONFIG=$ac_pt_PKG_CONFIG
9970 fi
9971else
9972 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9973fi
9974
9975fi
9976if test -n "$PKG_CONFIG"; then
9977 _pkg_min_version=0.9.0
9978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9979$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9980 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9982$as_echo "yes" >&6; }
9983 else
9984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986 PKG_CONFIG=""
9987 fi
9988fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009989
9990# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9992$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009993
9994# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009996 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009997else
9998 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009999fi
10000
10001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10003$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010004
10005# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10007$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008
10009# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010010if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010011 withval=$with_system_ffi;
10012fi
10013
10014
Zachary Waref40d4dd2016-09-17 01:25:24 -050010015if test "$ac_sys_system" = "Darwin"
10016then
10017 case "$with_system_ffi" in
10018 "")
10019 with_system_ffi="no"
10020 ;;
10021 yes|no)
10022 ;;
10023 *)
10024 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10025 ;;
10026 esac
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10028$as_echo "$with_system_ffi" >&6; }
10029else
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10031$as_echo "yes" >&6; }
10032 if test "$with_system_ffi" != ""
10033 then
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10035$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10036 fi
10037 with_system_ffi="yes"
10038fi
Zachary Ware935043d2016-09-09 17:01:21 -070010039
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010040if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010041 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10042else
10043 LIBFFI_INCLUDEDIR=""
10044fi
10045
10046
Stefan Krah60187b52012-03-23 19:06:27 +010010047# Check for use of the system libmpdec library
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10049$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10050
10051# Check whether --with-system_libmpdec was given.
10052if test "${with_system_libmpdec+set}" = set; then :
10053 withval=$with_system_libmpdec;
10054else
10055 with_system_libmpdec="no"
10056fi
10057
10058
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10060$as_echo "$with_system_libmpdec" >&6; }
10061
Benjamin Peterson076ed002010-10-31 17:11:02 +000010062# Check for support for loadable sqlite extensions
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10064$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10065# Check whether --enable-loadable-sqlite-extensions was given.
10066if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10067 enableval=$enable_loadable_sqlite_extensions;
10068else
10069 enable_loadable_sqlite_extensions="no"
10070fi
10071
10072
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10074$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10075
Ned Deilyd819b932013-09-06 01:07:05 -070010076# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10077
10078
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10080$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10081
10082# Check whether --with-tcltk-includes was given.
10083if test "${with_tcltk_includes+set}" = set; then :
10084 withval=$with_tcltk_includes;
10085else
10086 with_tcltk_includes="default"
10087fi
10088
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10090$as_echo "$with_tcltk_includes" >&6; }
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10092$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10093
10094# Check whether --with-tcltk-libs was given.
10095if test "${with_tcltk_libs+set}" = set; then :
10096 withval=$with_tcltk_libs;
10097else
10098 with_tcltk_libs="default"
10099fi
10100
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10102$as_echo "$with_tcltk_libs" >&6; }
10103if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10104then
10105 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10106 then
10107 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10108 fi
10109 TCLTK_INCLUDES=""
10110 TCLTK_LIBS=""
10111else
10112 TCLTK_INCLUDES="$with_tcltk_includes"
10113 TCLTK_LIBS="$with_tcltk_libs"
10114fi
10115
Matthias Klose55708cc2009-04-30 08:06:49 +000010116# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10118$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010119
10120# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010121if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010122 withval=$with_dbmliborder;
10123if test x$with_dbmliborder = xyes
10124then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010125as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010126else
10127 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10128 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10129 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010130 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010131 fi
10132 done
10133fi
10134fi
10135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10137$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
10141# Templates for things AC_DEFINEd more than once.
10142# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010143
10144
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010145if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010146then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010147 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010149
10150 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010151elif test "$ac_cv_kpthread" = "yes"
10152then
10153 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010154 if test "$ac_cv_cxx_thread" = "yes"; then
10155 CXX="$CXX -Kpthread"
10156 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010157 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010158elif test "$ac_cv_kthread" = "yes"
10159then
10160 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010161 if test "$ac_cv_cxx_thread" = "yes"; then
10162 CXX="$CXX -Kthread"
10163 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010164 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010165elif test "$ac_cv_pthread" = "yes"
10166then
10167 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010168 if test "$ac_cv_cxx_thread" = "yes"; then
10169 CXX="$CXX -pthread"
10170 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010171 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010172else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010173 if test ! -z "$withval" -a -d "$withval"
10174 then LDFLAGS="$LDFLAGS -L$withval"
10175 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010176
10177 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010178 # define _POSIX_THREADS in unistd.h. Some apparently don't
10179 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10181$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010184
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010185#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010186#ifdef _POSIX_THREADS
10187yes
10188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010189
10190_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010193 unistd_defines_pthreads=yes
10194else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010195 unistd_defines_pthreads=no
10196fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010197rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010198
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10200$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010201
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010203
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010204 # Just looking for pthread_create in libpthread is not enough:
10205 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10206 # So we really have to include pthread.h, and then link.
10207 _libs=$LIBS
10208 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10210$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010212/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010213
10214#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010215#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010216
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010217void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010218int
10219main ()
10220{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010221
10222pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ;
10224 return 0;
10225}
10226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10230$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010231 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010232
Guido van Rossum02a1c402000-02-25 19:26:31 +000010233else
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010235 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010237if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010238
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010240
Guido van Rossumad678af1998-10-02 14:42:15 +000010241else
Guido van Rossumad678af1998-10-02 14:42:15 +000010242
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10244$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010245if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010247else
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010249LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253/* Override any GCC internal prototype to avoid an error.
10254 Use char because int might match the return type of a GCC
10255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010256#ifdef __cplusplus
10257extern "C"
10258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010259char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260int
10261main ()
10262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010270else
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273rm -f core conftest.err conftest.$ac_objext \
10274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10278$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010279if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010280
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010281 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010282 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010283
Greg Steinadf63d62000-07-05 10:38:09 +000010284else
Greg Steinadf63d62000-07-05 10:38:09 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10287$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010288if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010290else
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010292LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296/* Override any GCC internal prototype to avoid an error.
10297 Use char because int might match the return type of a GCC
10298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010299#ifdef __cplusplus
10300extern "C"
10301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010302char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010303int
10304main ()
10305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ;
10308 return 0;
10309}
10310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010313else
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010316rm -f core conftest.err conftest.$ac_objext \
10317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010318LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10321$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010322if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010324 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010325 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010326
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010327else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010328
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10330$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010331if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010333else
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010335LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339/* Override any GCC internal prototype to avoid an error.
10340 Use char because int might match the return type of a GCC
10341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010342#ifdef __cplusplus
10343extern "C"
10344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010345char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010346int
10347main ()
10348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ;
10351 return 0;
10352}
10353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010356else
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010359rm -f core conftest.err conftest.$ac_objext \
10360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010361LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10364$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010365if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010367 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010368 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010369
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010370else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10373$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010374if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010376else
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010378LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382/* Override any GCC internal prototype to avoid an error.
10383 Use char because int might match the return type of a GCC
10384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010385#ifdef __cplusplus
10386extern "C"
10387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010388char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010389int
10390main ()
10391{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ;
10394 return 0;
10395}
10396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010397if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399else
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010402rm -f core conftest.err conftest.$ac_objext \
10403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010404LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10407$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010408if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010410 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010411 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010412
Guido van Rossumb93a8621998-05-07 13:27:32 +000010413else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010414
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010415 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10416
Guido van Rossum2d38f911996-06-26 19:47:01 +000010417fi
10418
Guido van Rossum627b2d71993-12-24 10:39:16 +000010419
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010420fi
10421
Guido van Rossum0be3e491997-05-22 20:33:33 +000010422fi
10423
Guido van Rossum49545951997-12-02 19:28:29 +000010424fi
10425
Guido van Rossumb93a8621998-05-07 13:27:32 +000010426fi
10427
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429rm -f core conftest.err conftest.$ac_objext \
10430 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10433$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010434if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010436else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010438LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442/* Override any GCC internal prototype to avoid an error.
10443 Use char because int might match the return type of a GCC
10444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010445#ifdef __cplusplus
10446extern "C"
10447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010448char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449int
10450main ()
10451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010459else
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010462rm -f core conftest.err conftest.$ac_objext \
10463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10467$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010468if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469
Martin v. Löwis130fb172001-07-19 11:00:41 +000010470 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010471
Guido van Rossum627b2d71993-12-24 10:39:16 +000010472fi
10473
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010474
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010475fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010476
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010477if test "$posix_threads" = "yes"; then
10478 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010481
10482 fi
10483
10484 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10485 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010486 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010488
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010489 ;;
10490 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492
10493 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010494 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010496
10497 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010498 esac
10499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10501$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010502 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010504else
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010506 ac_cv_pthread_system_supported=no
10507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010510
10511 #include <stdio.h>
10512 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010513 void *foo(void *parm) {
10514 return NULL;
10515 }
10516 main() {
10517 pthread_attr_t attr;
10518 pthread_t id;
10519 if (pthread_attr_init(&attr)) exit(-1);
10520 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10521 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10522 exit(0);
10523 }
10524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010526 ac_cv_pthread_system_supported=yes
10527else
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535fi
10536
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10538$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010539 if test "$ac_cv_pthread_system_supported" = "yes"; then
10540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542
10543 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 for ac_func in pthread_sigmask
10545do :
10546 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010547if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010549#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010550_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010551 case $ac_sys_system in
10552 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010555
10556 ;;
10557 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558fi
10559done
10560
pdoxe14679c2017-10-05 00:01:56 -070010561 for ac_func in pthread_getcpuclockid
10562do :
10563 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10564if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10565 cat >>confdefs.h <<_ACEOF
10566#define HAVE_PTHREAD_GETCPUCLOCKID 1
10567_ACEOF
10568
10569fi
10570done
10571
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572fi
10573
10574
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010575# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010576
Matthias Kloseb9621712010-04-24 17:59:49 +000010577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10578$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010582 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585 ipv6=no
10586 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10588$as_echo "yes" >&6; }
10589 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590
10591 ipv6=yes
10592 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594else
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598 /* AF_INET6 available check */
10599#include <sys/types.h>
10600#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010601int
10602main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010604int domain = AF_INET6;
10605 ;
10606 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010607}
Martin v. Löwis11437992002-04-12 09:54:03 +000010608_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010609if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10612$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010614
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010615else
Matthias Kloseb159a552010-04-25 21:00:44 +000010616
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010620
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010624if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10626$as_echo_n "checking if RFC2553 API is available... " >&6; }
10627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010628/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010629
10630 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010631#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010635struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010636 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ;
10638 return 0;
10639}
Matthias Kloseb159a552010-04-25 21:00:44 +000010640
Martin v. Löwis11437992002-04-12 09:54:03 +000010641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010642if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010643
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010646 ipv6=yes
10647
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010648else
Matthias Kloseb159a552010-04-25 21:00:44 +000010649
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010652 ipv6=no
10653
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010656fi
10657
10658if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010660
10661fi
10662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663fi
10664
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665
10666ipv6type=unknown
10667ipv6lib=none
10668ipv6trylibc=no
10669
10670if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10672$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010673 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10674 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675 case $i in
10676 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010678/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680#include <netinet/in.h>
10681#ifdef IPV6_INRIA_VERSION
10682yes
10683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010687 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010689rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690
10691 ;;
10692 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010695
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010696#include <netinet/in.h>
10697#ifdef __KAME__
10698yes
10699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010700_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703 ipv6type=$i;
10704 ipv6lib=inet6
10705 ipv6libdir=/usr/local/v6/lib
10706 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010708rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709
10710 ;;
10711 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010713/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715#include <features.h>
10716#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10717yes
10718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722 ipv6type=$i;
10723 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010725rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726
10727 ;;
10728 linux-inet6)
10729 if test -d /usr/inet6; then
10730 ipv6type=$i
10731 ipv6lib=inet6
10732 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010733 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734 fi
10735 ;;
10736 solaris)
10737 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010738 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739 ipv6type=$i
10740 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 fi
10742 fi
10743 ;;
10744 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748#include <sys/param.h>
10749#ifdef _TOSHIBA_INET6
10750yes
10751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010752_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755 ipv6type=$i;
10756 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010757 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010759rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760
10761 ;;
10762 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010765
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766#include </usr/local/v6/include/sys/v6config.h>
10767#ifdef __V6D__
10768yes
10769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010770_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773 ipv6type=$i;
10774 ipv6lib=v6;
10775 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010776 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010778rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779
10780 ;;
10781 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785#include <sys/param.h>
10786#ifdef _ZETA_MINAMI_INET6
10787yes
10788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010789_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 ipv6type=$i;
10793 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010794 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010796rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797
10798 ;;
10799 esac
10800 if test "$ipv6type" != "unknown"; then
10801 break
10802 fi
10803 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10805$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806fi
10807
10808if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10809 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10810 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10811 echo "using lib$ipv6lib"
10812 else
10813 if test $ipv6trylibc = "yes"; then
10814 echo "using libc"
10815 else
10816 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10817 echo "You need to fetch lib$ipv6lib.a from appropriate"
10818 echo 'ipv6 kit and compile beforehand.'
10819 exit 1
10820 fi
10821 fi
10822fi
10823
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10825$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10827/* end confdefs.h. */
10828 /* CAN_RAW_FD_FRAMES available check */
10829#include <linux/can/raw.h>
10830int
10831main ()
10832{
10833int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838if ac_fn_c_try_compile "$LINENO"; then :
10839
10840
10841$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10842
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10844$as_echo "yes" >&6; }
10845
10846else
10847
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
10850
10851fi
10852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010854# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10856$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010859if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860 withval=$with_doc_strings;
10861fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010862
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010863
10864if test -z "$with_doc_strings"
10865then with_doc_strings="yes"
10866fi
10867if test "$with_doc_strings" != "no"
10868then
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010871
10872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10874$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010875
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010876# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10878$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010881if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882 withval=$with_pymalloc;
10883fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010884
Neil Schemenauera35c6882001-02-27 04:45:05 +000010885
Neil Schemenauer16c22972002-03-22 15:34:49 +000010886if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010887then
10888 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010889fi
10890if test "$with_pymalloc" != "no"
10891then
Martin v. Löwis11437992002-04-12 09:54:03 +000010892
Matthias Kloseb9621712010-04-24 17:59:49 +000010893$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010894
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010895 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10898$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010899
Nick Coghlan6ea41862017-06-11 13:16:15 +100010900# Check for --with-c-locale-coercion
10901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10902$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10903
10904# Check whether --with-c-locale-coercion was given.
10905if test "${with_c_locale_coercion+set}" = set; then :
10906 withval=$with_c_locale_coercion;
10907fi
10908
10909
10910if test -z "$with_c_locale_coercion"
10911then
10912 with_c_locale_coercion="yes"
10913fi
10914if test "$with_c_locale_coercion" != "no"
10915then
10916
10917$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10918
10919fi
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10921$as_echo "$with_c_locale_coercion" >&6; }
10922
10923# Check for --with-c-locale-warning
10924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10925$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10926
10927# Check whether --with-c-locale-warning was given.
10928if test "${with_c_locale_warning+set}" = set; then :
10929 withval=$with_c_locale_warning;
10930fi
10931
10932
10933if test -z "$with_c_locale_warning"
10934then
10935 with_c_locale_warning="yes"
10936fi
10937if test "$with_c_locale_warning" != "no"
10938then
10939
10940$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10941
10942fi
10943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10944$as_echo "$with_c_locale_warning" >&6; }
10945
Benjamin Peterson05159c42009-12-03 03:01:27 +000010946# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10948$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010949
10950# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010951if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010952 withval=$with_valgrind;
10953else
10954 with_valgrind=no
10955fi
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10958$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010959if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 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 +020010961if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010964
10965else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010966 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010967
10968fi
10969
10970
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010971 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010972fi
10973
Łukasz Langaa785c872016-09-09 17:37:37 -070010974# Check for DTrace support
10975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10976$as_echo_n "checking for --with-dtrace... " >&6; }
10977
10978# Check whether --with-dtrace was given.
10979if test "${with_dtrace+set}" = set; then :
10980 withval=$with_dtrace;
10981else
10982 with_dtrace=no
10983fi
10984
10985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10986$as_echo "$with_dtrace" >&6; }
10987
10988
10989
10990
10991
10992DTRACE=
10993DFLAGS=
10994DTRACE_HEADERS=
10995DTRACE_OBJS=
10996
10997if test "$with_dtrace" = "yes"
10998then
10999 # Extract the first word of "dtrace", so it can be a program name with args.
11000set dummy dtrace; ac_word=$2
11001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11002$as_echo_n "checking for $ac_word... " >&6; }
11003if ${ac_cv_path_DTRACE+:} false; then :
11004 $as_echo_n "(cached) " >&6
11005else
11006 case $DTRACE in
11007 [\\/]* | ?:[\\/]*)
11008 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11009 ;;
11010 *)
11011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11012for as_dir in $PATH
11013do
11014 IFS=$as_save_IFS
11015 test -z "$as_dir" && as_dir=.
11016 for ac_exec_ext in '' $ac_executable_extensions; do
11017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11018 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11020 break 2
11021 fi
11022done
11023 done
11024IFS=$as_save_IFS
11025
11026 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11027 ;;
11028esac
11029fi
11030DTRACE=$ac_cv_path_DTRACE
11031if test -n "$DTRACE"; then
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11033$as_echo "$DTRACE" >&6; }
11034else
11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11036$as_echo "no" >&6; }
11037fi
11038
11039
11040 if test "$DTRACE" = "not found"; then
11041 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11042 fi
11043
11044$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11045
11046 DTRACE_HEADERS="Include/pydtrace_probes.h"
11047
11048 # On OS X, DTrace providers do not need to be explicitly compiled and
11049 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11050 # generation flag '-G'. We check for presence of this flag, rather than
11051 # hardcoding support by OS, in the interest of robustness.
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11053$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11054if ${ac_cv_dtrace_link+:} false; then :
11055 $as_echo_n "(cached) " >&6
11056else
11057 ac_cv_dtrace_link=no
11058 echo 'BEGIN' > conftest.d
11059 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11060 ac_cv_dtrace_link=yes
11061
11062fi
11063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11064$as_echo "$ac_cv_dtrace_link" >&6; }
11065 if test "$ac_cv_dtrace_link" = "yes"; then
11066 DTRACE_OBJS="Python/pydtrace.o"
11067 fi
11068fi
11069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011070# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071
Guido van Rossum98935bf2001-09-05 19:13:16 +000011072DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073
Guido van Rossume97ee181999-12-20 21:27:22 +000011074# the dlopen() function means we might want to use dynload_shlib.o. some
11075# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011076for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011077do :
11078 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011079if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011082_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011083
Guido van Rossume97ee181999-12-20 21:27:22 +000011084fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011085done
Guido van Rossume97ee181999-12-20 21:27:22 +000011086
Michael W. Hudson54241132001-12-07 15:38:26 +000011087
Guido van Rossume97ee181999-12-20 21:27:22 +000011088# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11089# loading of modules.
11090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11092$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011093if test -z "$DYNLOADFILE"
11094then
11095 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011096 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11097 if test "$ac_cv_func_dlopen" = yes
11098 then DYNLOADFILE="dynload_shlib.o"
11099 else DYNLOADFILE="dynload_aix.o"
11100 fi
11101 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011102 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011103 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11104 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011105 *)
11106 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11107 # out any dynamic loading
11108 if test "$ac_cv_func_dlopen" = yes
11109 then DYNLOADFILE="dynload_shlib.o"
11110 else DYNLOADFILE="dynload_stub.o"
11111 fi
11112 ;;
11113 esac
11114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11116$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011117if test "$DYNLOADFILE" != "dynload_stub.o"
11118then
Martin v. Löwis11437992002-04-12 09:54:03 +000011119
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011121
11122fi
11123
Neil Schemenauer4e425612001-06-19 15:44:15 +000011124# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11125
Michael W. Hudson54241132001-12-07 15:38:26 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11128$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011129if test -z "$MACHDEP_OBJS"
11130then
Jack Jansene578a632001-08-15 01:27:14 +000011131 MACHDEP_OBJS=$extra_machdep_objs
11132else
11133 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011134fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011135if test -z "$MACHDEP_OBJS"; then
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11137$as_echo "none" >&6; }
11138else
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11140$as_echo "$MACHDEP_OBJS" >&6; }
11141fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011142
Guido van Rossum627b2d71993-12-24 10:39:16 +000011143# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011144for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011145 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011146 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011147 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011148 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011149 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011150 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011151 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011152 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011153 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011154 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011155 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011156 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011157 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011158 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011159 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11160 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011161 sigaction sigaltstack siginterrupt sigpending sigrelse \
11162 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011163 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011164 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011165 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011166do :
11167 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11168ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011169if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011171#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011173
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011174fi
11175done
11176
Michael W. Hudson54241132001-12-07 15:38:26 +000011177
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011178ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11179 #include <dirent.h>
11180"
11181if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11182
11183$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11184
11185fi
11186
11187
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011188# For some functions, having a definition is not sufficient, since
11189# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11191$as_echo_n "checking for chroot... " >&6; }
11192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011193/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011194#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011195int
11196main ()
11197{
11198void *x=chroot
11199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011206
Matthias Kloseb159a552010-04-25 21:00:44 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011208$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212
11213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11216$as_echo_n "checking for link... " >&6; }
11217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011219#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011220int
11221main ()
11222{
11223void *x=link
11224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011231
Matthias Kloseb159a552010-04-25 21:00:44 +000011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011233$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011234else
Matthias Kloseb9621712010-04-24 17:59:49 +000011235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011237
11238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11241$as_echo_n "checking for symlink... " >&6; }
11242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011245int
11246main ()
11247{
11248void *x=symlink
11249 ;
11250 return 0;
11251}
11252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011256
Matthias Kloseb159a552010-04-25 21:00:44 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011259else
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262
11263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11266$as_echo_n "checking for fchdir... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011269#include <unistd.h>
11270int
11271main ()
11272{
11273void *x=fchdir
11274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287
11288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11291$as_echo_n "checking for fsync... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011294#include <unistd.h>
11295int
11296main ()
11297{
11298void *x=fsync
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011312
11313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11316$as_echo_n "checking for fdatasync... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011319#include <unistd.h>
11320int
11321main ()
11322{
11323void *x=fdatasync
11324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011331
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337
11338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11341$as_echo_n "checking for epoll... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011343/* end confdefs.h. */
11344#include <sys/epoll.h>
11345int
11346main ()
11347{
11348void *x=epoll_create
11349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011354
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011356
Matthias Kloseb159a552010-04-25 21:00:44 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011362
11363fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11366$as_echo_n "checking for epoll_create1... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368/* end confdefs.h. */
11369#include <sys/epoll.h>
11370int
11371main ()
11372{
11373void *x=epoll_create1
11374 ;
11375 return 0;
11376}
11377_ACEOF
11378if ac_fn_c_try_compile "$LINENO"; then :
11379
11380$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11381
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11383$as_echo "yes" >&6; }
11384else
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
11387
11388fi
11389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11391$as_echo_n "checking for kqueue... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011393/* end confdefs.h. */
11394
11395#include <sys/types.h>
11396#include <sys/event.h>
11397
11398int
11399main ()
11400{
11401int x=kqueue()
11402 ;
11403 return 0;
11404}
11405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011406if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011409
Matthias Kloseb159a552010-04-25 21:00:44 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011412else
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011415
11416fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11419$as_echo_n "checking for prlimit... " >&6; }
11420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421/* end confdefs.h. */
11422
11423#include <sys/time.h>
11424#include <sys/resource.h>
11425
11426int
11427main ()
11428{
11429void *x=prlimit
11430 ;
11431 return 0;
11432}
11433_ACEOF
11434if ac_fn_c_try_compile "$LINENO"; then :
11435
11436$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11437
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11439$as_echo "yes" >&6; }
11440else
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
11443
11444fi
11445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11446
Martin v. Löwisd5843682002-11-21 20:41:28 +000011447# On some systems (eg. FreeBSD 5), we would find a definition of the
11448# functions ctermid_r, setgroups in the library, but no prototype
11449# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11450# address to avoid compiler warnings and potential miscompilations
11451# because of the missing prototypes.
11452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11454$as_echo_n "checking for ctermid_r... " >&6; }
11455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011456/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011457
Martin v. Löwisd5843682002-11-21 20:41:28 +000011458#include <stdio.h>
11459
Martin v. Löwisd5843682002-11-21 20:41:28 +000011460int
11461main ()
11462{
11463void* p = ctermid_r
11464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011471
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011473$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011474else
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011477
11478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11480
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11482$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011483if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011484 $as_echo_n "(cached) " >&6
11485else
11486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011488#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011489int
11490main ()
11491{
11492void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011493
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011494 ;
11495 return 0;
11496}
11497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011498if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011499 ac_cv_flock_decl=yes
11500else
11501 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011502
11503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011505
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011506fi
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11508$as_echo "$ac_cv_flock_decl" >&6; }
11509if test "x${ac_cv_flock_decl}" = xyes; then
11510 for ac_func in flock
11511do :
11512 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011513if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011514 cat >>confdefs.h <<_ACEOF
11515#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011516_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011517
Antoine Pitroua3000072010-09-07 14:52:42 +000011518else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011520$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011521if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011522 $as_echo_n "(cached) " >&6
11523else
11524 ac_check_lib_save_LIBS=$LIBS
11525LIBS="-lbsd $LIBS"
11526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11527/* end confdefs.h. */
11528
11529/* Override any GCC internal prototype to avoid an error.
11530 Use char because int might match the return type of a GCC
11531 builtin and then its argument prototype would still apply. */
11532#ifdef __cplusplus
11533extern "C"
11534#endif
11535char flock ();
11536int
11537main ()
11538{
11539return flock ();
11540 ;
11541 return 0;
11542}
11543_ACEOF
11544if ac_fn_c_try_link "$LINENO"; then :
11545 ac_cv_lib_bsd_flock=yes
11546else
11547 ac_cv_lib_bsd_flock=no
11548fi
11549rm -f core conftest.err conftest.$ac_objext \
11550 conftest$ac_exeext conftest.$ac_ext
11551LIBS=$ac_check_lib_save_LIBS
11552fi
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11554$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011555if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011556 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011557
11558
11559$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11560
11561
11562fi
11563
11564
11565fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011566done
11567
Antoine Pitroua3000072010-09-07 14:52:42 +000011568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11571$as_echo_n "checking for getpagesize... " >&6; }
11572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011573/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011574
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011575#include <unistd.h>
11576
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011577int
11578main ()
11579{
11580void* p = getpagesize
11581 ;
11582 return 0;
11583}
11584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011586
Matthias Kloseb9621712010-04-24 17:59:49 +000011587$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011588
Matthias Kloseb159a552010-04-25 21:00:44 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011590$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011591else
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11593$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011594
11595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011597
Victor Stinner984890f2011-11-24 13:53:38 +010011598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11599$as_echo_n "checking for broken unsetenv... " >&6; }
11600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11601/* end confdefs.h. */
11602
11603#include <stdlib.h>
11604
11605int
11606main ()
11607{
11608int res = unsetenv("DUMMY")
11609 ;
11610 return 0;
11611}
11612_ACEOF
11613if ac_fn_c_try_compile "$LINENO"; then :
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615$as_echo "no" >&6; }
11616else
11617
11618$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11619
11620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11621$as_echo "yes" >&6; }
11622
11623fi
11624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11625
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011626for ac_prog in true
11627do
11628 # Extract the first word of "$ac_prog", so it can be a program name with args.
11629set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11631$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011634else
11635 if test -n "$TRUE"; then
11636 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11637else
11638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11639for as_dir in $PATH
11640do
11641 IFS=$as_save_IFS
11642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011645 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 $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 +000011647 break 2
11648 fi
11649done
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011651IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011652
11653fi
11654fi
11655TRUE=$ac_cv_prog_TRUE
11656if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11658$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11661$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011662fi
11663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011665 test -n "$TRUE" && break
11666done
11667test -n "$TRUE" || TRUE="/bin/true"
11668
11669
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11671$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011672if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011674else
11675 ac_check_lib_save_LIBS=$LIBS
11676LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011678/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011680/* Override any GCC internal prototype to avoid an error.
11681 Use char because int might match the return type of a GCC
11682 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011683#ifdef __cplusplus
11684extern "C"
11685#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011686char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011687int
11688main ()
11689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011696 ac_cv_lib_c_inet_aton=yes
11697else
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011700rm -f core conftest.err conftest.$ac_objext \
11701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011702LIBS=$ac_check_lib_save_LIBS
11703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11705$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011706if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011707 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11710$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011711if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011713else
11714 ac_check_lib_save_LIBS=$LIBS
11715LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011717/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719/* Override any GCC internal prototype to avoid an error.
11720 Use char because int might match the return type of a GCC
11721 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011722#ifdef __cplusplus
11723extern "C"
11724#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011725char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011726int
11727main ()
11728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011735 ac_cv_lib_resolv_inet_aton=yes
11736else
Matthias Kloseb9621712010-04-24 17:59:49 +000011737 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011739rm -f core conftest.err conftest.$ac_objext \
11740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741LIBS=$ac_check_lib_save_LIBS
11742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11744$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011745if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011746 cat >>confdefs.h <<_ACEOF
11747#define HAVE_LIBRESOLV 1
11748_ACEOF
11749
11750 LIBS="-lresolv $LIBS"
11751
11752fi
11753
11754
11755fi
11756
11757
Christian Heimesd0764e22007-12-04 15:00:33 +000011758# On Tru64, chflags seems to be present, but calling it will
11759# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11761$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011762if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011763 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011766 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011769/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011770
Christian Heimesd0764e22007-12-04 15:00:33 +000011771#include <sys/stat.h>
11772#include <unistd.h>
11773int main(int argc, char*argv[])
11774{
11775 if(chflags(argv[0], 0) != 0)
11776 return 1;
11777 return 0;
11778}
Ned Deily3eb67d52011-06-28 00:00:28 -070011779
Christian Heimesd0764e22007-12-04 15:00:33 +000011780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011782 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011783else
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011788fi
11789
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011790
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11793$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011794if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011797 ac_cv_have_chflags="yes"
11798else
11799 ac_cv_have_chflags="no"
11800fi
11801
11802fi
11803if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011806
11807fi
11808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11810$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011811if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011815 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011818/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011819
Christian Heimesd0764e22007-12-04 15:00:33 +000011820#include <sys/stat.h>
11821#include <unistd.h>
11822int main(int argc, char*argv[])
11823{
11824 if(lchflags(argv[0], 0) != 0)
11825 return 1;
11826 return 0;
11827}
Ned Deily3eb67d52011-06-28 00:00:28 -070011828
Christian Heimesd0764e22007-12-04 15:00:33 +000011829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011831 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011837fi
11838
11839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11842$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011843if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011845if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011846 ac_cv_have_lchflags="yes"
11847else
11848 ac_cv_have_lchflags="no"
11849fi
11850
11851fi
11852if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011853
Matthias Kloseb9621712010-04-24 17:59:49 +000011854$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011855
11856fi
11857
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011858case $ac_sys_system/$ac_sys_release in
11859Darwin/*)
11860 _CUR_CFLAGS="${CFLAGS}"
11861 _CUR_LDFLAGS="${LDFLAGS}"
11862 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11863 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11864 ;;
11865esac
11866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11868$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011871else
11872 ac_check_lib_save_LIBS=$LIBS
11873LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011875/* end confdefs.h. */
11876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011877/* Override any GCC internal prototype to avoid an error.
11878 Use char because int might match the return type of a GCC
11879 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011880#ifdef __cplusplus
11881extern "C"
11882#endif
11883char inflateCopy ();
11884int
11885main ()
11886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011887return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011888 ;
11889 return 0;
11890}
11891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011892if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011893 ac_cv_lib_z_inflateCopy=yes
11894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897rm -f core conftest.err conftest.$ac_objext \
11898 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011899LIBS=$ac_check_lib_save_LIBS
11900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11902$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011903if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011906
11907fi
11908
11909
11910case $ac_sys_system/$ac_sys_release in
11911Darwin/*)
11912 CFLAGS="${_CUR_CFLAGS}"
11913 LDFLAGS="${_CUR_LDFLAGS}"
11914 ;;
11915esac
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11918$as_echo_n "checking for hstrerror... " >&6; }
11919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011920/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011921
Martin v. Löwise9416172003-05-03 10:12:45 +000011922#include <netdb.h>
11923
Martin v. Löwise9416172003-05-03 10:12:45 +000011924int
11925main ()
11926{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011927void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011935
Matthias Kloseb159a552010-04-25 21:00:44 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011937$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011938else
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011941
11942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core conftest.err conftest.$ac_objext \
11944 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11947$as_echo_n "checking for inet_aton... " >&6; }
11948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011949/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011950
Martin v. Löwis86d66262006-02-17 08:40:11 +000011951#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011952#include <sys/socket.h>
11953#include <netinet/in.h>
11954#include <arpa/inet.h>
11955
Martin v. Löwise9416172003-05-03 10:12:45 +000011956int
11957main ()
11958{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011959void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011960 ;
11961 return 0;
11962}
11963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
Matthias Kloseb9621712010-04-24 17:59:49 +000011966$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011967
Matthias Kloseb159a552010-04-25 21:00:44 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011973
11974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011975rm -f core conftest.err conftest.$ac_objext \
11976 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11979$as_echo_n "checking for inet_pton... " >&6; }
11980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011981/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011982
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011983#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011984#include <sys/socket.h>
11985#include <netinet/in.h>
11986#include <arpa/inet.h>
11987
Martin v. Löwise9416172003-05-03 10:12:45 +000011988int
11989main ()
11990{
11991void* p = inet_pton
11992 ;
11993 return 0;
11994}
11995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011996if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011999
Matthias Kloseb159a552010-04-25 21:00:44 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012002else
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12004$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012005
12006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012008
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012009# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12011$as_echo_n "checking for setgroups... " >&6; }
12012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012013/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012014
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012015#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012016#ifdef HAVE_GRP_H
12017#include <grp.h>
12018#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012019
Martin v. Löwisd5843682002-11-21 20:41:28 +000012020int
12021main ()
12022{
12023void* p = setgroups
12024 ;
12025 return 0;
12026}
12027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012031
Matthias Kloseb159a552010-04-25 21:00:44 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012033$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12036$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012037
12038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012040
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012041# check for openpty and forkpty
12042
12043for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012044do :
12045 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012049_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12053$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012056else
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012058LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062/* Override any GCC internal prototype to avoid an error.
12063 Use char because int might match the return type of a GCC
12064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012065#ifdef __cplusplus
12066extern "C"
12067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012068char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012069int
12070main ()
12071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012073 ;
12074 return 0;
12075}
12076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012079else
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012082rm -f core conftest.err conftest.$ac_objext \
12083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012084LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12087$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012088if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012090 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012091else
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12093$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012096else
12097 ac_check_lib_save_LIBS=$LIBS
12098LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012100/* end confdefs.h. */
12101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012102/* Override any GCC internal prototype to avoid an error.
12103 Use char because int might match the return type of a GCC
12104 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012105#ifdef __cplusplus
12106extern "C"
12107#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012108char openpty ();
12109int
12110main ()
12111{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012113 ;
12114 return 0;
12115}
12116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012117if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012118 ac_cv_lib_bsd_openpty=yes
12119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012122rm -f core conftest.err conftest.$ac_objext \
12123 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124LIBS=$ac_check_lib_save_LIBS
12125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12127$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012128if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012130 LIBS="$LIBS -lbsd"
12131fi
12132
12133
12134fi
12135
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136
12137fi
12138done
12139
12140for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012141do :
12142 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012146_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147
Fred Drake8cef4cf2000-06-28 16:40:38 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12150$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012151if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153else
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159/* Override any GCC internal prototype to avoid an error.
12160 Use char because int might match the return type of a GCC
12161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012162#ifdef __cplusplus
12163extern "C"
12164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012165char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012166int
12167main ()
12168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012169return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 ;
12171 return 0;
12172}
12173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012174if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179rm -f core conftest.err conftest.$ac_objext \
12180 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012181LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12184$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012185if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012188else
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12190$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193else
12194 ac_check_lib_save_LIBS=$LIBS
12195LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012197/* end confdefs.h. */
12198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199/* Override any GCC internal prototype to avoid an error.
12200 Use char because int might match the return type of a GCC
12201 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202#ifdef __cplusplus
12203extern "C"
12204#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012205char forkpty ();
12206int
12207main ()
12208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210 ;
12211 return 0;
12212}
12213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215 ac_cv_lib_bsd_forkpty=yes
12216else
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012221LIBS=$ac_check_lib_save_LIBS
12222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12224$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012225if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227 LIBS="$LIBS -lbsd"
12228fi
12229
12230
12231fi
12232
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233
12234fi
12235done
12236
Jack Jansendd19cf82001-12-06 22:36:17 +000012237
Michael W. Hudson54241132001-12-07 15:38:26 +000012238# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012240do :
12241 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12242ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012243if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012245#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012246_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012247
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012249done
12250
Michael W. Hudson54241132001-12-07 15:38:26 +000012251
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012252ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012253if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012254 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012255
Martin v. Löwis1142de32002-03-29 16:28:31 +000012256else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012258 *" dup2.$ac_objext "* ) ;;
12259 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012260 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012261esac
12262
Martin v. Löwis1142de32002-03-29 16:28:31 +000012263fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012264
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012265ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012267 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12268
12269else
12270 case " $LIBOBJS " in
12271 *" strdup.$ac_objext "* ) ;;
12272 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12273 ;;
12274esac
12275
12276fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012277
12278
12279for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012280do :
12281 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012282if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012284#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012287/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012289int
12290main ()
12291{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012292getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 ;
12294 return 0;
12295}
12296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012300
Guido van Rossum627b2d71993-12-24 10:39:16 +000012301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012303
Guido van Rossum627b2d71993-12-24 10:39:16 +000012304fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012305done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012306
Jack Jansen150753c2003-03-29 22:07:47 +000012307for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012308do :
12309 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012310if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012311 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012312#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012316#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012317int
12318main ()
12319{
12320setpgrp(0,0);
12321 ;
12322 return 0;
12323}
12324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012328
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012331
12332fi
12333done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012334
Thomas Wouters3a584202000-08-05 23:28:51 +000012335for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012336do :
12337 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012338if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012344#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012345int
12346main ()
12347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
12354
Guido van Rossum627b2d71993-12-24 10:39:16 +000012355else
Skip Montanaro6dead952003-09-25 14:50:04 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012362
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012363fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012364done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012365
Michael W. Hudson54241132001-12-07 15:38:26 +000012366
Victor Stinnere0be4232011-10-25 13:06:09 +020012367for ac_func in clock_gettime
12368do :
12369 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12370if test "x$ac_cv_func_clock_gettime" = xyes; then :
12371 cat >>confdefs.h <<_ACEOF
12372#define HAVE_CLOCK_GETTIME 1
12373_ACEOF
12374
12375else
12376
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12378$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12379if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12380 $as_echo_n "(cached) " >&6
12381else
12382 ac_check_lib_save_LIBS=$LIBS
12383LIBS="-lrt $LIBS"
12384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12385/* end confdefs.h. */
12386
12387/* Override any GCC internal prototype to avoid an error.
12388 Use char because int might match the return type of a GCC
12389 builtin and then its argument prototype would still apply. */
12390#ifdef __cplusplus
12391extern "C"
12392#endif
12393char clock_gettime ();
12394int
12395main ()
12396{
12397return clock_gettime ();
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402if ac_fn_c_try_link "$LINENO"; then :
12403 ac_cv_lib_rt_clock_gettime=yes
12404else
12405 ac_cv_lib_rt_clock_gettime=no
12406fi
12407rm -f core conftest.err conftest.$ac_objext \
12408 conftest$ac_exeext conftest.$ac_ext
12409LIBS=$ac_check_lib_save_LIBS
12410fi
12411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12412$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12413if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12414
Victor Stinner7efb8332014-08-29 15:41:08 +020012415 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012416 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12417
12418
12419$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12420
12421
12422fi
12423
12424
12425fi
12426done
12427
12428
12429for ac_func in clock_getres
12430do :
12431 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12432if test "x$ac_cv_func_clock_getres" = xyes; then :
12433 cat >>confdefs.h <<_ACEOF
12434#define HAVE_CLOCK_GETRES 1
12435_ACEOF
12436
12437else
12438
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12440$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12441if ${ac_cv_lib_rt_clock_getres+:} false; then :
12442 $as_echo_n "(cached) " >&6
12443else
12444 ac_check_lib_save_LIBS=$LIBS
12445LIBS="-lrt $LIBS"
12446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12447/* end confdefs.h. */
12448
12449/* Override any GCC internal prototype to avoid an error.
12450 Use char because int might match the return type of a GCC
12451 builtin and then its argument prototype would still apply. */
12452#ifdef __cplusplus
12453extern "C"
12454#endif
12455char clock_getres ();
12456int
12457main ()
12458{
12459return clock_getres ();
12460 ;
12461 return 0;
12462}
12463_ACEOF
12464if ac_fn_c_try_link "$LINENO"; then :
12465 ac_cv_lib_rt_clock_getres=yes
12466else
12467 ac_cv_lib_rt_clock_getres=no
12468fi
12469rm -f core conftest.err conftest.$ac_objext \
12470 conftest$ac_exeext conftest.$ac_ext
12471LIBS=$ac_check_lib_save_LIBS
12472fi
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12474$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12475if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12476
12477 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12478
12479
12480fi
12481
12482
12483fi
12484done
12485
12486
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012487for ac_func in clock_settime
12488do :
12489 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12490if test "x$ac_cv_func_clock_settime" = xyes; then :
12491 cat >>confdefs.h <<_ACEOF
12492#define HAVE_CLOCK_SETTIME 1
12493_ACEOF
12494
12495else
12496
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12498$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12499if ${ac_cv_lib_rt_clock_settime+:} false; then :
12500 $as_echo_n "(cached) " >&6
12501else
12502 ac_check_lib_save_LIBS=$LIBS
12503LIBS="-lrt $LIBS"
12504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12505/* end confdefs.h. */
12506
12507/* Override any GCC internal prototype to avoid an error.
12508 Use char because int might match the return type of a GCC
12509 builtin and then its argument prototype would still apply. */
12510#ifdef __cplusplus
12511extern "C"
12512#endif
12513char clock_settime ();
12514int
12515main ()
12516{
12517return clock_settime ();
12518 ;
12519 return 0;
12520}
12521_ACEOF
12522if ac_fn_c_try_link "$LINENO"; then :
12523 ac_cv_lib_rt_clock_settime=yes
12524else
12525 ac_cv_lib_rt_clock_settime=no
12526fi
12527rm -f core conftest.err conftest.$ac_objext \
12528 conftest$ac_exeext conftest.$ac_ext
12529LIBS=$ac_check_lib_save_LIBS
12530fi
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12532$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12533if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12534
12535 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12536
12537
12538fi
12539
12540
12541fi
12542done
12543
12544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12546$as_echo_n "checking for major... " >&6; }
12547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012549
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012550#if defined(MAJOR_IN_MKDEV)
12551#include <sys/mkdev.h>
12552#elif defined(MAJOR_IN_SYSMACROS)
12553#include <sys/sysmacros.h>
12554#else
12555#include <sys/types.h>
12556#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012557
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012558int
12559main ()
12560{
12561
12562 makedev(major(0),minor(0));
12563
12564 ;
12565 return 0;
12566}
12567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012569
12570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12574$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012575
12576else
Skip Montanaro6dead952003-09-25 14:50:04 +000012577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12579$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012580
12581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582rm -f core conftest.err conftest.$ac_objext \
12583 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012584
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012585# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012586# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12588$as_echo_n "checking for getaddrinfo... " >&6; }
12589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012590/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012591
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012592#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012593#include <sys/socket.h>
12594#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012595#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596
Martin v. Löwis11437992002-04-12 09:54:03 +000012597int
12598main ()
12599{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012600getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ;
12602 return 0;
12603}
12604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012605if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012606 have_getaddrinfo=yes
12607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012610rm -f core conftest.err conftest.$ac_objext \
12611 conftest$ac_exeext conftest.$ac_ext
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12613$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012614if test $have_getaddrinfo = yes
12615then
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12617$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012618 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012620else
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012622
12623if test "${enable_ipv6+set}" = set; then
12624 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12625else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012626 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012627fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012630/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012631
Stefan Krah19c21392012-11-22 23:47:32 +010012632#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012633#include <sys/types.h>
12634#include <netdb.h>
12635#include <string.h>
12636#include <sys/socket.h>
12637#include <netinet/in.h>
12638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012639int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640{
12641 int passive, gaierr, inet4 = 0, inet6 = 0;
12642 struct addrinfo hints, *ai, *aitop;
12643 char straddr[INET6_ADDRSTRLEN], strport[16];
12644
12645 for (passive = 0; passive <= 1; passive++) {
12646 memset(&hints, 0, sizeof(hints));
12647 hints.ai_family = AF_UNSPEC;
12648 hints.ai_flags = passive ? AI_PASSIVE : 0;
12649 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012650 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012651 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12652 (void)gai_strerror(gaierr);
12653 goto bad;
12654 }
12655 for (ai = aitop; ai; ai = ai->ai_next) {
12656 if (ai->ai_addr == NULL ||
12657 ai->ai_addrlen == 0 ||
12658 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12659 straddr, sizeof(straddr), strport, sizeof(strport),
12660 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12661 goto bad;
12662 }
12663 switch (ai->ai_family) {
12664 case AF_INET:
12665 if (strcmp(strport, "54321") != 0) {
12666 goto bad;
12667 }
12668 if (passive) {
12669 if (strcmp(straddr, "0.0.0.0") != 0) {
12670 goto bad;
12671 }
12672 } else {
12673 if (strcmp(straddr, "127.0.0.1") != 0) {
12674 goto bad;
12675 }
12676 }
12677 inet4++;
12678 break;
12679 case AF_INET6:
12680 if (strcmp(strport, "54321") != 0) {
12681 goto bad;
12682 }
12683 if (passive) {
12684 if (strcmp(straddr, "::") != 0) {
12685 goto bad;
12686 }
12687 } else {
12688 if (strcmp(straddr, "::1") != 0) {
12689 goto bad;
12690 }
12691 }
12692 inet6++;
12693 break;
12694 case AF_UNSPEC:
12695 goto bad;
12696 break;
12697 default:
12698 /* another family support? */
12699 break;
12700 }
12701 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012702 freeaddrinfo(aitop);
12703 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012704 }
12705
12706 if (!(inet4 == 0 || inet4 == 2))
12707 goto bad;
12708 if (!(inet6 == 0 || inet6 == 2))
12709 goto bad;
12710
12711 if (aitop)
12712 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012713 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012714
12715 bad:
12716 if (aitop)
12717 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012718 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719}
12720
Martin v. Löwis11437992002-04-12 09:54:03 +000012721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012723 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012724else
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012731fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012732
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12736$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12737
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012738if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012739then
12740 if test $ipv6 = yes
12741 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742 echo 'Fatal: You must get working getaddrinfo() function.'
12743 echo ' or you can specify "--disable-ipv6"'.
12744 exit 1
12745 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012746else
Martin v. Löwis11437992002-04-12 09:54:03 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012749
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012751
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012752for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012753do :
12754 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012755if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012758_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012759
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760fi
12761done
12762
Michael W. Hudson54241132001-12-07 15:38:26 +000012763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12766$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012767if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769else
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012771/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772#include <sys/types.h>
12773#include <sys/time.h>
12774#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776int
12777main ()
12778{
12779if ((struct tm *) 0)
12780return 0;
12781 ;
12782 return 0;
12783}
12784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012786 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12793$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012794if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012797
12798fi
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12801$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012802if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804else
Matthias Kloseb9621712010-04-24 17:59:49 +000012805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807#include <sys/types.h>
12808#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012809
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813struct tm tm;
12814 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 ;
12817 return 0;
12818}
12819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012820if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012821 ac_cv_struct_tm=time.h
12822else
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12828$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012829if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832
12833fi
12834
Matthias Kloseb9621712010-04-24 17:59:49 +000012835ac_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 +000012836#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838"
Victor Stinnere0be4232011-10-25 13:06:09 +020012839if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012840
12841cat >>confdefs.h <<_ACEOF
12842#define HAVE_STRUCT_TM_TM_ZONE 1
12843_ACEOF
12844
12845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012847
Martin v. Löwis11437992002-04-12 09:54:03 +000012848if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851
12852else
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12854"
Victor Stinnere0be4232011-10-25 13:06:09 +020012855if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859fi
12860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012862#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863_ACEOF
12864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12866$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012867if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869else
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012872#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873#if !HAVE_DECL_TZNAME
12874extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012876
Martin v. Löwis11437992002-04-12 09:54:03 +000012877int
12878main ()
12879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 ;
12882 return 0;
12883}
12884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012885if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886 ac_cv_var_tzname=yes
12887else
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012890rm -f core conftest.err conftest.$ac_objext \
12891 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12894$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012895 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012898
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012899 fi
12900fi
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902ac_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 +020012903if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
12905cat >>confdefs.h <<_ACEOF
12906#define HAVE_STRUCT_STAT_ST_RDEV 1
12907_ACEOF
12908
12909
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012910fi
12911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912ac_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 +020012913if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012914
Martin v. Löwis11437992002-04-12 09:54:03 +000012915cat >>confdefs.h <<_ACEOF
12916#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12917_ACEOF
12918
12919
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012920fi
12921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922ac_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 +020012923if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012924
12925cat >>confdefs.h <<_ACEOF
12926#define HAVE_STRUCT_STAT_ST_FLAGS 1
12927_ACEOF
12928
12929
12930fi
12931
Matthias Kloseb9621712010-04-24 17:59:49 +000012932ac_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 +020012933if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012934
12935cat >>confdefs.h <<_ACEOF
12936#define HAVE_STRUCT_STAT_ST_GEN 1
12937_ACEOF
12938
12939
12940fi
12941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942ac_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 +020012943if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012944
12945cat >>confdefs.h <<_ACEOF
12946#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12947_ACEOF
12948
12949
12950fi
12951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952ac_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 +020012953if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012954
Martin v. Löwis11437992002-04-12 09:54:03 +000012955cat >>confdefs.h <<_ACEOF
12956#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12957_ACEOF
12958
12959
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012960fi
12961
Stefan Krah267b6392016-04-26 01:09:18 +020012962ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12963 #include <sys/types.h>
12964 #include <pwd.h>
12965
12966"
12967if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12968
12969cat >>confdefs.h <<_ACEOF
12970#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12971_ACEOF
12972
12973
12974fi
12975ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12976 #include <sys/types.h>
12977 #include <pwd.h>
12978
12979"
12980if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12981
12982cat >>confdefs.h <<_ACEOF
12983#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12984_ACEOF
12985
12986
12987fi
12988
Zachary Ware6a6967e2016-10-01 00:47:27 -050012989# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
12990ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
12991"
12992if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
12993
12994cat >>confdefs.h <<_ACEOF
12995#define HAVE_SIGINFO_T_SI_BAND 1
12996_ACEOF
12997
12998
12999fi
13000
Michael W. Hudson54241132001-12-07 15:38:26 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13003$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013004if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006else
Matthias Kloseb159a552010-04-25 21:00:44 +000013007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013009/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013010#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013011int
13012main ()
13013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013014return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 ;
13016 return 0;
13017}
13018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020 ac_cv_header_time_altzone=yes
13021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026fi
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13029$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033
13034fi
13035
Guido van Rossumda88dad1995-01-26 00:46:29 +000013036was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13038$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013041
13042#include <sys/types.h>
13043#include <sys/select.h>
13044#include <sys/time.h>
13045
Martin v. Löwis11437992002-04-12 09:54:03 +000013046int
13047main ()
13048{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013049;
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 ;
13051 return 0;
13052}
13053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013055
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013058
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013059 was_it_defined=yes
13060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13064$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13067$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013068if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013073#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013074int
13075main ()
13076{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013077struct addrinfo a
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öwis01dfdb32001-06-23 16:30:13 +000013083 ac_cv_struct_addrinfo=yes
13084else
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13088fi
13089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13091$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013092if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095
13096fi
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13099$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013100if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013105
13106# include <sys/types.h>
13107# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013108int
13109main ()
13110{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 ;
13113 return 0;
13114}
13115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013117 ac_cv_struct_sockaddr_storage=yes
13118else
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13122fi
13123
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13125$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013129
13130fi
13131
Christian Heimesdffa3942016-09-05 23:54:41 +020013132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13133$as_echo_n "checking for sockaddr_alg... " >&6; }
13134if ${ac_cv_struct_sockaddr_alg+:} false; then :
13135 $as_echo_n "(cached) " >&6
13136else
13137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13138/* end confdefs.h. */
13139
13140# include <sys/types.h>
13141# include <sys/socket.h>
13142# include <linux/if_alg.h>
13143int
13144main ()
13145{
13146struct sockaddr_alg s
13147 ;
13148 return 0;
13149}
13150_ACEOF
13151if ac_fn_c_try_compile "$LINENO"; then :
13152 ac_cv_struct_sockaddr_alg=yes
13153else
13154 ac_cv_struct_sockaddr_alg=no
13155fi
13156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13157fi
13158
13159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13160$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13161if test $ac_cv_struct_sockaddr_alg = yes; then
13162
13163$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13164
13165fi
13166
Guido van Rossum627b2d71993-12-24 10:39:16 +000013167# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13170$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013171if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013173else
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013176$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013177int
13178main ()
13179{
13180static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013181test_array [0] = 0;
13182return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013183
13184 ;
13185 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013186}
Martin v. Löwis11437992002-04-12 09:54:03 +000013187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013188if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013189 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013190else
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13196$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013197if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013199
13200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13203$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013204if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013209
Martin v. Löwis11437992002-04-12 09:54:03 +000013210int
13211main ()
13212{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013213
Martin v. Löwis11437992002-04-12 09:54:03 +000013214#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013215 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013216 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013217 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219 char const *const *pcpcc;
13220 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 /* NEC SVR4.0.2 mips cc rejects this. */
13222 struct point {int x, y;};
13223 static struct point const zero = {0,0};
13224 /* AIX XL C 1.02.0.0 rejects this.
13225 It does not let you subtract one const X* pointer from another in
13226 an arm of an if-expression whose if-part is not a constant
13227 expression */
13228 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013229 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013231 ++pcpcc;
13232 ppc = (char**) pcpcc;
13233 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013234 { /* SCO 3.2v4 cc rejects this sort of thing. */
13235 char tx;
13236 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013240 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 }
13242 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13243 int x[] = {25, 17};
13244 const int *foo = &x[0];
13245 ++foo;
13246 }
13247 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13248 typedef const int *iptr;
13249 iptr p = 0;
13250 ++p;
13251 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013252 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013254 struct s { int j; const int *ap[3]; } bx;
13255 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 }
13257 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13258 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013260 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013261 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013262#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 ;
13265 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013266}
Martin v. Löwis11437992002-04-12 09:54:03 +000013267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013268if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013269 ac_cv_c_const=yes
13270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13276$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280
13281fi
13282
Michael W. Hudson54241132001-12-07 15:38:26 +000013283
Guido van Rossumda88dad1995-01-26 00:46:29 +000013284works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13286$as_echo_n "checking for working signed char... " >&6; }
13287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013288/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290int
13291main ()
13292{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013294 ;
13295 return 0;
13296}
13297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013298if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013299 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013300else
Skip Montanaro6dead952003-09-25 14:50:04 +000013301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013303
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013304
Guido van Rossum7f43da71994-08-01 12:15:30 +000013305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13308$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013309
Guido van Rossumda88dad1995-01-26 00:46:29 +000013310have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13312$as_echo_n "checking for prototypes... " >&6; }
13313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013314/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013315int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013316int
13317main ()
13318{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 ;
13321 return 0;
13322}
13323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013327
Matthias Kloseb159a552010-04-25 21:00:44 +000013328 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13332$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333
Guido van Rossumda88dad1995-01-26 00:46:29 +000013334works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13336$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013338/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013339
13340#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013341int foo(int x, ...) {
13342 va_list va;
13343 va_start(va, x);
13344 va_arg(va, int);
13345 va_arg(va, char *);
13346 va_arg(va, double);
13347 return 0;
13348}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350int
13351main ()
13352{
Guido van Rossum90eea071996-08-30 20:58:57 +000013353return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 ;
13355 return 0;
13356}
13357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013363 works=yes
13364
Guido van Rossum627b2d71993-12-24 10:39:16 +000013365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13368$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369
Martin v. Löwisd6320502004-08-12 13:45:08 +000013370# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13372$as_echo_n "checking for socketpair... " >&6; }
13373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013374/* end confdefs.h. */
13375
13376#include <sys/types.h>
13377#include <sys/socket.h>
13378
13379int
13380main ()
13381{
13382void *x=socketpair
13383 ;
13384 return 0;
13385}
13386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013390
Matthias Kloseb159a552010-04-25 21:00:44 +000013391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13395$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013396
13397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013399
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013400# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13402$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013404/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013405#include <sys/types.h>
13406#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013407int
13408main ()
13409{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013410struct sockaddr x;
13411x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 ;
13413 return 0;
13414}
13415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013416if ac_fn_c_try_compile "$LINENO"; then :
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13418$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013421
13422else
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13424$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013425
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013429# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
13431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013433if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013436
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13438$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013439 OLD_CFLAGS=$CFLAGS
13440 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013442/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013443
13444# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
Martin v. Löwis11437992002-04-12 09:54:03 +000013446int
13447main ()
13448{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013449
13450 char *name;
13451 struct hostent *he, *res;
13452 char buffer[2048];
13453 int buflen = 2048;
13454 int h_errnop;
13455
13456 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013457
13458 ;
13459 return 0;
13460}
13461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013465
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13470$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013472else
Skip Montanaro6dead952003-09-25 14:50:04 +000013473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13475$as_echo "no" >&6; }
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13477$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013481# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483int
13484main ()
13485{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013486
13487 char *name;
13488 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013489 char buffer[2048];
13490 int buflen = 2048;
13491 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013492
Matthias Kloseb159a552010-04-25 21:00:44 +000013493 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
13495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503
Matthias Kloseb159a552010-04-25 21:00:44 +000013504$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13507$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013509else
Skip Montanaro6dead952003-09-25 14:50:04 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13514$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13516/* end confdefs.h. */
13517
13518# include <netdb.h>
13519
13520int
13521main ()
13522{
13523
13524 char *name;
13525 struct hostent *he;
13526 struct hostent_data data;
13527
13528 (void) gethostbyname_r(name, he, &data);
13529
13530 ;
13531 return 0;
13532}
13533_ACEOF
13534if ac_fn_c_try_compile "$LINENO"; then :
13535
13536 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13537
13538
13539$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13540
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13542$as_echo "yes" >&6; }
13543
13544else
13545
13546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13547$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013557 CFLAGS=$OLD_CFLAGS
13558
13559else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 for ac_func in gethostbyname
13562do :
13563 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013564if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013567_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013569fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013570done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013571
Michael W. Hudson54241132001-12-07 15:38:26 +000013572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013573fi
13574
Michael W. Hudson54241132001-12-07 15:38:26 +000013575
13576
13577
13578
13579
13580
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581# checks for system services
13582# (none yet)
13583
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013584# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013585ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013586if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013587
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13590$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013591if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593else
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013595LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013599/* Override any GCC internal prototype to avoid an error.
13600 Use char because int might match the return type of a GCC
13601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013602#ifdef __cplusplus
13603extern "C"
13604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013605char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013606int
13607main ()
13608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 ;
13611 return 0;
13612}
13613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013616else
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013619rm -f core conftest.err conftest.$ac_objext \
13620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013621LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13624$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013625if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 cat >>confdefs.h <<_ACEOF
13627#define HAVE_LIBIEEE 1
13628_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013629
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013630 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013631
Guido van Rossum627b2d71993-12-24 10:39:16 +000013632fi
13633
Michael W. Hudson54241132001-12-07 15:38:26 +000013634
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013635fi
13636
Michael W. Hudson54241132001-12-07 15:38:26 +000013637
Guido van Rossum7f253911997-05-09 02:42:48 +000013638# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13640$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013645if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013646then
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13651$as_echo "yes" >&6; }
13652else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13653$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013654fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13657$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658fi
13659
Guido van Rossum7f253911997-05-09 02:42:48 +000013660
Guido van Rossum7f43da71994-08-01 12:15:30 +000013661# check for --with-libm=...
13662
Guido van Rossum563e7081996-09-10 18:20:48 +000013663case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013664Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013665*) LIBM=-lm
13666esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13668$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013671if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013672 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013673if test "$withval" = no
13674then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13676$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013677elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013678then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13680$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013681else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013682fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013683else
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13685$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013686fi
13687
Guido van Rossum7f43da71994-08-01 12:15:30 +000013688
13689# check for --with-libc=...
13690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13692$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013697if test "$withval" = no
13698then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13700$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013701elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013702then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13704$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013705else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013706fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013707else
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13709$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710fi
13711
Guido van Rossum7f43da71994-08-01 12:15:30 +000013712
Stefan Krah1919b7e2012-03-21 18:25:23 +010013713# **************************************
13714# * Check for gcc x64 inline assembler *
13715# **************************************
13716
13717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13718$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13720/* end confdefs.h. */
13721
13722int
13723main ()
13724{
13725
13726 __asm__ __volatile__ ("movq %rcx, %rax");
13727
13728 ;
13729 return 0;
13730}
13731_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013732if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013733 have_gcc_asm_for_x64=yes
13734else
13735 have_gcc_asm_for_x64=no
13736fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013737rm -f core conftest.err conftest.$ac_objext \
13738 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13740$as_echo "$have_gcc_asm_for_x64" >&6; }
13741if test "$have_gcc_asm_for_x64" = yes
13742then
13743
13744$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13745
13746fi
13747
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013748# **************************************************
13749# * Check for various properties of floating point *
13750# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013751
Matthias Kloseb9621712010-04-24 17:59:49 +000013752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13753$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013754if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013756else
13757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759 ac_cv_little_endian_double=no
13760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762/* end confdefs.h. */
13763
13764#include <string.h>
13765int main() {
13766 double x = 9006104071832581.0;
13767 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13768 return 0;
13769 else
13770 return 1;
13771}
13772
13773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013774if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775 ac_cv_little_endian_double=yes
13776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013781fi
13782
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013783fi
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13786$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787if test "$ac_cv_little_endian_double" = yes
13788then
13789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791
13792fi
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13795$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013796if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013798else
13799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013801 ac_cv_big_endian_double=no
13802else
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804/* end confdefs.h. */
13805
13806#include <string.h>
13807int main() {
13808 double x = 9006104071832581.0;
13809 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13810 return 0;
13811 else
13812 return 1;
13813}
13814
13815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013816if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013817 ac_cv_big_endian_double=yes
13818else
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823fi
13824
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825fi
13826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13828$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013829if test "$ac_cv_big_endian_double" = yes
13830then
13831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013833
13834fi
13835
13836# Some ARM platforms use a mixed-endian representation for doubles.
13837# While Python doesn't currently have full support for these platforms
13838# (see e.g., issue 1762561), we can at least make sure that float <-> string
13839# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13841$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013842if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844else
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847 ac_cv_mixed_endian_double=no
13848else
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850/* end confdefs.h. */
13851
13852#include <string.h>
13853int main() {
13854 double x = 9006104071832581.0;
13855 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13856 return 0;
13857 else
13858 return 1;
13859}
13860
13861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863 ac_cv_mixed_endian_double=yes
13864else
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869fi
13870
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871fi
13872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13874$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013875if test "$ac_cv_mixed_endian_double" = yes
13876then
13877
Matthias Kloseb9621712010-04-24 17:59:49 +000013878$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879
13880fi
13881
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013882# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013883# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013884# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013885# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013886# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013887# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013888
13889# This inline assembler syntax may also work for suncc and icc,
13890# so we try it on all platforms.
13891
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13893$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895/* end confdefs.h. */
13896
13897int
13898main ()
13899{
13900
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013901 unsigned short cw;
13902 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13903 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904
13905 ;
13906 return 0;
13907}
13908_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013909if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013910 have_gcc_asm_for_x87=yes
13911else
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013913fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013914rm -f core conftest.err conftest.$ac_objext \
13915 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13917$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013918if test "$have_gcc_asm_for_x87" = yes
13919then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13926$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13928/* end confdefs.h. */
13929
13930int
13931main ()
13932{
13933
13934 unsigned int fpcr;
13935 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13936 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13937
13938 ;
13939 return 0;
13940}
13941_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013942if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013943 have_gcc_asm_for_mc68881=yes
13944else
13945 have_gcc_asm_for_mc68881=no
13946fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013947rm -f core conftest.err conftest.$ac_objext \
13948 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13950$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13951if test "$have_gcc_asm_for_mc68881" = yes
13952then
13953
13954$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13955
13956fi
13957
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013958# Detect whether system arithmetic is subject to x87-style double
13959# rounding issues. The result of this test has little meaning on non
13960# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13961# mode is round-to-nearest and double rounding issues are present, and
13962# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13964$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965# $BASECFLAGS may affect the result
13966ac_save_cc="$CC"
13967CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013968if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013969 ac_cv_x87_double_rounding=no
13970else
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013972/* end confdefs.h. */
13973
13974#include <stdlib.h>
13975#include <math.h>
13976int main() {
13977 volatile double x, y, z;
13978 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13979 x = 0.99999999999999989; /* 1-2**-53 */
13980 y = 1./x;
13981 if (y != 1.)
13982 exit(0);
13983 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13984 x = 1e16;
13985 y = 2.99999;
13986 z = x + y;
13987 if (z != 1e16+4.)
13988 exit(0);
13989 /* both tests show evidence of double rounding */
13990 exit(1);
13991}
13992
13993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013994if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013995 ac_cv_x87_double_rounding=no
13996else
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014001fi
14002
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14005$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014006if test "$ac_cv_x87_double_rounding" = yes
14007then
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014010
14011fi
14012
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014013# ************************************
14014# * Check for mathematical functions *
14015# ************************************
14016
14017LIBS_SAVE=$LIBS
14018LIBS="$LIBS $LIBM"
14019
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014020for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14021do :
14022 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14023ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014024if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014025 cat >>confdefs.h <<_ACEOF
14026#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14027_ACEOF
14028
14029fi
14030done
14031
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014032for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014033do :
14034 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14035ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014036if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014037 cat >>confdefs.h <<_ACEOF
14038#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14039_ACEOF
14040
14041fi
14042done
14043
14044ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14045"
Victor Stinnere0be4232011-10-25 13:06:09 +020014046if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014047 ac_have_decl=1
14048else
14049 ac_have_decl=0
14050fi
14051
14052cat >>confdefs.h <<_ACEOF
14053#define HAVE_DECL_ISINF $ac_have_decl
14054_ACEOF
14055ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14056"
Victor Stinnere0be4232011-10-25 13:06:09 +020014057if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014058 ac_have_decl=1
14059else
14060 ac_have_decl=0
14061fi
14062
14063cat >>confdefs.h <<_ACEOF
14064#define HAVE_DECL_ISNAN $ac_have_decl
14065_ACEOF
14066ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14067"
Victor Stinnere0be4232011-10-25 13:06:09 +020014068if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014069 ac_have_decl=1
14070else
14071 ac_have_decl=0
14072fi
14073
14074cat >>confdefs.h <<_ACEOF
14075#define HAVE_DECL_ISFINITE $ac_have_decl
14076_ACEOF
14077
14078
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014079# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14080# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14082$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014085else
14086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014088 ac_cv_tanh_preserves_zero_sign=no
14089else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014091/* end confdefs.h. */
14092
14093#include <math.h>
14094#include <stdlib.h>
14095int main() {
14096 /* return 0 if either negative zeros don't exist
14097 on this platform or if negative zeros exist
14098 and tanh(-0.) == -0. */
14099 if (atan2(0., -1.) == atan2(-0., -1.) ||
14100 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14101 else exit(1);
14102}
14103
14104_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014105if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014106 ac_cv_tanh_preserves_zero_sign=yes
14107else
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14111 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014112fi
14113
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014114fi
14115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14117$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014118if test "$ac_cv_tanh_preserves_zero_sign" = yes
14119then
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014122
14123fi
14124
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125if test "$ac_cv_func_log1p" = yes
14126then
14127 # On some versions of AIX, log1p(-0.) returns 0. instead of
14128 # -0. See issue #9920.
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14130$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014131 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014132 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014133else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014134
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014135 if test "$cross_compiling" = yes; then :
14136 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014137else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14139/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014140
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014141 #include <math.h>
14142 #include <stdlib.h>
14143 int main() {
14144 /* Fail if the signs of log1p(-0.) and -0. can be
14145 distinguished. */
14146 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14147 return 0;
14148 else
14149 return 1;
14150 }
14151
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014152_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014153if ac_fn_c_try_run "$LINENO"; then :
14154 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014155else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014156 ac_cv_log1p_drops_zero_sign=yes
14157fi
14158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014161
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014162fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014163
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14165$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14166fi
14167if test "$ac_cv_log1p_drops_zero_sign" = yes
14168then
14169
14170$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14171
14172fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014173
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014174LIBS=$LIBS_SAVE
14175
Mark Dickinsona614f042009-11-28 12:48:43 +000014176# For multiprocessing module, check that sem_open
14177# actually works. For FreeBSD versions <= 7.2,
14178# the kernel module that provides POSIX semaphores
14179# isn't loaded by default, so an attempt to call
14180# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14182$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014183if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014185else
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014187 ac_cv_posix_semaphores_enabled=yes
14188else
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014190/* end confdefs.h. */
14191
14192#include <unistd.h>
14193#include <fcntl.h>
14194#include <stdio.h>
14195#include <semaphore.h>
14196#include <sys/stat.h>
14197
14198int main(void) {
14199 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14200 if (a == SEM_FAILED) {
14201 perror("sem_open");
14202 return 1;
14203 }
14204 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014205 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014206 return 0;
14207}
14208
14209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014211 ac_cv_posix_semaphores_enabled=yes
14212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014217fi
14218
14219
Mark Dickinsona614f042009-11-28 12:48:43 +000014220fi
14221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14223$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014224if test $ac_cv_posix_semaphores_enabled = no
14225then
14226
Matthias Kloseb9621712010-04-24 17:59:49 +000014227$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014228
14229fi
14230
Mark Dickinson10683072009-04-18 21:18:19 +000014231# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14233$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014234if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014236else
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014239else
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014241/* end confdefs.h. */
14242
14243#include <unistd.h>
14244#include <fcntl.h>
14245#include <stdio.h>
14246#include <semaphore.h>
14247#include <sys/stat.h>
14248
14249int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014250 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014251 int count;
14252 int res;
14253 if(a==SEM_FAILED){
14254 perror("sem_open");
14255 return 1;
14256
14257 }
14258 res = sem_getvalue(a, &count);
14259 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014260 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014261 return res==-1 ? 1 : 0;
14262}
14263
Mark Dickinson10683072009-04-18 21:18:19 +000014264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014265if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14271 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014272fi
14273
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275fi
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14278$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014279if test $ac_cv_broken_sem_getvalue = yes
14280then
14281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014283
14284fi
14285
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014286ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14287"
14288if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14289 ac_have_decl=1
14290else
14291 ac_have_decl=0
14292fi
14293
14294cat >>confdefs.h <<_ACEOF
14295#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14296_ACEOF
14297ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14298"
14299if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14300 ac_have_decl=1
14301else
14302 ac_have_decl=0
14303fi
14304
14305cat >>confdefs.h <<_ACEOF
14306#define HAVE_DECL_RTLD_NOW $ac_have_decl
14307_ACEOF
14308ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14309"
14310if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14311 ac_have_decl=1
14312else
14313 ac_have_decl=0
14314fi
14315
14316cat >>confdefs.h <<_ACEOF
14317#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14318_ACEOF
14319ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14320"
14321if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14322 ac_have_decl=1
14323else
14324 ac_have_decl=0
14325fi
14326
14327cat >>confdefs.h <<_ACEOF
14328#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14329_ACEOF
14330ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14331"
14332if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14333 ac_have_decl=1
14334else
14335 ac_have_decl=0
14336fi
14337
14338cat >>confdefs.h <<_ACEOF
14339#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14340_ACEOF
14341ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14342"
14343if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14344 ac_have_decl=1
14345else
14346 ac_have_decl=0
14347fi
14348
14349cat >>confdefs.h <<_ACEOF
14350#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14351_ACEOF
14352ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14353"
14354if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14355 ac_have_decl=1
14356else
14357 ac_have_decl=0
14358fi
14359
14360cat >>confdefs.h <<_ACEOF
14361#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14362_ACEOF
14363
14364
Mark Dickinsonbd792642009-03-18 20:06:12 +000014365# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14367$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014368# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014369if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014370 enableval=$enable_big_digits; case $enable_big_digits in
14371yes)
14372 enable_big_digits=30 ;;
14373no)
14374 enable_big_digits=15 ;;
1437515|30)
14376 ;;
14377*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014378 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 +000014379esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14381$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014382
14383cat >>confdefs.h <<_ACEOF
14384#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14385_ACEOF
14386
14387
14388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14390$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014391fi
14392
14393
Guido van Rossumef2255b2000-03-10 22:30:29 +000014394# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014395ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014396if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014397
14398
Matthias Kloseb9621712010-04-24 17:59:49 +000014399$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014401 wchar_h="yes"
14402
Guido van Rossumef2255b2000-03-10 22:30:29 +000014403else
Martin v. Löwis11437992002-04-12 09:54:03 +000014404 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014405
14406fi
14407
Michael W. Hudson54241132001-12-07 15:38:26 +000014408
Martin v. Löwis11437992002-04-12 09:54:03 +000014409
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014410# determine wchar_t size
14411if test "$wchar_h" = yes
14412then
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14416# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14418$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014419if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014421else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14423"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Martin v. Löwis11437992002-04-12 09:54:03 +000014425else
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 if test "$ac_cv_type_wchar_t" = yes; then
14427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014429as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014430See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431 else
14432 ac_cv_sizeof_wchar_t=0
14433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14438$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439
14440
14441
Martin v. Löwis11437992002-04-12 09:54:03 +000014442cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014443#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014445
Michael W. Hudson54241132001-12-07 15:38:26 +000014446
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014447fi
14448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14450$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014451have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014453/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014454
14455#include <tcl.h>
14456#if TCL_UTF_MAX != 6
14457# error "NOT UCS4_TCL"
14458#endif
14459int
14460main ()
14461{
14462
14463 ;
14464 return 0;
14465}
14466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014468
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014471
14472 have_ucs4_tcl=yes
14473
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14477$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014478
Skip Montanaro6dead952003-09-25 14:50:04 +000014479# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014480if test "$wchar_h" = yes
14481then
14482 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14484$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014485 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014487else
14488
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014490 ac_cv_wchar_t_signed=yes
14491else
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014493/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014494
14495 #include <wchar.h>
14496 int main()
14497 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014498 /* Success: exit code 0 */
14499 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014500 }
14501
14502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014503if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014504 ac_cv_wchar_t_signed=yes
14505else
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014510fi
14511
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014512fi
14513
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14515$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516fi
14517
Georg Brandl52d168a2008-01-07 18:10:24 +000014518# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014519if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014520 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014521then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014522 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Georg Brandl52d168a2008-01-07 18:10:24 +000014526else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014527 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014528fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14530$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014531
14532# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14534$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014535if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 ac_cv_c_bigendian=unknown
14539 # See if we're dealing with a universal compiler.
14540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14541/* end confdefs.h. */
14542#ifndef __APPLE_CC__
14543 not a universal capable compiler
14544 #endif
14545 typedef int dummy;
14546
Skip Montanaro6dead952003-09-25 14:50:04 +000014547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014548if ac_fn_c_try_compile "$LINENO"; then :
14549
14550 # Check for potential -arch flags. It is not universal unless
14551 # there are at least two -arch flags with different values.
14552 ac_arch=
14553 ac_prev=
14554 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14555 if test -n "$ac_prev"; then
14556 case $ac_word in
14557 i?86 | x86_64 | ppc | ppc64)
14558 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14559 ac_arch=$ac_word
14560 else
14561 ac_cv_c_bigendian=universal
14562 break
14563 fi
14564 ;;
14565 esac
14566 ac_prev=
14567 elif test "x$ac_word" = "x-arch"; then
14568 ac_prev=arch
14569 fi
14570 done
14571fi
14572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14573 if test $ac_cv_c_bigendian = unknown; then
14574 # See if sys/param.h defines the BYTE_ORDER macro.
14575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014576/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579
Martin v. Löwis11437992002-04-12 09:54:03 +000014580int
14581main ()
14582{
Matthias Kloseb9621712010-04-24 17:59:49 +000014583#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14584 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14585 && LITTLE_ENDIAN)
14586 bogus endian macros
14587 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014588
14589 ;
14590 return 0;
14591}
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014594 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014596/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600int
14601main ()
14602{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014603#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 not big endian
14605 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
14607 ;
14608 return 0;
14609}
14610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014611if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014612 ac_cv_c_bigendian=yes
14613else
Matthias Kloseb9621712010-04-24 17:59:49 +000014614 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014617fi
14618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14619 fi
14620 if test $ac_cv_c_bigendian = unknown; then
14621 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014623/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014624#include <limits.h>
14625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626int
14627main ()
14628{
Matthias Kloseb9621712010-04-24 17:59:49 +000014629#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14630 bogus endian macros
14631 #endif
14632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 ;
14634 return 0;
14635}
14636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014637if ac_fn_c_try_compile "$LINENO"; then :
14638 # It does; now see whether it defined to _BIG_ENDIAN or not.
14639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14640/* end confdefs.h. */
14641#include <limits.h>
14642
14643int
14644main ()
14645{
14646#ifndef _BIG_ENDIAN
14647 not big endian
14648 #endif
14649
14650 ;
14651 return 0;
14652}
14653_ACEOF
14654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014656else
Matthias Kloseb9621712010-04-24 17:59:49 +000014657 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660fi
14661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14662 fi
14663 if test $ac_cv_c_bigendian = unknown; then
14664 # Compile a test program.
14665 if test "$cross_compiling" = yes; then :
14666 # Try to guess by grepping values from an object file.
14667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14668/* end confdefs.h. */
14669short int ascii_mm[] =
14670 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14671 short int ascii_ii[] =
14672 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14673 int use_ascii (int i) {
14674 return ascii_mm[i] + ascii_ii[i];
14675 }
14676 short int ebcdic_ii[] =
14677 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14678 short int ebcdic_mm[] =
14679 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14680 int use_ebcdic (int i) {
14681 return ebcdic_mm[i] + ebcdic_ii[i];
14682 }
14683 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684
Matthias Kloseb9621712010-04-24 17:59:49 +000014685int
14686main ()
14687{
14688return use_ascii (foo) == use_ebcdic (foo);
14689 ;
14690 return 0;
14691}
14692_ACEOF
14693if ac_fn_c_try_compile "$LINENO"; then :
14694 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14695 ac_cv_c_bigendian=yes
14696 fi
14697 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14698 if test "$ac_cv_c_bigendian" = unknown; then
14699 ac_cv_c_bigendian=no
14700 else
14701 # finding both strings is unlikely to happen, but who knows?
14702 ac_cv_c_bigendian=unknown
14703 fi
14704 fi
14705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014707else
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014709/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014711int
14712main ()
14713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 /* Are we little or big endian? From Harbison&Steele. */
14716 union
14717 {
14718 long int l;
14719 char c[sizeof (long int)];
14720 } u;
14721 u.l = 1;
14722 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723
14724 ;
14725 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014726}
Martin v. Löwis11437992002-04-12 09:54:03 +000014727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014729 ac_cv_c_bigendian=no
14730else
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14740$as_echo "$ac_cv_c_bigendian" >&6; }
14741 case $ac_cv_c_bigendian in #(
14742 yes)
14743 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14744;; #(
14745 no)
14746 ;; #(
14747 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014750
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 ;; #(
14752 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014753 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014754 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014756
Michael W. Hudson54241132001-12-07 15:38:26 +000014757
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014758# ABI version string for Python extension modules. This appears between the
14759# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14760# from the following attributes which affect the ABI of this Python build (in
14761# this order):
14762#
14763# * The Python implementation (always 'cpython-' for us)
14764# * The major and minor version numbers
14765# * --with-pydebug (adds a 'd')
14766# * --with-pymalloc (adds a 'm')
14767# * --with-wide-unicode (adds a 'u')
14768#
14769# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014770# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14771# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014772
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14774$as_echo_n "checking ABIFLAGS... " >&6; }
14775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14776$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14778$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014779SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14781$as_echo "$SOABI" >&6; }
14782
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014783
14784case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014785 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014786 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14787 *)
14788 EXT_SUFFIX=${SHLIB_SUFFIX};;
14789esac
14790
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14792$as_echo_n "checking LDVERSION... " >&6; }
14793LDVERSION='$(VERSION)$(ABIFLAGS)'
14794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14795$as_echo "$LDVERSION" >&6; }
14796
doko@python.org87421192013-01-26 11:39:31 +010014797
doko@ubuntu.com55532312016-06-14 08:55:19 +020014798if test x$PLATFORM_TRIPLET = x; then
14799 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14800else
14801 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14802fi
doko@python.org87421192013-01-26 11:39:31 +010014803
14804
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014805# Check whether right shifting a negative integer extends the sign bit
14806# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14808$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014809if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014811else
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014814 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014817/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014818
14819int main()
14820{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014821 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014822}
14823
Martin v. Löwis11437992002-04-12 09:54:03 +000014824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014825if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014826 ac_cv_rshift_extends_sign=yes
14827else
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014832fi
14833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834fi
14835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14837$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014838if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014839then
Martin v. Löwis11437992002-04-12 09:54:03 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014842
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014843fi
14844
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014845# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14847$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014848if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014850else
Martin v. Löwis11437992002-04-12 09:54:03 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014853/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014854#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014855int
14856main ()
14857{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014858
14859 FILE *f = fopen("/dev/null", "r");
14860 flockfile(f);
14861 getc_unlocked(f);
14862 funlockfile(f);
14863
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ;
14865 return 0;
14866}
14867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014868if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014869 ac_cv_have_getc_unlocked=yes
14870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 ac_cv_have_getc_unlocked=no
14872fi
14873rm -f core conftest.err conftest.$ac_objext \
14874 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14878$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014879if test "$ac_cv_have_getc_unlocked" = yes
14880then
Martin v. Löwis11437992002-04-12 09:54:03 +000014881
Matthias Kloseb9621712010-04-24 17:59:49 +000014882$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014883
14884fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014885
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014886# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014887# save the value of LIBS so we don't actually link Python with readline
14888LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014889
Gregory P. Smith18820942008-09-07 06:24:49 +000014890# On some systems we need to link readline to a termcap compatible
14891# library. NOTE: Keep the precedence of listed libraries synchronised
14892# with setup.py.
14893py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14895$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014896for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014897 if test -z "$py_libtermcap"; then
14898 READLINE_LIBS="-lreadline"
14899 else
14900 READLINE_LIBS="-lreadline -l$py_libtermcap"
14901 fi
14902 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014904/* end confdefs.h. */
14905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906/* Override any GCC internal prototype to avoid an error.
14907 Use char because int might match the return type of a GCC
14908 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014909#ifdef __cplusplus
14910extern "C"
14911#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014912char readline ();
14913int
14914main ()
14915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014917 ;
14918 return 0;
14919}
14920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014921if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014922 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014924rm -f core conftest.err conftest.$ac_objext \
14925 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014926 if test $py_cv_lib_readline = yes; then
14927 break
14928 fi
14929done
14930# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14931#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014932if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14934$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014935else
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14937$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014940
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014941fi
14942
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014943# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014946#include <readline/readline.h>
14947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014948if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014949 have_readline=yes
14950else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014951 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014952
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014953fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014954rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014955if test $have_readline = yes
14956then
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014958/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014959#include <readline/readline.h>
14960
14961_ACEOF
14962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014966
14967fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014968rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014971/* end confdefs.h. */
14972#include <readline/readline.h>
14973
14974_ACEOF
14975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014979
14980fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014981rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014982
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983fi
14984
Martin v. Löwis0daad592001-09-30 21:09:59 +000014985# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14987$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014988if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014990else
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014992LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996/* Override any GCC internal prototype to avoid an error.
14997 Use char because int might match the return type of a GCC
14998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014999#ifdef __cplusplus
15000extern "C"
15001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015002char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015003int
15004main ()
15005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ;
15008 return 0;
15009}
15010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015013else
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015016rm -f core conftest.err conftest.$ac_objext \
15017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015018LIBS=$ac_check_lib_save_LIBS
15019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15021$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015022if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015025
Martin v. Löwis0daad592001-09-30 21:09:59 +000015026fi
15027
Michael W. Hudson54241132001-12-07 15:38:26 +000015028
Thomas Wouters89d996e2007-09-08 17:39:28 +000015029# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15031$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015032if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015034else
15035 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015036LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015038/* end confdefs.h. */
15039
15040/* Override any GCC internal prototype to avoid an error.
15041 Use char because int might match the return type of a GCC
15042 builtin and then its argument prototype would still apply. */
15043#ifdef __cplusplus
15044extern "C"
15045#endif
15046char rl_completion_display_matches_hook ();
15047int
15048main ()
15049{
15050return rl_completion_display_matches_hook ();
15051 ;
15052 return 0;
15053}
15054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015055if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015056 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15057else
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015060rm -f core conftest.err conftest.$ac_objext \
15061 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015062LIBS=$ac_check_lib_save_LIBS
15063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15065$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015069
15070fi
15071
15072
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015073# also in 4.0, but not in editline
15074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15075$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15076if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15077 $as_echo_n "(cached) " >&6
15078else
15079 ac_check_lib_save_LIBS=$LIBS
15080LIBS="-lreadline $READLINE_LIBS $LIBS"
15081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h. */
15083
15084/* Override any GCC internal prototype to avoid an error.
15085 Use char because int might match the return type of a GCC
15086 builtin and then its argument prototype would still apply. */
15087#ifdef __cplusplus
15088extern "C"
15089#endif
15090char rl_resize_terminal ();
15091int
15092main ()
15093{
15094return rl_resize_terminal ();
15095 ;
15096 return 0;
15097}
15098_ACEOF
15099if ac_fn_c_try_link "$LINENO"; then :
15100 ac_cv_lib_readline_rl_resize_terminal=yes
15101else
15102 ac_cv_lib_readline_rl_resize_terminal=no
15103fi
15104rm -f core conftest.err conftest.$ac_objext \
15105 conftest$ac_exeext conftest.$ac_ext
15106LIBS=$ac_check_lib_save_LIBS
15107fi
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15109$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15110if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15111
15112$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15113
15114fi
15115
15116
Martin v. Löwis0daad592001-09-30 21:09:59 +000015117# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15119$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015120if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015122else
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015124LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128/* Override any GCC internal prototype to avoid an error.
15129 Use char because int might match the return type of a GCC
15130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015131#ifdef __cplusplus
15132extern "C"
15133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015134char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015135int
15136main ()
15137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ;
15140 return 0;
15141}
15142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148rm -f core conftest.err conftest.$ac_objext \
15149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015150LIBS=$ac_check_lib_save_LIBS
15151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15153$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015154if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015157
Guido van Rossum353ae582001-07-10 16:45:32 +000015158fi
15159
Jack Jansendd19cf82001-12-06 22:36:17 +000015160
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015161# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163/* end confdefs.h. */
15164#include <readline/readline.h>
15165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015166if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015167 have_readline=yes
15168else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015170
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015172rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015173if test $have_readline = yes
15174then
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176/* end confdefs.h. */
15177#include <readline/readline.h>
15178
15179_ACEOF
15180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015184
15185fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015186rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187
15188fi
15189
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15191$as_echo_n "checking for append_history in -lreadline... " >&6; }
15192if ${ac_cv_lib_readline_append_history+:} false; then :
15193 $as_echo_n "(cached) " >&6
15194else
15195 ac_check_lib_save_LIBS=$LIBS
15196LIBS="-lreadline $READLINE_LIBS $LIBS"
15197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15198/* end confdefs.h. */
15199
15200/* Override any GCC internal prototype to avoid an error.
15201 Use char because int might match the return type of a GCC
15202 builtin and then its argument prototype would still apply. */
15203#ifdef __cplusplus
15204extern "C"
15205#endif
15206char append_history ();
15207int
15208main ()
15209{
15210return append_history ();
15211 ;
15212 return 0;
15213}
15214_ACEOF
15215if ac_fn_c_try_link "$LINENO"; then :
15216 ac_cv_lib_readline_append_history=yes
15217else
15218 ac_cv_lib_readline_append_history=no
15219fi
15220rm -f core conftest.err conftest.$ac_objext \
15221 conftest$ac_exeext conftest.$ac_ext
15222LIBS=$ac_check_lib_save_LIBS
15223fi
15224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15225$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15226if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15227
15228$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15229
15230fi
15231
15232
Martin v. Löwis82bca632006-02-10 20:49:30 +000015233# End of readline checks: restore LIBS
15234LIBS=$LIBS_no_readline
15235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15237$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015238if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015240else
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015243 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015244else
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015246/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015247
15248int main()
15249{
15250 int val1 = nice(1);
15251 if (val1 != -1 && val1 == nice(2))
15252 exit(0);
15253 exit(1);
15254}
15255
Martin v. Löwis11437992002-04-12 09:54:03 +000015256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015257if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015258 ac_cv_broken_nice=yes
15259else
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015264fi
15265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015266fi
15267
Matthias Kloseb9621712010-04-24 17:59:49 +000015268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15269$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015270if test "$ac_cv_broken_nice" = yes
15271then
Martin v. Löwis11437992002-04-12 09:54:03 +000015272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015274
15275fi
15276
Matthias Kloseb9621712010-04-24 17:59:49 +000015277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15278$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015279if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015281else
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015283 ac_cv_broken_poll=no
15284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015286/* end confdefs.h. */
15287
15288#include <poll.h>
15289
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015290int main()
15291{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015292 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015293 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015294
15295 close (42);
15296
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015297 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015299 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015300 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015303 return 1;
15304}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015305
15306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015307if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308 ac_cv_broken_poll=yes
15309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15313 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015316fi
15317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15319$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320if test "$ac_cv_broken_poll" = yes
15321then
15322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324
15325fi
15326
Brett Cannon43802422005-02-10 20:48:03 +000015327# 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 +000015328# (which is not required by ISO C or UNIX spec) and/or if we support
15329# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015330ac_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 +000015331#include <$ac_cv_struct_tm>
15332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333"
Victor Stinnere0be4232011-10-25 13:06:09 +020015334if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015335
15336cat >>confdefs.h <<_ACEOF
15337#define HAVE_STRUCT_TM_TM_ZONE 1
15338_ACEOF
15339
15340
15341fi
15342
15343if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15344
Matthias Kloseb9621712010-04-24 17:59:49 +000015345$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015346
15347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15349"
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352else
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354fi
15355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015357#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358_ACEOF
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15361$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015366/* end confdefs.h. */
15367#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368#if !HAVE_DECL_TZNAME
15369extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015370#endif
15371
15372int
15373main ()
15374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015376 ;
15377 return 0;
15378}
15379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015380if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015381 ac_cv_var_tzname=yes
15382else
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015385rm -f core conftest.err conftest.$ac_objext \
15386 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15389$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015390 if test $ac_cv_var_tzname = yes; then
15391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015393
15394 fi
15395fi
15396
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015397
Martin v. Löwis1d459062005-03-14 21:23:33 +000015398# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15400$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015401if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015402 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015403else
15404
Matthias Kloseb9621712010-04-24 17:59:49 +000015405if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015406 ac_cv_working_tzset=no
15407else
Matthias Kloseb9621712010-04-24 17:59:49 +000015408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015410
15411#include <stdlib.h>
15412#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015413#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015414
15415#if HAVE_TZNAME
15416extern char *tzname[];
15417#endif
15418
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015419int main()
15420{
Brett Cannon18367812003-09-19 00:59:16 +000015421 /* Note that we need to ensure that not only does tzset(3)
15422 do 'something' with localtime, but it works as documented
15423 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015424 This includes making sure that tzname is set properly if
15425 tm->tm_zone does not exist since it is the alternative way
15426 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015427
15428 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015429 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015430 */
15431
Martin v. Löwis1d459062005-03-14 21:23:33 +000015432 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015433 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15434
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015435 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015436 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015437 if (localtime(&groundhogday)->tm_hour != 0)
15438 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015439#if HAVE_TZNAME
15440 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15441 if (strcmp(tzname[0], "UTC") ||
15442 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15443 exit(1);
15444#endif
Brett Cannon18367812003-09-19 00:59:16 +000015445
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015446 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015447 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015448 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015449 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015450#if HAVE_TZNAME
15451 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15452 exit(1);
15453#endif
Brett Cannon18367812003-09-19 00:59:16 +000015454
15455 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15456 tzset();
15457 if (localtime(&groundhogday)->tm_hour != 11)
15458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015459#if HAVE_TZNAME
15460 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15461 exit(1);
15462#endif
15463
15464#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015465 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15466 exit(1);
15467 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15468 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015469#endif
Brett Cannon18367812003-09-19 00:59:16 +000015470
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015471 exit(0);
15472}
15473
15474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015475if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015476 ac_cv_working_tzset=yes
15477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015482fi
15483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484fi
15485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15487$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015488if test "$ac_cv_working_tzset" = yes
15489then
15490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015492
15493fi
15494
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015495# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15497$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015498if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015500else
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015502/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015503#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015504int
15505main ()
15506{
15507
15508struct stat st;
15509st.st_mtim.tv_nsec = 1;
15510
15511 ;
15512 return 0;
15513}
15514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015516 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15521fi
15522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15524$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015525if test "$ac_cv_stat_tv_nsec" = yes
15526then
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529
15530fi
15531
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015532# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15534$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015535if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015539/* end confdefs.h. */
15540#include <sys/stat.h>
15541int
15542main ()
15543{
15544
15545struct stat st;
15546st.st_mtimespec.tv_nsec = 1;
15547
15548 ;
15549 return 0;
15550}
15551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015553 ac_cv_stat_tv_nsec2=yes
15554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15558fi
15559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15561$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015562if test "$ac_cv_stat_tv_nsec2" = yes
15563then
15564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015566
15567fi
15568
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015569# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015570ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015571if test "$cross_compiling" = no; then
15572 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15573fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015574
15575for ac_header in curses.h ncurses.h
15576do :
15577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15578ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15579if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15580 cat >>confdefs.h <<_ACEOF
15581#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15582_ACEOF
15583
15584fi
15585
15586done
15587
15588
15589# On Solaris, term.h requires curses.h
15590for ac_header in term.h
15591do :
15592 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15593#ifdef HAVE_CURSES_H
15594#include <curses.h>
15595#endif
15596
15597"
15598if test "x$ac_cv_header_term_h" = xyes; then :
15599 cat >>confdefs.h <<_ACEOF
15600#define HAVE_TERM_H 1
15601_ACEOF
15602
15603fi
15604
15605done
15606
15607
Jack Jansen666b1e72001-10-31 12:11:48 +000015608# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15610$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015611if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015616#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015617int
15618main ()
15619{
Jack Jansen666b1e72001-10-31 12:11:48 +000015620
15621 int rtn;
15622 rtn = mvwdelch(0,0,0);
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 ;
15625 return 0;
15626}
15627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015628if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015629 ac_cv_mvwdelch_is_expression=yes
15630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634fi
15635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15637$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015638
15639if test "$ac_cv_mvwdelch_is_expression" = yes
15640then
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015643
15644fi
15645
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015646# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15647# structs since version 5.7. If the macro is defined as zero before including
15648# [n]curses.h, ncurses will expose fields of the structs regardless of the
15649# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15651$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015652if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015656/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015657
15658 #define NCURSES_OPAQUE 0
15659 #include <curses.h>
15660
Martin v. Löwis11437992002-04-12 09:54:03 +000015661int
15662main ()
15663{
Jack Jansen666b1e72001-10-31 12:11:48 +000015664
15665 WINDOW *w;
15666 w->_flags = 0;
15667
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 ;
15669 return 0;
15670}
15671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015672if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015673 ac_cv_window_has_flags=yes
15674else
Matthias Kloseb9621712010-04-24 17:59:49 +000015675 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15678fi
15679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15681$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015682
Jack Jansen666b1e72001-10-31 12:11:48 +000015683
15684if test "$ac_cv_window_has_flags" = yes
15685then
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
Matthias Kloseb9621712010-04-24 17:59:49 +000015687$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015688
15689fi
15690
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15692$as_echo_n "checking for is_pad... " >&6; }
15693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15694/* end confdefs.h. */
15695#include <curses.h>
15696int
15697main ()
15698{
15699
15700#ifndef is_pad
15701void *x=is_pad
15702#endif
15703
15704 ;
15705 return 0;
15706}
15707_ACEOF
15708if ac_fn_c_try_compile "$LINENO"; then :
15709
15710$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15711
15712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15713$as_echo "yes" >&6; }
15714else
15715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15716$as_echo "no" >&6; }
15717
15718fi
15719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15722$as_echo_n "checking for is_term_resized... " >&6; }
15723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015724/* end confdefs.h. */
15725#include <curses.h>
15726int
15727main ()
15728{
15729void *x=is_term_resized
15730 ;
15731 return 0;
15732}
15733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015737
Matthias Kloseb159a552010-04-25 21:00:44 +000015738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015740else
Matthias Kloseb9621712010-04-24 17:59:49 +000015741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15742$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015743
15744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15748$as_echo_n "checking for resize_term... " >&6; }
15749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015750/* end confdefs.h. */
15751#include <curses.h>
15752int
15753main ()
15754{
15755void *x=resize_term
15756 ;
15757 return 0;
15758}
15759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015760if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015761
Matthias Kloseb9621712010-04-24 17:59:49 +000015762$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015763
Matthias Kloseb159a552010-04-25 21:00:44 +000015764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015765$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015766else
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15768$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015769
15770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15772
Matthias Kloseb9621712010-04-24 17:59:49 +000015773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15774$as_echo_n "checking for resizeterm... " >&6; }
15775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015776/* end confdefs.h. */
15777#include <curses.h>
15778int
15779main ()
15780{
15781void *x=resizeterm
15782 ;
15783 return 0;
15784}
15785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015786if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015789
Matthias Kloseb159a552010-04-25 21:00:44 +000015790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015791$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015792else
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15794$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015795
15796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015798
15799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15800$as_echo_n "checking for immedok... " >&6; }
15801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15802/* end confdefs.h. */
15803#include <curses.h>
15804int
15805main ()
15806{
15807
15808#ifndef immedok
15809void *x=immedok
15810#endif
15811
15812 ;
15813 return 0;
15814}
15815_ACEOF
15816if ac_fn_c_try_compile "$LINENO"; then :
15817
15818$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15819
15820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15821$as_echo "yes" >&6; }
15822else
15823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15824$as_echo "no" >&6; }
15825
15826fi
15827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15828
15829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15830$as_echo_n "checking for syncok... " >&6; }
15831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h. */
15833#include <curses.h>
15834int
15835main ()
15836{
15837
15838#ifndef syncok
15839void *x=syncok
15840#endif
15841
15842 ;
15843 return 0;
15844}
15845_ACEOF
15846if ac_fn_c_try_compile "$LINENO"; then :
15847
15848$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15849
15850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15851$as_echo "yes" >&6; }
15852else
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15854$as_echo "no" >&6; }
15855
15856fi
15857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15858
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15860$as_echo_n "checking for wchgat... " >&6; }
15861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15862/* end confdefs.h. */
15863#include <curses.h>
15864int
15865main ()
15866{
15867
15868#ifndef wchgat
15869void *x=wchgat
15870#endif
15871
15872 ;
15873 return 0;
15874}
15875_ACEOF
15876if ac_fn_c_try_compile "$LINENO"; then :
15877
15878$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15879
15880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15881$as_echo "yes" >&6; }
15882else
15883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15884$as_echo "no" >&6; }
15885
15886fi
15887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15888
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15890$as_echo_n "checking for filter... " >&6; }
15891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15892/* end confdefs.h. */
15893#include <curses.h>
15894int
15895main ()
15896{
15897
15898#ifndef filter
15899void *x=filter
15900#endif
15901
15902 ;
15903 return 0;
15904}
15905_ACEOF
15906if ac_fn_c_try_compile "$LINENO"; then :
15907
15908$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15909
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15911$as_echo "yes" >&6; }
15912else
15913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15914$as_echo "no" >&6; }
15915
15916fi
15917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15918
15919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15920$as_echo_n "checking for has_key... " >&6; }
15921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15922/* end confdefs.h. */
15923#include <curses.h>
15924int
15925main ()
15926{
15927
15928#ifndef has_key
15929void *x=has_key
15930#endif
15931
15932 ;
15933 return 0;
15934}
15935_ACEOF
15936if ac_fn_c_try_compile "$LINENO"; then :
15937
15938$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15939
15940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15941$as_echo "yes" >&6; }
15942else
15943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15944$as_echo "no" >&6; }
15945
15946fi
15947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15948
15949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15950$as_echo_n "checking for typeahead... " >&6; }
15951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15952/* end confdefs.h. */
15953#include <curses.h>
15954int
15955main ()
15956{
15957
15958#ifndef typeahead
15959void *x=typeahead
15960#endif
15961
15962 ;
15963 return 0;
15964}
15965_ACEOF
15966if ac_fn_c_try_compile "$LINENO"; then :
15967
15968$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15969
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15971$as_echo "yes" >&6; }
15972else
15973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15974$as_echo "no" >&6; }
15975
15976fi
15977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15978
15979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15980$as_echo_n "checking for use_env... " >&6; }
15981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983#include <curses.h>
15984int
15985main ()
15986{
15987
15988#ifndef use_env
15989void *x=use_env
15990#endif
15991
15992 ;
15993 return 0;
15994}
15995_ACEOF
15996if ac_fn_c_try_compile "$LINENO"; then :
15997
15998$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15999
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16001$as_echo "yes" >&6; }
16002else
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16004$as_echo "no" >&6; }
16005
16006fi
16007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016008# last curses configure check
16009CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16012$as_echo "$as_me: checking for device files" >&6;}
16013
16014if test "x$cross_compiling" = xyes; then
16015 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16017$as_echo_n "checking for /dev/ptmx... " >&6; }
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16019$as_echo "not set" >&6; }
16020 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16021 fi
16022 if test "${ac_cv_file__dev_ptc+set}" != set; then
16023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16024$as_echo_n "checking for /dev/ptc... " >&6; }
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16026$as_echo "not set" >&6; }
16027 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16028 fi
16029fi
16030
Matthias Kloseb9621712010-04-24 17:59:49 +000016031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16032$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016033if ${ac_cv_file__dev_ptmx+:} false; then :
16034 $as_echo_n "(cached) " >&6
16035else
16036 test "$cross_compiling" = yes &&
16037 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16038if test -r "/dev/ptmx"; then
16039 ac_cv_file__dev_ptmx=yes
16040else
16041 ac_cv_file__dev_ptmx=no
16042fi
16043fi
16044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16045$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16046if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016047
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016048fi
16049
16050if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016053
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16056$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016057if ${ac_cv_file__dev_ptc+:} false; then :
16058 $as_echo_n "(cached) " >&6
16059else
16060 test "$cross_compiling" = yes &&
16061 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16062if test -r "/dev/ptc"; then
16063 ac_cv_file__dev_ptc=yes
16064else
16065 ac_cv_file__dev_ptc=no
16066fi
16067fi
16068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16069$as_echo "$ac_cv_file__dev_ptc" >&6; }
16070if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016071
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016072fi
16073
16074if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016077
Neal Norwitz865400f2003-03-21 01:42:58 +000016078fi
16079
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016080if test $ac_sys_system = Darwin
16081then
16082 LIBS="$LIBS -framework CoreFoundation"
16083fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016084
Matthias Kloseb9621712010-04-24 17:59:49 +000016085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16086$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016087if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016089else
Matthias Kloseb9621712010-04-24 17:59:49 +000016090 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016091 ac_cv_have_size_t_format="cross -- assuming yes"
16092
Thomas Wouters477c8d52006-05-27 19:21:47 +000016093else
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016095/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016096
Thomas Wouters477c8d52006-05-27 19:21:47 +000016097#include <stdio.h>
16098#include <stddef.h>
16099#include <string.h>
16100
Christian Heimes2c181612007-12-17 20:04:13 +000016101#ifdef HAVE_SYS_TYPES_H
16102#include <sys/types.h>
16103#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016104
16105#ifdef HAVE_SSIZE_T
16106typedef ssize_t Py_ssize_t;
16107#elif SIZEOF_VOID_P == SIZEOF_LONG
16108typedef long Py_ssize_t;
16109#else
16110typedef int Py_ssize_t;
16111#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016112
Christian Heimes2c181612007-12-17 20:04:13 +000016113int main()
16114{
16115 char buffer[256];
16116
Thomas Wouters477c8d52006-05-27 19:21:47 +000016117 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16118 return 1;
16119
Thomas Wouters89f507f2006-12-13 04:49:30 +000016120 if (strcmp(buffer, "123"))
16121 return 1;
16122
16123 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16124 return 1;
16125
16126 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016127 return 1;
16128
16129 return 0;
16130}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016131
Thomas Wouters477c8d52006-05-27 19:21:47 +000016132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016133if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016134 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016135else
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016140fi
16141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16144$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016145if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016148
16149fi
16150
Matthias Kloseb9621712010-04-24 17:59:49 +000016151ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016152#ifdef HAVE_SYS_TYPES_H
16153#include <sys/types.h>
16154#endif
16155#ifdef HAVE_SYS_SOCKET_H
16156#include <sys/socket.h>
16157#endif
16158
Matthias Kloseb9621712010-04-24 17:59:49 +000016159"
Victor Stinnere0be4232011-10-25 13:06:09 +020016160if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016161
Martin v. Löwis11437992002-04-12 09:54:03 +000016162else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016163
Matthias Kloseb9621712010-04-24 17:59:49 +000016164$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016165
16166fi
16167
Michael W. Hudson54241132001-12-07 15:38:26 +000016168
Matthias Kloseb9621712010-04-24 17:59:49 +000016169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16170$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016171if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016173else
Matthias Kloseb9621712010-04-24 17:59:49 +000016174 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016175 ac_cv_broken_mbstowcs=no
16176else
Matthias Kloseb9621712010-04-24 17:59:49 +000016177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016178/* end confdefs.h. */
16179
Stefan Krah19c21392012-11-22 23:47:32 +010016180#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016181#include<stdlib.h>
16182int main() {
16183 size_t len = -1;
16184 const char *str = "text";
16185 len = mbstowcs(NULL, str, 0);
16186 return (len != 4);
16187}
16188
16189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016190if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016191 ac_cv_broken_mbstowcs=no
16192else
Matthias Kloseb9621712010-04-24 17:59:49 +000016193 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016197fi
16198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016199fi
16200
Matthias Kloseb9621712010-04-24 17:59:49 +000016201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16202$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016203if test "$ac_cv_broken_mbstowcs" = yes
16204then
16205
Matthias Kloseb9621712010-04-24 17:59:49 +000016206$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016207
16208fi
16209
Antoine Pitroub52ec782009-01-25 16:34:23 +000016210# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16212$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016213
16214# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016215if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016216 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016217if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016218then
16219
Matthias Kloseb9621712010-04-24 17:59:49 +000016220$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016221
Matthias Kloseb9621712010-04-24 17:59:49 +000016222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16223$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016225if test "$withval" = no
16226then
16227
16228$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16229
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16231$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016232fi
16233
Antoine Pitrou042b1282010-08-13 21:15:58 +000016234else
16235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16236$as_echo "no value specified" >&6; }
16237fi
16238
Antoine Pitroub52ec782009-01-25 16:34:23 +000016239
Matthias Kloseb17289e2012-03-15 19:51:34 +010016240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16241$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16242if ${ac_cv_computed_gotos+:} false; then :
16243 $as_echo_n "(cached) " >&6
16244else
16245 if test "$cross_compiling" = yes; then :
16246 if test "${with_computed_gotos+set}" = set; then
16247 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16248 else
16249 ac_cv_computed_gotos=no
16250 fi
16251else
16252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16253/* end confdefs.h. */
16254
16255int main(int argc, char **argv)
16256{
16257 static void *targets[1] = { &&LABEL1 };
16258 goto LABEL2;
16259LABEL1:
16260 return 0;
16261LABEL2:
16262 goto *targets[0];
16263 return 1;
16264}
16265
16266_ACEOF
16267if ac_fn_c_try_run "$LINENO"; then :
16268 ac_cv_computed_gotos=yes
16269else
16270 ac_cv_computed_gotos=no
16271fi
16272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16273 conftest.$ac_objext conftest.beam conftest.$ac_ext
16274fi
16275
16276fi
16277
16278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16279$as_echo "$ac_cv_computed_gotos" >&6; }
16280case "$ac_cv_computed_gotos" in yes*)
16281
16282$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16283
16284esac
16285
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016286case $ac_sys_system in
16287AIX*)
16288
16289$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16290 ;;
16291esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016292
Michael W. Hudson54241132001-12-07 15:38:26 +000016293
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016294
16295
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016296for h in `(cd $srcdir;echo Python/thread_*.h)`
16297do
16298 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16299done
16300
Michael W. Hudson54241132001-12-07 15:38:26 +000016301
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016302SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16304$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016305for dir in $SRCDIRS; do
16306 if test ! -d $dir; then
16307 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016308 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016309done
Matthias Kloseb9621712010-04-24 17:59:49 +000016310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16311$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016312
Stefan Krah1919b7e2012-03-21 18:25:23 +010016313# Availability of -O2:
16314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16315$as_echo_n "checking for -O2... " >&6; }
16316saved_cflags="$CFLAGS"
16317CFLAGS="-O2"
16318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16319/* end confdefs.h. */
16320
16321int
16322main ()
16323{
16324
16325
16326 ;
16327 return 0;
16328}
16329_ACEOF
16330if ac_fn_c_try_compile "$LINENO"; then :
16331 have_O2=yes
16332else
16333 have_O2=no
16334fi
16335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16337$as_echo "$have_O2" >&6; }
16338CFLAGS="$saved_cflags"
16339
16340# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16341# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16343$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16344saved_cflags="$CFLAGS"
16345CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16346if test "$have_O2" = no; then
16347 CFLAGS=""
16348fi
16349if test "$cross_compiling" = yes; then :
16350 have_glibc_memmove_bug=undefined
16351else
16352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16353/* end confdefs.h. */
16354
16355#include <stdio.h>
16356#include <stdlib.h>
16357#include <string.h>
16358void foo(void *p, void *q) { memmove(p, q, 19); }
16359int main() {
16360 char a[32] = "123456789000000000";
16361 foo(&a[9], a);
16362 if (strcmp(a, "123456789123456789000000000") != 0)
16363 return 1;
16364 foo(a, &a[9]);
16365 if (strcmp(a, "123456789000000000") != 0)
16366 return 1;
16367 return 0;
16368}
16369
16370_ACEOF
16371if ac_fn_c_try_run "$LINENO"; then :
16372 have_glibc_memmove_bug=no
16373else
16374 have_glibc_memmove_bug=yes
16375fi
16376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16377 conftest.$ac_objext conftest.beam conftest.$ac_ext
16378fi
16379
16380CFLAGS="$saved_cflags"
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16382$as_echo "$have_glibc_memmove_bug" >&6; }
16383if test "$have_glibc_memmove_bug" = yes; then
16384
16385$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16386
16387fi
16388
16389if test "$have_gcc_asm_for_x87" = yes; then
16390 # Some versions of gcc miscompile inline asm:
16391 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16392 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16393 case $CC in
16394 *gcc*)
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16396$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16397 saved_cflags="$CFLAGS"
16398 CFLAGS="-O2"
16399 if test "$cross_compiling" = yes; then :
16400 have_ipa_pure_const_bug=undefined
16401else
16402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16403/* end confdefs.h. */
16404
16405 __attribute__((noinline)) int
16406 foo(int *p) {
16407 int r;
16408 asm ( "movl \$6, (%1)\n\t"
16409 "xorl %0, %0\n\t"
16410 : "=r" (r) : "r" (p) : "memory"
16411 );
16412 return r;
16413 }
16414 int main() {
16415 int p = 8;
16416 if ((foo(&p) ? : p) != 6)
16417 return 1;
16418 return 0;
16419 }
16420
16421_ACEOF
16422if ac_fn_c_try_run "$LINENO"; then :
16423 have_ipa_pure_const_bug=no
16424else
16425 have_ipa_pure_const_bug=yes
16426fi
16427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16428 conftest.$ac_objext conftest.beam conftest.$ac_ext
16429fi
16430
16431 CFLAGS="$saved_cflags"
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16433$as_echo "$have_ipa_pure_const_bug" >&6; }
16434 if test "$have_ipa_pure_const_bug" = yes; then
16435
16436$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16437
16438 fi
16439 ;;
16440 esac
16441fi
16442
Victor Stinner4f5366e2015-01-09 02:13:19 +010016443# Check for stdatomic.h
16444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16445$as_echo_n "checking for stdatomic.h... " >&6; }
16446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16447/* end confdefs.h. */
16448
16449
16450 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016451 atomic_int value = ATOMIC_VAR_INIT(1);
16452 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016453 int main() {
16454 int loaded_value = atomic_load(&value);
16455 return 0;
16456 }
16457
16458
16459_ACEOF
16460if ac_fn_c_try_link "$LINENO"; then :
16461 have_stdatomic_h=yes
16462else
16463 have_stdatomic_h=no
16464fi
16465rm -f core conftest.err conftest.$ac_objext \
16466 conftest$ac_exeext conftest.$ac_ext
16467
16468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16469$as_echo "$have_stdatomic_h" >&6; }
16470
16471if test "$have_stdatomic_h" = yes; then
16472
16473$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16474
16475fi
16476
16477# Check for GCC >= 4.7 __atomic builtins
16478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16479$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16481/* end confdefs.h. */
16482
16483
16484 volatile int val = 1;
16485 int main() {
16486 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16487 return 0;
16488 }
16489
16490
16491_ACEOF
16492if ac_fn_c_try_link "$LINENO"; then :
16493 have_builtin_atomic=yes
16494else
16495 have_builtin_atomic=no
16496fi
16497rm -f core conftest.err conftest.$ac_objext \
16498 conftest$ac_exeext conftest.$ac_ext
16499
16500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16501$as_echo "$have_builtin_atomic" >&6; }
16502
16503if test "$have_builtin_atomic" = yes; then
16504
16505$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16506
16507fi
16508
Ned Deily322f5ba2013-11-21 23:01:59 -080016509# ensurepip option
16510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16511$as_echo_n "checking for ensurepip... " >&6; }
16512
16513# Check whether --with-ensurepip was given.
16514if test "${with_ensurepip+set}" = set; then :
16515 withval=$with_ensurepip;
16516else
16517 with_ensurepip=upgrade
16518fi
16519
16520case $with_ensurepip in #(
16521 yes|upgrade) :
16522 ENSUREPIP=upgrade ;; #(
16523 install) :
16524 ENSUREPIP=install ;; #(
16525 no) :
16526 ENSUREPIP=no ;; #(
16527 *) :
16528 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16529esac
16530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16531$as_echo "$ENSUREPIP" >&6; }
16532
16533
Victor Stinner35a97c02015-03-08 02:59:09 +010016534# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16536$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16538/* end confdefs.h. */
16539
16540
16541 #include <dirent.h>
16542
16543 int main() {
16544 struct dirent entry;
16545 return entry.d_type == DT_UNKNOWN;
16546 }
16547
16548
16549_ACEOF
16550if ac_fn_c_try_link "$LINENO"; then :
16551 have_dirent_d_type=yes
16552else
16553 have_dirent_d_type=no
16554fi
16555rm -f core conftest.err conftest.$ac_objext \
16556 conftest$ac_exeext conftest.$ac_ext
16557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16558$as_echo "$have_dirent_d_type" >&6; }
16559
16560if test "$have_dirent_d_type" = yes; then
16561
16562$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16563
16564fi
16565
Victor Stinner9eb57c52015-03-19 22:21:49 +010016566# check if the Linux getrandom() syscall is available
16567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16568$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570/* end confdefs.h. */
16571
16572
Victor Stinner1b80b242016-04-12 22:34:58 +020016573 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016574 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016575 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016576
16577 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016578 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016579 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016580 const int flags = GRND_NONBLOCK;
16581 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016582 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016583 return 0;
16584 }
16585
16586
16587_ACEOF
16588if ac_fn_c_try_link "$LINENO"; then :
16589 have_getrandom_syscall=yes
16590else
16591 have_getrandom_syscall=no
16592fi
16593rm -f core conftest.err conftest.$ac_objext \
16594 conftest$ac_exeext conftest.$ac_ext
16595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16596$as_echo "$have_getrandom_syscall" >&6; }
16597
16598if test "$have_getrandom_syscall" = yes; then
16599
16600$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16601
16602fi
16603
Victor Stinner3abf44e2015-09-18 15:38:37 +020016604# check if the getrandom() function is available
16605# the test was written for the Solaris function of <sys/random.h>
16606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16607$as_echo_n "checking for the getrandom() function... " >&6; }
16608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16609/* end confdefs.h. */
16610
16611
16612 #include <sys/random.h>
16613
16614 int main() {
16615 char buffer[1];
16616 const size_t buflen = sizeof(buffer);
16617 const int flags = 0;
16618 /* ignore the result, Python checks for ENOSYS at runtime */
16619 (void)getrandom(buffer, buflen, flags);
16620 return 0;
16621 }
16622
16623
16624_ACEOF
16625if ac_fn_c_try_link "$LINENO"; then :
16626 have_getrandom=yes
16627else
16628 have_getrandom=no
16629fi
16630rm -f core conftest.err conftest.$ac_objext \
16631 conftest$ac_exeext conftest.$ac_ext
16632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16633$as_echo "$have_getrandom" >&6; }
16634
16635if test "$have_getrandom" = yes; then
16636
16637$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16638
16639fi
16640
Guido van Rossum627b2d71993-12-24 10:39:16 +000016641# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016642ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016643
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016644ac_config_files="$ac_config_files Modules/ld_so_aix"
16645
Martin v. Löwis11437992002-04-12 09:54:03 +000016646cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016647# This file is a shell script that caches the results of configure
16648# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016649# scripts and configure runs, see configure's option --config-cache.
16650# It is not useful on other systems. If it contains results you don't
16651# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016652#
Martin v. Löwis11437992002-04-12 09:54:03 +000016653# config.status only pays attention to the cache file if you give it
16654# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016655#
Skip Montanaro6dead952003-09-25 14:50:04 +000016656# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016657# loading this file, other *unset* `ac_cv_foo' will be assigned the
16658# following values.
16659
16660_ACEOF
16661
Guido van Rossumf78abae1997-01-21 22:02:36 +000016662# The following way of writing the cache mishandles newlines in values,
16663# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016665# Ultrix sh set writes to stderr and can't be redirected directly,
16666# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667(
16668 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16669 eval ac_val=\$$ac_var
16670 case $ac_val in #(
16671 *${as_nl}*)
16672 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016673 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16674$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675 esac
16676 case $ac_var in #(
16677 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16679 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680 esac ;;
16681 esac
16682 done
16683
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16686 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016687 # `set' does not quote correctly, so add quotes: double-quote
16688 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016690 "s/'/'\\\\''/g;
16691 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 *)
16694 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016696 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697 esac |
16698 sort
16699) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016700 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16705 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16707 :end' >>confcache
16708if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16709 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016710 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016711 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16712$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016713 if test ! -f "$cache_file" || test -h "$cache_file"; then
16714 cat confcache >"$cache_file"
16715 else
16716 case $cache_file in #(
16717 */* | ?:*)
16718 mv -f confcache "$cache_file"$$ &&
16719 mv -f "$cache_file"$$ "$cache_file" ;; #(
16720 *)
16721 mv -f confcache "$cache_file" ;;
16722 esac
16723 fi
16724 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016725 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016726 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16727$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016728 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016729fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016730rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732test "x$prefix" = xNONE && prefix=$ac_default_prefix
16733# Let make expand exec_prefix.
16734test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016735
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016736DEFS=-DHAVE_CONFIG_H
16737
Skip Montanaro6dead952003-09-25 14:50:04 +000016738ac_libobjs=
16739ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016740U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016741for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16742 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016744 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16746 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016747 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16748 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016749done
16750LIBOBJS=$ac_libobjs
16751
16752LTLIBOBJS=$ac_ltlibobjs
16753
16754
Martin v. Löwis11437992002-04-12 09:54:03 +000016755
Matthias Kloseb9621712010-04-24 17:59:49 +000016756
Victor Stinnere0be4232011-10-25 13:06:09 +020016757: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016758ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016759ac_clean_files_save=$ac_clean_files
16760ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016761{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16762$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16763as_write_fail=0
16764cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016765#! $SHELL
16766# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016767# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016768# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016769# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016770
Martin v. Löwis11437992002-04-12 09:54:03 +000016771debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016772ac_cs_recheck=false
16773ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016774
Matthias Kloseb9621712010-04-24 17:59:49 +000016775SHELL=\${CONFIG_SHELL-$SHELL}
16776export SHELL
16777_ASEOF
16778cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16779## -------------------- ##
16780## M4sh Initialization. ##
16781## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783# Be more Bourne compatible
16784DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016785if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016786 emulate sh
16787 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016789 # is contrary to our usage. Disable this feature.
16790 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016792else
Matthias Kloseb9621712010-04-24 17:59:49 +000016793 case `(set -o) 2>/dev/null` in #(
16794 *posix*) :
16795 set -o posix ;; #(
16796 *) :
16797 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016799fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016800
16801
Matthias Kloseb9621712010-04-24 17:59:49 +000016802as_nl='
16803'
16804export as_nl
16805# Printing a long string crashes Solaris 7 /usr/bin/printf.
16806as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16807as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16808as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16809# Prefer a ksh shell builtin over an external printf program on Solaris,
16810# but without wasting forks for bash or zsh.
16811if test -z "$BASH_VERSION$ZSH_VERSION" \
16812 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16813 as_echo='print -r --'
16814 as_echo_n='print -rn --'
16815elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16816 as_echo='printf %s\n'
16817 as_echo_n='printf %s'
16818else
16819 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16820 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16821 as_echo_n='/usr/ucb/echo -n'
16822 else
16823 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16824 as_echo_n_body='eval
16825 arg=$1;
16826 case $arg in #(
16827 *"$as_nl"*)
16828 expr "X$arg" : "X\\(.*\\)$as_nl";
16829 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16830 esac;
16831 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16832 '
16833 export as_echo_n_body
16834 as_echo_n='sh -c $as_echo_n_body as_echo'
16835 fi
16836 export as_echo_body
16837 as_echo='sh -c $as_echo_body as_echo'
16838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016839
16840# The user is always right.
16841if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016842 PATH_SEPARATOR=:
16843 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16844 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16845 PATH_SEPARATOR=';'
16846 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016847fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849
16850# IFS
16851# We need space, tab and new line, in precisely that order. Quoting is
16852# there to prevent editors from complaining about space-tab.
16853# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16854# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855IFS=" "" $as_nl"
16856
16857# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016858as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016859case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860 *[\\/]* ) as_myself=$0 ;;
16861 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016862for as_dir in $PATH
16863do
16864 IFS=$as_save_IFS
16865 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016866 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870 ;;
16871esac
16872# We did not find ourselves, most probably we were run as `sh COMMAND'
16873# in which case we are not to be found in the path.
16874if test "x$as_myself" = x; then
16875 as_myself=$0
16876fi
16877if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16879 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880fi
16881
Matthias Kloseb9621712010-04-24 17:59:49 +000016882# Unset variables that we do not need and which cause bugs (e.g. in
16883# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16884# suppresses any "Segmentation fault" message there. '((' could
16885# trigger a bug in pdksh 5.2.14.
16886for as_var in BASH_ENV ENV MAIL MAILPATH
16887do eval test x\${$as_var+set} = xset \
16888 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889done
16890PS1='$ '
16891PS2='> '
16892PS4='+ '
16893
16894# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016895LC_ALL=C
16896export LC_ALL
16897LANGUAGE=C
16898export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899
Matthias Kloseb9621712010-04-24 17:59:49 +000016900# CDPATH.
16901(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16902
16903
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016904# as_fn_error STATUS ERROR [LINENO LOG_FD]
16905# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016906# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16907# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016908# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016909as_fn_error ()
16910{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016911 as_status=$1; test $as_status -eq 0 && as_status=1
16912 if test "$4"; then
16913 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16914 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016915 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016916 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016917 as_fn_exit $as_status
16918} # as_fn_error
16919
16920
16921# as_fn_set_status STATUS
16922# -----------------------
16923# Set $? to STATUS, without forking.
16924as_fn_set_status ()
16925{
16926 return $1
16927} # as_fn_set_status
16928
16929# as_fn_exit STATUS
16930# -----------------
16931# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16932as_fn_exit ()
16933{
16934 set +e
16935 as_fn_set_status $1
16936 exit $1
16937} # as_fn_exit
16938
16939# as_fn_unset VAR
16940# ---------------
16941# Portably unset VAR.
16942as_fn_unset ()
16943{
16944 { eval $1=; unset $1;}
16945}
16946as_unset=as_fn_unset
16947# as_fn_append VAR VALUE
16948# ----------------------
16949# Append the text in VALUE to the end of the definition contained in VAR. Take
16950# advantage of any shell optimizations that allow amortized linear growth over
16951# repeated appends, instead of the typical quadratic growth present in naive
16952# implementations.
16953if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16954 eval 'as_fn_append ()
16955 {
16956 eval $1+=\$2
16957 }'
16958else
16959 as_fn_append ()
16960 {
16961 eval $1=\$$1\$2
16962 }
16963fi # as_fn_append
16964
16965# as_fn_arith ARG...
16966# ------------------
16967# Perform arithmetic evaluation on the ARGs, and store the result in the
16968# global $as_val. Take advantage of shells that can avoid forks. The arguments
16969# must be portable across $(()) and expr.
16970if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16971 eval 'as_fn_arith ()
16972 {
16973 as_val=$(( $* ))
16974 }'
16975else
16976 as_fn_arith ()
16977 {
16978 as_val=`expr "$@" || test $? -eq 1`
16979 }
16980fi # as_fn_arith
16981
16982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983if expr a : '\(a\)' >/dev/null 2>&1 &&
16984 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16985 as_expr=expr
16986else
16987 as_expr=false
16988fi
16989
16990if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16991 as_basename=basename
16992else
16993 as_basename=false
16994fi
16995
Matthias Kloseb9621712010-04-24 17:59:49 +000016996if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16997 as_dirname=dirname
16998else
16999 as_dirname=false
17000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002as_me=`$as_basename -- "$0" ||
17003$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17004 X"$0" : 'X\(//\)$' \| \
17005 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017006$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007 sed '/^.*\/\([^/][^/]*\)\/*$/{
17008 s//\1/
17009 q
17010 }
17011 /^X\/\(\/\/\)$/{
17012 s//\1/
17013 q
17014 }
17015 /^X\/\(\/\).*/{
17016 s//\1/
17017 q
17018 }
17019 s/.*/./; q'`
17020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021# Avoid depending upon Character Ranges.
17022as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17023as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17024as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17025as_cr_digits='0123456789'
17026as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027
17028ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017029case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017030-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017031 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017032 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017033 xy) ECHO_C='\c';;
17034 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17035 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036 esac;;
17037*)
17038 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017039esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017040
Martin v. Löwis11437992002-04-12 09:54:03 +000017041rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042if test -d conf$$.dir; then
17043 rm -f conf$$.dir/conf$$.file
17044else
17045 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017048if (echo >conf$$.file) 2>/dev/null; then
17049 if ln -s conf$$.file conf$$ 2>/dev/null; then
17050 as_ln_s='ln -s'
17051 # ... but there are two gotchas:
17052 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17053 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017054 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017055 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017056 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017057 elif ln conf$$.file conf$$ 2>/dev/null; then
17058 as_ln_s=ln
17059 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017060 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017062else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017063 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17066rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017067
Matthias Kloseb9621712010-04-24 17:59:49 +000017068
17069# as_fn_mkdir_p
17070# -------------
17071# Create "$as_dir" as a directory, including parents if necessary.
17072as_fn_mkdir_p ()
17073{
17074
17075 case $as_dir in #(
17076 -*) as_dir=./$as_dir;;
17077 esac
17078 test -d "$as_dir" || eval $as_mkdir_p || {
17079 as_dirs=
17080 while :; do
17081 case $as_dir in #(
17082 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17083 *) as_qdir=$as_dir;;
17084 esac
17085 as_dirs="'$as_qdir' $as_dirs"
17086 as_dir=`$as_dirname -- "$as_dir" ||
17087$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17088 X"$as_dir" : 'X\(//\)[^/]' \| \
17089 X"$as_dir" : 'X\(//\)$' \| \
17090 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17091$as_echo X"$as_dir" |
17092 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17093 s//\1/
17094 q
17095 }
17096 /^X\(\/\/\)[^/].*/{
17097 s//\1/
17098 q
17099 }
17100 /^X\(\/\/\)$/{
17101 s//\1/
17102 q
17103 }
17104 /^X\(\/\).*/{
17105 s//\1/
17106 q
17107 }
17108 s/.*/./; q'`
17109 test -d "$as_dir" && break
17110 done
17111 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017112 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017113
17114
17115} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017116if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017117 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017118else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017119 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017120 as_mkdir_p=false
17121fi
17122
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017123
17124# as_fn_executable_p FILE
17125# -----------------------
17126# Test if FILE is an executable regular file.
17127as_fn_executable_p ()
17128{
17129 test -f "$1" && test -x "$1"
17130} # as_fn_executable_p
17131as_test_x='test -x'
17132as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017133
17134# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017135as_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 +000017136
17137# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017138as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
17140
Martin v. Löwis11437992002-04-12 09:54:03 +000017141exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017142## ----------------------------------- ##
17143## Main body of $CONFIG_STATUS script. ##
17144## ----------------------------------- ##
17145_ASEOF
17146test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017147
Matthias Kloseb9621712010-04-24 17:59:49 +000017148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17149# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017150# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151# values after options handling.
17152ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017153This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017154generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017155
17156 CONFIG_FILES = $CONFIG_FILES
17157 CONFIG_HEADERS = $CONFIG_HEADERS
17158 CONFIG_LINKS = $CONFIG_LINKS
17159 CONFIG_COMMANDS = $CONFIG_COMMANDS
17160 $ $0 $@
17161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162on `(hostname || uname -n) 2>/dev/null | sed 1q`
17163"
17164
Martin v. Löwis11437992002-04-12 09:54:03 +000017165_ACEOF
17166
Matthias Kloseb9621712010-04-24 17:59:49 +000017167case $ac_config_files in *"
17168"*) set x $ac_config_files; shift; ac_config_files=$*;;
17169esac
17170
17171case $ac_config_headers in *"
17172"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17173esac
17174
17175
17176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017177# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017178config_files="$ac_config_files"
17179config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
Matthias Kloseb9621712010-04-24 17:59:49 +000017183cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017184ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017185\`$as_me' instantiates files and other configuration actions
17186from templates according to the current configuration. Unless the files
17187and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017188
Matthias Kloseb9621712010-04-24 17:59:49 +000017189Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017190
17191 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017193 --config print configuration, then exit
17194 -q, --quiet, --silent
17195 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 -d, --debug don't remove temporary files
17197 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017198 --file=FILE[:TEMPLATE]
17199 instantiate the configuration file FILE
17200 --header=FILE[:TEMPLATE]
17201 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017202
17203Configuration files:
17204$config_files
17205
17206Configuration headers:
17207$config_headers
17208
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017209Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017212cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17213ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017214ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017215python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017216configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017217 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017218
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017219Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017220This config.status script is free software; the Free Software Foundation
17221gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222
17223ac_pwd='$ac_pwd'
17224srcdir='$srcdir'
17225INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017226MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017227test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017228_ACEOF
17229
Matthias Kloseb9621712010-04-24 17:59:49 +000017230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17231# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017232ac_need_defaults=:
17233while test $# != 0
17234do
17235 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017236 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17238 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017239 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017241 --*=)
17242 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17243 ac_optarg=
17244 ac_shift=:
17245 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017247 ac_option=$1
17248 ac_optarg=$2
17249 ac_shift=shift
17250 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017251 esac
17252
Skip Montanaro6dead952003-09-25 14:50:04 +000017253 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017255 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17256 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017258 $as_echo "$ac_cs_version"; exit ;;
17259 --config | --confi | --conf | --con | --co | --c )
17260 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 debug=: ;;
17263 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017264 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 case $ac_optarg in
17266 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017267 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 esac
17269 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 ac_need_defaults=false;;
17271 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017272 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 case $ac_optarg in
17274 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17275 esac
17276 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278 --he | --h)
17279 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017280 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017281Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017284 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17285 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17286 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017287
17288 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017289 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017290Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017291
Matthias Kloseb9621712010-04-24 17:59:49 +000017292 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017294
17295 esac
17296 shift
17297done
17298
Skip Montanaro6dead952003-09-25 14:50:04 +000017299ac_configure_extra_args=
17300
17301if $ac_cs_silent; then
17302 exec 6>/dev/null
17303 ac_configure_extra_args="$ac_configure_extra_args --silent"
17304fi
17305
17306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017308if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017309 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 shift
17311 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17312 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017314 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017315fi
17316
Martin v. Löwis11437992002-04-12 09:54:03 +000017317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017318cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319exec 5>>config.log
17320{
17321 echo
17322 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17323## Running $as_me. ##
17324_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017331
Matthias Kloseb9621712010-04-24 17:59:49 +000017332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333
17334# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017335for ac_config_target in $ac_config_targets
17336do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337 case $ac_config_target in
17338 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17339 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17340 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017341 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17342 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017344 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017345 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017346 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347
Victor Stinnere0be4232011-10-25 13:06:09 +020017348 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 esac
17350done
17351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352
Martin v. Löwis11437992002-04-12 09:54:03 +000017353# If the user did not use the arguments to specify the items to instantiate,
17354# then the envvar interface is used. Set only those that are not.
17355# We use the long form for the default assignment because of an extremely
17356# bizarre bug on SunOS 4.1.3.
17357if $ac_need_defaults; then
17358 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17359 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17360fi
17361
Skip Montanaro6dead952003-09-25 14:50:04 +000017362# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017364# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365# Hook for its removal unless debugging.
17366# Note that there is a small window in which the directory will not be cleaned:
17367# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017368$debug ||
17369{
Victor Stinnere0be4232011-10-25 13:06:09 +020017370 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017372 : "${ac_tmp:=$tmp}"
17373 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017376}
Martin v. Löwis11437992002-04-12 09:54:03 +000017377# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017378
Martin v. Löwis11437992002-04-12 09:54:03 +000017379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017381 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017382} ||
17383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384 tmp=./conf$$-$RANDOM
17385 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017386} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017387ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017388
Matthias Kloseb9621712010-04-24 17:59:49 +000017389# Set up the scripts for CONFIG_FILES section.
17390# No need to generate them if there are no CONFIG_FILES.
17391# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017393
Matthias Kloseb9621712010-04-24 17:59:49 +000017394
17395ac_cr=`echo X | tr X '\015'`
17396# On cygwin, bash can eat \r inside `` if the user requested igncr.
17397# But we know of no other shell where ac_cr would be empty at this
17398# point, so we can use a bashism as a fallback.
17399if test "x$ac_cr" = x; then
17400 eval ac_cr=\$\'\\r\'
17401fi
17402ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17403if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017404 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017405else
17406 ac_cs_awk_cr=$ac_cr
17407fi
17408
Victor Stinnere0be4232011-10-25 13:06:09 +020017409echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017410_ACEOF
17411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412
Matthias Kloseb9621712010-04-24 17:59:49 +000017413{
17414 echo "cat >conf$$subs.awk <<_ACEOF" &&
17415 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17416 echo "_ACEOF"
17417} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017418 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17419ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420ac_delim='%!_!# '
17421for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017422 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017423 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424
Matthias Kloseb9621712010-04-24 17:59:49 +000017425 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17426 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 break
17428 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017429 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 else
17431 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017432 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433done
Matthias Kloseb9621712010-04-24 17:59:49 +000017434rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435
Matthias Kloseb9621712010-04-24 17:59:49 +000017436cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017437cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017439sed -n '
17440h
17441s/^/S["/; s/!.*/"]=/
17442p
17443g
17444s/^[^!]*!//
17445:repl
17446t repl
17447s/'"$ac_delim"'$//
17448t delim
17449:nl
17450h
17451s/\(.\{148\}\)..*/\1/
17452t more1
17453s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17454p
17455n
17456b repl
17457:more1
17458s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17459p
17460g
17461s/.\{148\}//
17462t nl
17463:delim
17464h
17465s/\(.\{148\}\)..*/\1/
17466t more2
17467s/["\\]/\\&/g; s/^/"/; s/$/"/
17468p
17469b
17470:more2
17471s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17472p
17473g
17474s/.\{148\}//
17475t delim
17476' <conf$$subs.awk | sed '
17477/^[^""]/{
17478 N
17479 s/\n//
17480}
17481' >>$CONFIG_STATUS || ac_write_fail=1
17482rm -f conf$$subs.awk
17483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17484_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017485cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017486 for (key in S) S_is_set[key] = 1
17487 FS = ""
17488
17489}
17490{
17491 line = $ 0
17492 nfields = split(line, field, "@")
17493 substed = 0
17494 len = length(field[1])
17495 for (i = 2; i < nfields; i++) {
17496 key = field[i]
17497 keylen = length(key)
17498 if (S_is_set[key]) {
17499 value = S[key]
17500 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17501 len += length(value) + length(field[++i])
17502 substed = 1
17503 } else
17504 len += 1 + keylen
17505 }
17506
17507 print line
17508}
17509
17510_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17513if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17514 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17515else
17516 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017517fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017518 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017519_ACEOF
17520
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017521# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17522# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523# trailing colons and then remove the whole line if VPATH becomes empty
17524# (actually we leave an empty line to preserve line numbers).
17525if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017526 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17527h
17528s///
17529s/^/:/
17530s/[ ]*$/:/
17531s/:\$(srcdir):/:/g
17532s/:\${srcdir}:/:/g
17533s/:@srcdir@:/:/g
17534s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017536x
17537s/\(=[ ]*\).*/\1/
17538G
17539s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540s/^[^=]*=[ ]*$//
17541}'
17542fi
17543
Matthias Kloseb9621712010-04-24 17:59:49 +000017544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017545fi # test -n "$CONFIG_FILES"
17546
Matthias Kloseb9621712010-04-24 17:59:49 +000017547# Set up the scripts for CONFIG_HEADERS section.
17548# No need to generate them if there are no CONFIG_HEADERS.
17549# This happens for instance with `./config.status Makefile'.
17550if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017551cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017552BEGIN {
17553_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554
Matthias Kloseb9621712010-04-24 17:59:49 +000017555# Transform confdefs.h into an awk script `defines.awk', embedded as
17556# here-document in config.status, that substitutes the proper values into
17557# config.h.in to produce config.h.
17558
17559# Create a delimiter string that does not exist in confdefs.h, to ease
17560# handling of long lines.
17561ac_delim='%!_!# '
17562for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017563 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17564 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017565 break
17566 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017567 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 else
17569 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17570 fi
17571done
17572
17573# For the awk script, D is an array of macro values keyed by name,
17574# likewise P contains macro parameters if any. Preserve backslash
17575# newline sequences.
17576
17577ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17578sed -n '
17579s/.\{148\}/&'"$ac_delim"'/g
17580t rset
17581:rset
17582s/^[ ]*#[ ]*define[ ][ ]*/ /
17583t def
17584d
17585:def
17586s/\\$//
17587t bsnl
17588s/["\\]/\\&/g
17589s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17590D["\1"]=" \3"/p
17591s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17592d
17593:bsnl
17594s/["\\]/\\&/g
17595s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17596D["\1"]=" \3\\\\\\n"\\/p
17597t cont
17598s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17599t cont
17600d
17601:cont
17602n
17603s/.\{148\}/&'"$ac_delim"'/g
17604t clear
17605:clear
17606s/\\$//
17607t bsnlc
17608s/["\\]/\\&/g; s/^/"/; s/$/"/p
17609d
17610:bsnlc
17611s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17612b cont
17613' <confdefs.h | sed '
17614s/'"$ac_delim"'/"\\\
17615"/g' >>$CONFIG_STATUS || ac_write_fail=1
17616
17617cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17618 for (key in D) D_is_set[key] = 1
17619 FS = ""
17620}
17621/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17622 line = \$ 0
17623 split(line, arg, " ")
17624 if (arg[1] == "#") {
17625 defundef = arg[2]
17626 mac1 = arg[3]
17627 } else {
17628 defundef = substr(arg[1], 2)
17629 mac1 = arg[2]
17630 }
17631 split(mac1, mac2, "(") #)
17632 macro = mac2[1]
17633 prefix = substr(line, 1, index(line, defundef) - 1)
17634 if (D_is_set[macro]) {
17635 # Preserve the white space surrounding the "#".
17636 print prefix "define", macro P[macro] D[macro]
17637 next
17638 } else {
17639 # Replace #undef with comments. This is necessary, for example,
17640 # in the case of _POSIX_SOURCE, which is predefined and required
17641 # on some systems where configure will not decide to define it.
17642 if (defundef == "undef") {
17643 print "/*", prefix defundef, macro, "*/"
17644 next
17645 }
17646 }
17647}
17648{ print }
17649_ACAWK
17650_ACEOF
17651cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017652 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017653fi # test -n "$CONFIG_HEADERS"
17654
17655
17656eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17657shift
17658for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659do
17660 case $ac_tag in
17661 :[FHLC]) ac_mode=$ac_tag; continue;;
17662 esac
17663 case $ac_mode$ac_tag in
17664 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017665 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666 :[FH]-) ac_tag=-:-;;
17667 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17668 esac
17669 ac_save_IFS=$IFS
17670 IFS=:
17671 set x $ac_tag
17672 IFS=$ac_save_IFS
17673 shift
17674 ac_file=$1
17675 shift
17676
17677 case $ac_mode in
17678 :L) ac_source=$1;;
17679 :[FH])
17680 ac_file_inputs=
17681 for ac_f
17682 do
17683 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017684 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685 *) # Look for the file first in the build tree, then in the source tree
17686 # (if the path is not absolute). The absolute path cannot be DOS-style,
17687 # because $ac_f cannot contain `:'.
17688 test -f "$ac_f" ||
17689 case $ac_f in
17690 [\\/$]*) false;;
17691 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17692 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017693 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017695 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17696 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697 done
17698
17699 # Let's still pretend it is `configure' which instantiates (i.e., don't
17700 # use $as_me), people would be surprised to read:
17701 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 configure_input='Generated from '`
17703 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17704 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017705 if test x"$ac_file" != x-; then
17706 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017707 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17708$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017710 # Neutralize special characters interpreted by sed in replacement strings.
17711 case $configure_input in #(
17712 *\&* | *\|* | *\\* )
17713 ac_sed_conf_input=`$as_echo "$configure_input" |
17714 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17715 *) ac_sed_conf_input=$configure_input;;
17716 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717
17718 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017719 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17720 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 esac
17722 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017723 esac
17724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017726$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017727 X"$ac_file" : 'X\(//\)[^/]' \| \
17728 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017730$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17732 s//\1/
17733 q
17734 }
17735 /^X\(\/\/\)[^/].*/{
17736 s//\1/
17737 q
17738 }
17739 /^X\(\/\/\)$/{
17740 s//\1/
17741 q
17742 }
17743 /^X\(\/\).*/{
17744 s//\1/
17745 q
17746 }
17747 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017748 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 ac_builddir=.
17750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751case "$ac_dir" in
17752.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17753*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017756 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757 case $ac_top_builddir_sub in
17758 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17759 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17760 esac ;;
17761esac
17762ac_abs_top_builddir=$ac_pwd
17763ac_abs_builddir=$ac_pwd$ac_dir_suffix
17764# for backward compatibility:
17765ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017766
17767case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017770 ac_top_srcdir=$ac_top_builddir_sub
17771 ac_abs_top_srcdir=$ac_pwd ;;
17772 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017773 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 ac_top_srcdir=$srcdir
17775 ac_abs_top_srcdir=$srcdir ;;
17776 *) # Relative name.
17777 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17778 ac_top_srcdir=$ac_top_build_prefix$srcdir
17779 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017780esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017782
Martin v. Löwis11437992002-04-12 09:54:03 +000017783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784 case $ac_mode in
17785 :F)
17786 #
17787 # CONFIG_FILE
17788 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017789
17790 case $INSTALL in
17791 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017793 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017794 ac_MKDIR_P=$MKDIR_P
17795 case $MKDIR_P in
17796 [\\/$]* | ?:[\\/]* ) ;;
17797 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17798 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017799_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800
Matthias Kloseb9621712010-04-24 17:59:49 +000017801cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802# If the template does not know about datarootdir, expand it.
17803# FIXME: This hack should be removed a few years after 2.60.
17804ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017805ac_sed_dataroot='
17806/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807 p
17808 q
17809}
17810/@datadir@/p
17811/@docdir@/p
17812/@infodir@/p
17813/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017814/@mandir@/p'
17815case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816*datarootdir*) ac_datarootdir_seen=yes;;
17817*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17819$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017821cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822 ac_datarootdir_hack='
17823 s&@datadir@&$datadir&g
17824 s&@docdir@&$docdir&g
17825 s&@infodir@&$infodir&g
17826 s&@localedir@&$localedir&g
17827 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017828 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017829esac
17830_ACEOF
17831
17832# Neutralize VPATH when `$srcdir' = `.'.
17833# Shell code in configure.ac might set extrasub.
17834# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017835cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17836ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017837$extrasub
17838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017839cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017840:t
17841/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017842s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017844s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845s&@srcdir@&$ac_srcdir&;t t
17846s&@abs_srcdir@&$ac_abs_srcdir&;t t
17847s&@top_srcdir@&$ac_top_srcdir&;t t
17848s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17849s&@builddir@&$ac_builddir&;t t
17850s&@abs_builddir@&$ac_abs_builddir&;t t
17851s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17852s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017853s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017855"
Victor Stinnere0be4232011-10-25 13:06:09 +020017856eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17857 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017860 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17861 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17862 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017864which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017865$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017866which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017867
Victor Stinnere0be4232011-10-25 13:06:09 +020017868 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017870 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17871 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017872 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017873 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 ;;
17875 :H)
17876 #
17877 # CONFIG_HEADER
17878 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017880 {
17881 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017882 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17883 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017884 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017885 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017886 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17887$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017889 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017890 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017891 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 fi
17893 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017894 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017895 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017896 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900
17901 esac
17902
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017903
17904 case $ac_file$ac_mode in
17905 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17906
17907 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908done # for ac_tag
17909
Guido van Rossum627b2d71993-12-24 10:39:16 +000017910
Matthias Kloseb9621712010-04-24 17:59:49 +000017911as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017912_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017913ac_clean_files=$ac_clean_files_save
17914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017916 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017917
Martin v. Löwis11437992002-04-12 09:54:03 +000017918
17919# configure is writing to config.log, and then calls config.status.
17920# config.status does its own redirection, appending to config.log.
17921# Unfortunately, on DOS this fails, as config.log is still kept open
17922# by configure, so config.status won't be able to write to it; its
17923# output is simply discarded. So we exec the FD to /dev/null,
17924# effectively closing config.log, so it can be properly (re)opened and
17925# appended to by config.status. When coming back to configure, we
17926# need to make the FD available again.
17927if test "$no_create" != yes; then
17928 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017929 ac_config_status_args=
17930 test "$silent" = yes &&
17931 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017932 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017933 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017934 exec 5>>config.log
17935 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17936 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017937 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017938fi
17939if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17941$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017942fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017943
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017944
Christian Heimes75ed8902013-11-20 01:11:18 +010017945echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017946if test ! -f Modules/Setup
17947then
17948 cp $srcdir/Modules/Setup.dist Modules/Setup
17949fi
17950
Christian Heimes75ed8902013-11-20 01:11:18 +010017951echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017952if test ! -f Modules/Setup.local
17953then
17954 echo "# Edit this file for local setup changes" >Modules/Setup.local
17955fi
17956
Christian Heimes75ed8902013-11-20 01:11:18 +010017957echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017958$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017959 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017960 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017961mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017962
17963if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17964 echo "" >&6
17965 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017966 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 +000017967 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017968 echo "" >&6
17969 echo "" >&6
17970fi
17971