blob: 22fc02153d1415fc787f311c42037109da01b9a5 [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 Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
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 Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300784runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200816with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000817enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829enable_ipv6
830with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000832with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100840with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100841with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000842'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 ac_precious_vars='build_alias
844host_alias
845target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100846MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800852CPP
853PKG_CONFIG
854PKG_CONFIG_PATH
855PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859ac_init_help=
860ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000861ac_unrecognized_opts=
862ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# The variables have the same names as the options, with
864# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877x_includes=NONE
878x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300894runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895includedir='${prefix}/include'
896oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898infodir='${datarootdir}/info'
899htmldir='${docdir}'
900dvidir='${docdir}'
901pdfdir='${docdir}'
902psdir='${docdir}'
903libdir='${exec_prefix}/lib'
904localedir='${datarootdir}/locale'
905mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 # If the previous option needs an argument, assign it.
912 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 ac_prev=
915 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200919 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920 *=) ac_optarg= ;;
921 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Accept the important Cygnus configure options, so we can diagnose typos.
925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 case $ac_dashdash$ac_option in
927 --)
928 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -bindir | --bindir | --bindi | --bind | --bin | --bi)
931 ac_prev=bindir ;;
932 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
935 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 -cache-file | --cache-file | --cache-fil | --cache-fi \
941 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942 ac_prev=cache_file ;;
943 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 cache_file=$ac_optarg ;;
946
947 --config-cache | -C)
948 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956 | --dataroo | --dataro | --datar)
957 ac_prev=datarootdir ;;
958 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960 datarootdir=$ac_optarg ;;
961
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977
978 -docdir | --docdir | --docdi | --doc | --do)
979 ac_prev=docdir ;;
980 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981 docdir=$ac_optarg ;;
982
983 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984 ac_prev=dvidir ;;
985 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200992 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt_orig=$ac_useropt
994 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995 case $ac_user_opts in
996 *"
997"enable_$ac_useropt"
998"*) ;;
999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000 ac_unrecognized_sep=', ';;
1001 esac
1002 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006 | --exec | --exe | --ex)
1007 ac_prev=exec_prefix ;;
1008 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Obsolete; use --with-gas.
1015 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 -help | --help | --hel | --he | -h)
1018 ac_init_help=long ;;
1019 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020 ac_init_help=recursive ;;
1021 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030 ac_prev=htmldir ;;
1031 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032 | --ht=*)
1033 htmldir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -includedir | --includedir | --includedi | --included | --include \
1036 | --includ | --inclu | --incl | --inc)
1037 ac_prev=includedir ;;
1038 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -infodir | --infodir | --infodi | --infod | --info | --inf)
1043 ac_prev=infodir ;;
1044 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libdir | --libdir | --libdi | --libd)
1048 ac_prev=libdir ;;
1049 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053 | --libexe | --libex | --libe)
1054 ac_prev=libexecdir ;;
1055 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 -localedir | --localedir | --localedi | --localed | --locale)
1060 ac_prev=localedir ;;
1061 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062 localedir=$ac_optarg ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 ac_prev=localstatedir ;;
1067 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072 ac_prev=mandir ;;
1073 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Obsolete; use --without-fp.
1078 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 no_create=yes ;;
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090 | --oldin | --oldi | --old | --ol | --o)
1091 ac_prev=oldincludedir ;;
1092 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098 ac_prev=prefix ;;
1099 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103 | --program-pre | --program-pr | --program-p)
1104 ac_prev=program_prefix ;;
1105 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110 | --program-suf | --program-su | --program-s)
1111 ac_prev=program_suffix ;;
1112 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-transform-name | --program-transform-name \
1117 | --program-transform-nam | --program-transform-na \
1118 | --program-transform-n | --program-transform- \
1119 | --program-transform | --program-transfor \
1120 | --program-transfo | --program-transf \
1121 | --program-trans | --program-tran \
1122 | --progr-tra | --program-tr | --program-t)
1123 ac_prev=program_transform_name ;;
1124 -program-transform-name=* | --program-transform-name=* \
1125 | --program-transform-nam=* | --program-transform-na=* \
1126 | --program-transform-n=* | --program-transform-=* \
1127 | --program-transform=* | --program-transfor=* \
1128 | --program-transfo=* | --program-transf=* \
1129 | --program-trans=* | --program-tran=* \
1130 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134 ac_prev=pdfdir ;;
1135 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136 pdfdir=$ac_optarg ;;
1137
1138 -psdir | --psdir | --psdi | --psd | --ps)
1139 ac_prev=psdir ;;
1140 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141 psdir=$ac_optarg ;;
1142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144 | -silent | --silent | --silen | --sile | --sil)
1145 silent=yes ;;
1146
William Grzybowski23e65b22018-09-07 09:06:15 -03001147 -runstatedir | --runstatedir | --runstatedi | --runstated \
1148 | --runstate | --runstat | --runsta | --runst | --runs \
1149 | --run | --ru | --r)
1150 ac_prev=runstatedir ;;
1151 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1152 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1153 | --run=* | --ru=* | --r=*)
1154 runstatedir=$ac_optarg ;;
1155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1157 ac_prev=sbindir ;;
1158 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1159 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
1162 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1163 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1164 | --sharedst | --shareds | --shared | --share | --shar \
1165 | --sha | --sh)
1166 ac_prev=sharedstatedir ;;
1167 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1168 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1169 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1170 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 -site | --site | --sit)
1174 ac_prev=site ;;
1175 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1179 ac_prev=srcdir ;;
1180 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1184 | --syscon | --sysco | --sysc | --sys | --sy)
1185 ac_prev=sysconfdir ;;
1186 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1187 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1196 verbose=yes ;;
1197
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 -version | --version | --versio | --versi | --vers | -V)
1199 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226"with_$ac_useropt"
1227"*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
1230 esac
1231 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 --x)
1234 # Obsolete; use --with-x.
1235 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1238 | --x-incl | --x-inc | --x-in | --x-i)
1239 ac_prev=x_includes ;;
1240 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1241 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
1244 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1245 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1246 ac_prev=x_libraries ;;
1247 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1248 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1252Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253 ;;
1254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 *=*)
1256 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1257 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 case $ac_envvar in #(
1259 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 export $ac_envvar ;;
1264
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001265 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001270 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ;;
1272
1273 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274done
1275
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279fi
1280
Matthias Kloseb9621712010-04-24 17:59:49 +00001281if test -n "$ac_unrecognized_opts"; then
1282 case $enable_option_checking in
1283 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1286 esac
1287fi
1288
1289# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1291 datadir sysconfdir sharedstatedir localstatedir includedir \
1292 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001293 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 # Remove trailing slashes.
1297 case $ac_val in
1298 */ )
1299 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1300 eval $ac_var=\$ac_val;;
1301 esac
1302 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 [\\/$]* | ?:[\\/]* ) continue;;
1305 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001306 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001308done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# There might be people who depend on the old broken behavior: `$host'
1311# used to hold the argument of --host etc.
1312# FIXME: To remove some day.
1313build=$build_alias
1314host=$host_alias
1315target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317# FIXME: To remove some day.
1318if test "x$host_alias" != x; then
1319 if test "x$build_alias" = x; then
1320 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001321 elif test "x$build_alias" != "x$host_alias"; then
1322 cross_compiling=yes
1323 fi
1324fi
1325
1326ac_tool_prefix=
1327test -n "$host_alias" && ac_tool_prefix=$host_alias-
1328
1329test "$silent" = yes && exec 6>/dev/null
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332ac_pwd=`pwd` && test -n "$ac_pwd" &&
1333ac_ls_di=`ls -di .` &&
1334ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340# Find the source files, if location was not specified.
1341if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 ac_confdir=`$as_dirname -- "$as_myself" ||
1345$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1346 X"$as_myself" : 'X\(//\)[^/]' \| \
1347 X"$as_myself" : 'X\(//\)$' \| \
1348 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1349$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)[^/].*/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)$/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\).*/{
1363 s//\1/
1364 q
1365 }
1366 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369 srcdir=..
1370 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374if test ! -r "$srcdir/$ac_unique_file"; then
1375 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381 pwd)`
1382# When building in place, set srcdir=.
1383if test "$ac_abs_confdir" = "$ac_pwd"; then
1384 srcdir=.
1385fi
1386# Remove unnecessary trailing slashes from srcdir.
1387# Double slashes in file names in object file debugging info
1388# mess up M-x gdb in Emacs.
1389case $srcdir in
1390*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1391esac
1392for ac_var in $ac_precious_vars; do
1393 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_env_${ac_var}_value=\$${ac_var}
1395 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399#
1400# Report the --help message.
1401#
1402if test "$ac_init_help" = "long"; then
1403 # Omit some internal or obsolete options to make the list less imposing.
1404 # This message is too long to be a string in the A/UX 3.1 sh.
1405 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001406\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408Usage: $0 [OPTION]... [VAR=VALUE]...
1409
1410To assign environment variables (e.g., CC, CFLAGS...), specify them as
1411VAR=VALUE. See below for descriptions of some of the useful variables.
1412
1413Defaults for the options are specified in brackets.
1414
1415Configuration:
1416 -h, --help display this help and exit
1417 --help=short display options specific to this package
1418 --help=recursive display the short help of all the included packages
1419 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001420 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --cache-file=FILE cache test results in FILE [disabled]
1422 -C, --config-cache alias for \`--cache-file=config.cache'
1423 -n, --no-create do not create output files
1424 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426Installation directories:
1427 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
1432By default, \`make install' will install all the files in
1433\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1434an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1435for instance \`--prefix=\$HOME'.
1436
1437For better control, use the options below.
1438
1439Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 --bindir=DIR user executables [EPREFIX/bin]
1441 --sbindir=DIR system admin executables [EPREFIX/sbin]
1442 --libexecdir=DIR program executables [EPREFIX/libexec]
1443 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1444 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1445 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001446 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461
1462 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001463
1464System types:
1465 --build=BUILD configure for building on BUILD [guessed]
1466 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001467 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469fi
1470
1471if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001473 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 cat <<\_ACEOF
1476
1477Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1480 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001481 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001482 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-framework[=INSTALLDIR]
1484 Build (MacOSX|Darwin) framework
1485 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001486 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001487 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1488 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001489 --enable-loadable-sqlite-extensions
1490 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-ipv6 Enable ipv6 (with ipv4) support
1492 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001493 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001499 --with-universal-archs=ARCH
1500 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001501 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1502 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001503 --with-framework-name=FRAMEWORK
1504 specify an alternate name of the framework built
1505 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001506 --with-cxx-main=<compiler>
1507 compile main() and link python executable with C++
1508 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-suffix=.exe set executable suffix
1510 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001511 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001512 --with-lto Enable Link Time Optimization in any build. Disabled
1513 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001514 --with-hash-algorithm=[fnv|siphash24]
1515 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001516 --with-address-sanitizer
1517 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001519 --with-system-expat build pyexpat module using an installed expat
1520 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001521 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001522 --with-system-libmpdec build _decimal module using an installed libmpdec
1523 library
Ned Deilyd819b932013-09-06 01:07:05 -07001524 --with-tcltk-includes='-I...'
1525 override search for Tcl and Tk include files
1526 --with-tcltk-libs='-L...'
1527 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001528 --with-dbmliborder=db1:db2:...
1529 order to check db backends for dbm. Valid value is a
1530 colon separated string with the backend names
1531 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with(out)-doc-strings disable/enable documentation strings
1533 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001534 --with(out)-c-locale-coercion
1535 disable/enable C locale coercion to a UTF-8 based
1536 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001538 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001546 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001547 --with-ssl-default-suites=[python|openssl|STRING]
1548 Override default cipher suites string, python: use
1549 Python's preferred selection (default), openssl:
1550 leave OpenSSL's defaults untouched, STRING: use a
1551 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001635python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Ned Deily5489bda2018-01-31 17:44:09 -05002344It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Christian Heimesff5be6e2018-01-20 13:19:21 +01002694
2695
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002696if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002697 # If we're building out-of-tree, we need to make sure the following
2698 # resources get picked up before their $srcdir counterparts.
2699 # Objects/ -> typeslots.inc
2700 # Include/ -> Python-ast.h, graminit.h
2701 # Python/ -> importlib.h
2702 # (A side effect of this is that these resources will automatically be
2703 # regenerated when building out-of-tree, regardless of whether or not
2704 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2705 # off.)
2706 BASECPPFLAGS="-IObjects -IInclude -IPython"
2707else
2708 BASECPPFLAGS=""
2709fi
2710
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711
2712
2713
2714
Victor Stinner9ed34a82017-05-02 22:35:58 +02002715if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717# Extract the first word of "git", so it can be a program name with args.
2718set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2720$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722 $as_echo_n "(cached) " >&6
2723else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724 if test -n "$HAS_GIT"; then
2725 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726else
2727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2728for as_dir in $PATH
2729do
2730 IFS=$as_save_IFS
2731 test -z "$as_dir" && as_dir=.
2732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2736 break 2
2737 fi
2738done
2739 done
2740IFS=$as_save_IFS
2741
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743fi
2744fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745HAS_GIT=$ac_cv_prog_HAS_GIT
2746if test -n "$HAS_GIT"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2748$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749else
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2751$as_echo "no" >&6; }
2752fi
2753
2754
2755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759then
Xiang Zhang4c855572018-08-20 22:36:19 +08002760 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2761 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2762 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764 GITVERSION=""
2765 GITTAG=""
2766 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
2768
2769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
2772
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002773ac_aux_dir=
2774for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2775 if test -f "$ac_dir/install-sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install-sh -c"
2778 break
2779 elif test -f "$ac_dir/install.sh"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/install.sh -c"
2782 break
2783 elif test -f "$ac_dir/shtool"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/shtool install -c"
2786 break
2787 fi
2788done
2789if test -z "$ac_aux_dir"; then
2790 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2791fi
2792
2793# These three variables are undocumented and unsupported,
2794# and are intended to be withdrawn in a future Autoconf release.
2795# They can cause serious problems if a builder's source tree is in a directory
2796# whose full name contains unusual characters.
2797ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2798ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2799ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2800
2801
2802# Make sure we can run config.sub.
2803$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2804 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2807$as_echo_n "checking build system type... " >&6; }
2808if ${ac_cv_build+:} false; then :
2809 $as_echo_n "(cached) " >&6
2810else
2811 ac_build_alias=$build_alias
2812test "x$ac_build_alias" = x &&
2813 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2814test "x$ac_build_alias" = x &&
2815 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2816ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2817 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2818
2819fi
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2821$as_echo "$ac_cv_build" >&6; }
2822case $ac_cv_build in
2823*-*-*) ;;
2824*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2825esac
2826build=$ac_cv_build
2827ac_save_IFS=$IFS; IFS='-'
2828set x $ac_cv_build
2829shift
2830build_cpu=$1
2831build_vendor=$2
2832shift; shift
2833# Remember, the first character of IFS is used to create $*,
2834# except with old shells:
2835build_os=$*
2836IFS=$ac_save_IFS
2837case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2838
2839
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2841$as_echo_n "checking host system type... " >&6; }
2842if ${ac_cv_host+:} false; then :
2843 $as_echo_n "(cached) " >&6
2844else
2845 if test "x$host_alias" = x; then
2846 ac_cv_host=$ac_cv_build
2847else
2848 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2849 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2850fi
2851
2852fi
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2854$as_echo "$ac_cv_host" >&6; }
2855case $ac_cv_host in
2856*-*-*) ;;
2857*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2858esac
2859host=$ac_cv_host
2860ac_save_IFS=$IFS; IFS='-'
2861set x $ac_cv_host
2862shift
2863host_cpu=$1
2864host_vendor=$2
2865shift; shift
2866# Remember, the first character of IFS is used to create $*,
2867# except with old shells:
2868host_os=$*
2869IFS=$ac_save_IFS
2870case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2871
2872
2873
doko@python.orga10e4a92013-01-25 18:45:12 +01002874
2875
Ned Deilyfcbc2462014-08-22 13:32:49 -07002876# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2877rm -f pybuilddir.txt
2878
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002879for ac_prog in python$PACKAGE_VERSION python3 python
2880do
2881 # Extract the first word of "$ac_prog", so it can be a program name with args.
2882set dummy $ac_prog; ac_word=$2
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886 $as_echo_n "(cached) " >&6
2887else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002888 if test -n "$PYTHON_FOR_REGEN"; then
2889 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002890else
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2900 break 2
2901 fi
2902done
2903 done
2904IFS=$as_save_IFS
2905
2906fi
2907fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2909if test -n "$PYTHON_FOR_REGEN"; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2911$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002912else
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
2915fi
2916
2917
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002920test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922
2923
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002924if test "$cross_compiling" = yes; then
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2926$as_echo_n "checking for python interpreter for cross build... " >&6; }
2927 if test -z "$PYTHON_FOR_BUILD"; then
2928 for interp in python$PACKAGE_VERSION python3 python; do
2929 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002930 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 +02002931 break
2932 fi
2933 interp=
2934 done
2935 if test x$interp = x; then
2936 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2937 fi
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2939$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002940 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 +02002941 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002942elif test "$cross_compiling" = maybe; then
2943 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944else
2945 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Benjamin Petersond23f8222009-04-05 19:13:16 +00002950if test "$prefix" != "/"; then
2951 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
2956
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002957# We don't use PACKAGE_ variables, and they cause conflicts
2958# with other autoconf-based packages that include Python.h
2959grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2960rm confdefs.h
2961mv confdefs.h.new confdefs.h
2962
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002963
Ned Deily5489bda2018-01-31 17:44:09 -05002964VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002965
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002966# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002967
2968SOVERSION=1.0
2969
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970# The later defininition of _XOPEN_SOURCE disables certain features
2971# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2972
Matthias Kloseb9621712010-04-24 17:59:49 +00002973$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002974
2975
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2977# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2978# them.
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002981
2982
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002988
2989
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995
2996
2997
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002998define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003000# Arguments passed to configure.
3001
3002CONFIG_ARGS="$ac_configure_args"
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3005$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003007if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003009 case $enableval in
3010 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003011 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # information
3013 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003014 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003016 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3017 if test ! -d "${enableval}"
3018 then
3019 enableval=/
3020 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003021 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 ;;
3023 esac
3024 case $enableval in
3025 no)
3026 UNIVERSALSDK=
3027 enable_universalsdk=
3028 ;;
3029 *)
3030 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 if test ! -d "${UNIVERSALSDK}"
3032 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003033 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039else
3040
3041 UNIVERSALSDK=
3042 enable_universalsdk=
3043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046if test -n "${UNIVERSALSDK}"
3047then
Matthias Kloseb9621712010-04-24 17:59:49 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3049$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050else
Matthias Kloseb9621712010-04-24 17:59:49 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003056
Ned Deily87adb6e2013-10-18 21:09:56 -07003057ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059# For backward compatibility reasons we prefer to select '32-bit' if available,
3060# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062if test "`uname -s`" = "Darwin"
3063then
3064 if test -n "${UNIVERSALSDK}"
3065 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003066 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067 then
3068 UNIVERSAL_ARCHS="intel"
3069 fi
3070 fi
3071fi
3072
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003073
Matthias Kloseb9621712010-04-24 17:59:49 +00003074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3075$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
3077# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003078if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 UNIVERSAL_ARCHS="$withval"
3081
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082fi
3083
Ned Deily87adb6e2013-10-18 21:09:56 -07003084if test -n "${UNIVERSALSDK}"
3085then
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3087$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3088else
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
3091fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003093
3094# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003095if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003096 withval=$with_framework_name;
3097 PYTHONFRAMEWORK=${withval}
3098 PYTHONFRAMEWORKDIR=${withval}.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3100
3101else
3102
3103 PYTHONFRAMEWORK=Python
3104 PYTHONFRAMEWORKDIR=Python.framework
3105 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3106
3107fi
3108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003112 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003113 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003114 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003115 esac
3116 case $enableval in
3117 no)
3118 PYTHONFRAMEWORK=
3119 PYTHONFRAMEWORKDIR=no-framework
3120 PYTHONFRAMEWORKPREFIX=
3121 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122 FRAMEWORKINSTALLFIRST=
3123 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 FRAMEWORKALTINSTALLFIRST=
3125 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003126 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 if test "x${prefix}" = "xNONE"; then
3128 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3129 else
3130 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3131 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003133 ;;
3134 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003135 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003136 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003138 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003139 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3140 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003141 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003143
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 if test "x${prefix}" = "xNONE" ; then
3145 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 else
3148 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3149 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150
3151 case "${enableval}" in
3152 /System*)
3153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3154 if test "${prefix}" = "NONE" ; then
3155 # See below
3156 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3157 fi
3158 ;;
3159
3160 /Library*)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163
3164 */Library/Frameworks)
3165 MDIR="`dirname "${enableval}"`"
3166 MDIR="`dirname "${MDIR}"`"
3167 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3168
3169 if test "${prefix}" = "NONE"; then
3170 # User hasn't specified the
3171 # --prefix option, but wants to install
3172 # the framework in a non-default location,
3173 # ensure that the compatibility links get
3174 # installed relative to that prefix as well
3175 # instead of in /usr/local.
3176 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3177 fi
3178 ;;
3179
3180 *)
3181 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3182 ;;
3183 esac
3184
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3194
3195 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3196
Jack Jansene578a632001-08-15 01:27:14 +00003197 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Guido van Rossum563e7081996-09-10 18:20:48 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Jack Jansene578a632001-08-15 01:27:14 +00003201 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003202 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORKPREFIX=
3204 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205 FRAMEWORKINSTALLFIRST=
3206 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 FRAMEWORKALTINSTALLFIRST=
3208 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003209 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 if test "x${prefix}" = "xNONE" ; then
3211 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3212 else
3213 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3214 fi
Jack Jansene578a632001-08-15 01:27:14 +00003215 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003216
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218fi
3219
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
3221
Michael W. Hudson54241132001-12-07 15:38:26 +00003222
3223
3224
3225
Jack Jansene578a632001-08-15 01:27:14 +00003226
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003227
3228
3229
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003230
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003231
Ned Deilyb8f944f2013-11-21 22:42:25 -08003232
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003233
3234cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003235#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003236_ACEOF
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003240## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003241## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003242##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243# Set name for machine-dependent library files
3244
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3246$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247if test -z "$MACHDEP"
3248then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 # avoid using uname for cross builds
3250 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003251 # ac_sys_system and ac_sys_release are used for setting
3252 # a lot of different things including 'define_xopen_source'
3253 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003255 *-*-linux-android*)
3256 ac_sys_system=Linux-android
3257 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003258 *-*-linux*)
3259 ac_sys_system=Linux
3260 ;;
3261 *-*-cygwin*)
3262 ac_sys_system=Cygwin
3263 ;;
3264 *)
3265 # for now, limit cross builds to known configurations
3266 MACHDEP="unknown"
3267 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3268 esac
3269 ac_sys_release=
3270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003272 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003273 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 fi
3279 ac_md_system=`echo $ac_sys_system |
3280 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3281 ac_md_release=`echo $ac_sys_release |
3282 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3283 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003284
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003286 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003287 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003288 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003289 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291fi
Guido van Rossum91922671997-10-09 20:24:13 +00003292
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003293
3294if test "$cross_compiling" = yes; then
3295 case "$host" in
3296 *-*-linux*)
3297 case "$host_cpu" in
3298 arm*)
3299 _host_cpu=arm
3300 ;;
3301 *)
3302 _host_cpu=$host_cpu
3303 esac
3304 ;;
3305 *-*-cygwin*)
3306 _host_cpu=
3307 ;;
3308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3314fi
3315
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003316# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3317# disable features if it is defined, without any means to access these
3318# features as extensions. For these systems, we skip the definition of
3319# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3320# some feature, make sure there is no alternative way to access this
3321# feature. Also, when using wildcards, make sure you have verified the
3322# need for not defining _XOPEN_SOURCE on all systems matching the
3323# wildcard, and that the wildcard does not include future systems
3324# (which may remove their limitations).
3325case $ac_sys_system/$ac_sys_release in
3326 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3327 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003328 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003329 # In addition, Stefan Krah confirms that issue #1244610 exists through
3330 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003331 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332 define_xopen_source=no
3333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3334 # also defined. This can be overridden by defining _BSD_SOURCE
3335 # As this has a different meaning on Linux, only define it on OpenBSD
3336
Matthias Kloseb9621712010-04-24 17:59:49 +00003337$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338
3339 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003340 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346
3347 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003348 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3349 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3350 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003351 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 +00003352 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003353 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3354 # request to enable features supported by the standard as a request
3355 # to disable features not supported by the standard. The best way
3356 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3357 # entirely and define __EXTENSIONS__ instead.
3358 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003359 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3361 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003362 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003363 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 define_xopen_source=no;;
3365 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003368 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Jack Jansen6b08a402004-06-03 12:41:45 +00003433# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3434# it may influence the way we can build extensions, so distutils
3435# needs to check it
3436
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003439EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003442
3443# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3444# for debug/optimization stuff. BASECFLAGS is for flags that are required
3445# just to get things to compile and link. Users are free to override OPT
3446# when running configure or make. The build should not break if they do.
3447# BASECFLAGS should generally not be messed with, however.
3448
Guido van Rossum8b131c51995-03-09 14:10:13 +00003449# If the user switches compilers, we can't believe the cache
3450if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3451then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003452 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003453(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003454fi
3455
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003456# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3457# when the compiler supports them, but we don't always want -O2, and
3458# we set -g later.
3459if test -z "$CFLAGS"; then
3460 CFLAGS=
3461fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003462
3463if test "$ac_sys_system" = "Darwin"
3464then
3465 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003466 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003467 # information
3468 if test -z "${CC}"
3469 then
3470 found_gcc=
3471 found_clang=
3472 as_save_IFS=$IFS; IFS=:
3473 for as_dir in $PATH
3474 do
3475 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003476 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003477 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003478 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479 fi
3480 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003481 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003482 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003483 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 fi
3485 fi
3486 done
3487 IFS=$as_save_IFS
3488
3489 if test -n "$found_gcc" -a -n "$found_clang"
3490 then
3491 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3492 then
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3494$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3495 CC="$found_clang"
3496 CXX="$found_clang++"
3497 fi
3498
3499
3500 elif test -z "$found_gcc" -a -n "$found_clang"
3501 then
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3503$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3504 CC="$found_clang"
3505 CXX="$found_clang++"
3506
3507 elif test -z "$found_gcc" -a -z "$found_clang"
3508 then
3509 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3510 if test -n "${found_clang}"
3511 then
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3513$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3514 CC="${found_clang}"
3515 CXX="`/usr/bin/xcrun -find clang++`"
3516
3517 # else: use default behaviour
3518 fi
3519 fi
3520 fi
3521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003522ac_ext=c
3523ac_cpp='$CPP $CPPFLAGS'
3524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526ac_compiler_gnu=$ac_cv_c_compiler_gnu
3527if test -n "$ac_tool_prefix"; then
3528 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3529set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3531$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003532if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003533 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003534else
3535 if test -n "$CC"; then
3536 ac_cv_prog_CC="$CC" # Let the user override the test.
3537else
Martin v. Löwis11437992002-04-12 09:54:03 +00003538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3539for as_dir in $PATH
3540do
3541 IFS=$as_save_IFS
3542 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $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 +00003547 break 2
3548 fi
3549done
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
Jack Jansendd19cf82001-12-06 22:36:17 +00003553fi
3554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003555CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003556if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3558$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003559else
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3561$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562fi
3563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564
Martin v. Löwis11437992002-04-12 09:54:03 +00003565fi
3566if test -z "$ac_cv_prog_CC"; then
3567 ac_ct_CC=$CC
3568 # Extract the first word of "gcc", so it can be a program name with args.
3569set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003572if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003574else
3575 if test -n "$ac_ct_CC"; then
3576 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3577else
3578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579for as_dir in $PATH
3580do
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $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 +00003587 break 2
3588 fi
3589done
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
3593fi
3594fi
3595ac_ct_CC=$ac_cv_prog_ac_ct_CC
3596if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3598$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003599else
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604 if test "x$ac_ct_CC" = x; then
3605 CC=""
3606 else
3607 case $cross_compiling:$ac_tool_warned in
3608yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611ac_tool_warned=yes ;;
3612esac
3613 CC=$ac_ct_CC
3614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
3616 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003617fi
3618
Jack Jansendd19cf82001-12-06 22:36:17 +00003619if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 if test -n "$ac_tool_prefix"; then
3621 # 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 +00003622set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3624$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003625if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
3628 if test -n "$CC"; then
3629 ac_cv_prog_CC="$CC" # Let the user override the test.
3630else
Martin v. Löwis11437992002-04-12 09:54:03 +00003631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH
3633do
3634 IFS=$as_save_IFS
3635 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 $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 +00003640 break 2
3641 fi
3642done
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003645
3646fi
3647fi
3648CC=$ac_cv_prog_CC
3649if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3651$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655fi
3656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660if test -z "$CC"; then
3661 # Extract the first word of "cc", so it can be a program name with args.
3662set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003671 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3680 ac_prog_rejected=yes
3681 continue
3682 fi
3683 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $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 +00003685 break 2
3686 fi
3687done
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003690
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003691if test $ac_prog_rejected = yes; then
3692 # We found a bogon in the path, so make sure we never use it.
3693 set dummy $ac_cv_prog_CC
3694 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003696 # We chose a different compiler from the bogus one.
3697 # However, it has the same basename, so the bogon will be chosen
3698 # first if we set CC to just the basename; use the full file name.
3699 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003700 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701 fi
3702fi
3703fi
3704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3708$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003709else
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3711$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712fi
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716if test -z "$CC"; then
3717 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 do
3720 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3721set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003724if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003726else
3727 if test -n "$CC"; then
3728 ac_cv_prog_CC="$CC" # Let the user override the test.
3729else
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $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 +00003739 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741done
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745fi
3746fi
3747CC=$ac_cv_prog_CC
3748if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003754fi
3755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 test -n "$CC" && break
3758 done
3759fi
3760if test -z "$CC"; then
3761 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003763do
3764 # Extract the first word of "$ac_prog", so it can be a program name with args.
3765set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003768if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
3771 if test -n "$ac_ct_CC"; then
3772 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3773else
3774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777 IFS=$as_save_IFS
3778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 $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 +00003783 break 2
3784 fi
3785done
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
3790fi
3791ac_ct_CC=$ac_cv_prog_ac_ct_CC
3792if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3794$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 test -n "$ac_ct_CC" && break
3802done
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 if test "x$ac_ct_CC" = x; then
3805 CC=""
3806 else
3807 case $cross_compiling:$ac_tool_warned in
3808yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811ac_tool_warned=yes ;;
3812esac
3813 CC=$ac_ct_CC
3814 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
3816
3817fi
3818
3819
Matthias Kloseb9621712010-04-24 17:59:49 +00003820test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003822as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003823See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824
3825# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3827set X $ac_compile
3828ac_compiler=$2
3829for ac_option in --version -v -V -qversion; do
3830 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831case "(($ac_try" in
3832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3833 *) ac_try_echo=$ac_try;;
3834esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3836$as_echo "$ac_try_echo"; } >&5
3837 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 if test -s conftest.err; then
3840 sed '10a\
3841... rest of stderr output deleted ...
3842 10q' conftest.err >conftest.er1
3843 cat conftest.er1 >&5
3844 fi
3845 rm -f conftest.er1 conftest.err
3846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3847 test $ac_status = 0; }
3848done
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
Matthias Kloseb9621712010-04-24 17:59:49 +00003850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003851/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853int
3854main ()
3855{
3856
3857 ;
3858 return 0;
3859}
3860_ACEOF
3861ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003862ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003863# Try to create an executable without -o first, disregard a.out.
3864# It will help us diagnose broken compilers, and finding out an intuition
3865# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3867$as_echo_n "checking whether the C compiler works... " >&6; }
3868ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3869
3870# The possible output files:
3871ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873ac_rmfiles=
3874for ac_file in $ac_files
3875do
3876 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3879 esac
3880done
3881rm -f $ac_rmfiles
3882
Matthias Kloseb9621712010-04-24 17:59:49 +00003883if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884case "(($ac_try" in
3885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886 *) ac_try_echo=$ac_try;;
3887esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3895# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3896# in a Makefile. We should not override ac_cv_exeext if it was cached,
3897# so that the user can short-circuit this test for compilers unknown to
3898# Autoconf.
3899for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003900do
3901 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003904 ;;
3905 [ab].out )
3906 # We found the default executable, but exeext='' is most
3907 # certainly right.
3908 break;;
3909 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 then :; else
3912 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3913 fi
3914 # We set ac_cv_exeext here because the later test for it is not
3915 # safe: cross compilers may not add the suffix if given an `-o'
3916 # argument, so we may need to know it at that point already.
3917 # Even if this section looks crufty: it has the advantage of
3918 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003919 break;;
3920 * )
3921 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 esac
3923done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924test "$ac_cv_exeext" = no && ac_cv_exeext=
3925
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 ac_file=''
3928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003929if test -z "$ac_file"; then :
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931$as_echo "no" >&6; }
3932$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003933sed 's/^/| /' conftest.$ac_ext >&5
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003937as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003938See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003939else
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3941$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3944$as_echo_n "checking for C compiler default output file name... " >&6; }
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3946$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003947ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003948
Matthias Kloseb9621712010-04-24 17:59:49 +00003949rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003950ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3952$as_echo_n "checking for suffix of executables... " >&6; }
3953if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3965# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3966# work properly (i.e., refer to `conftest.exe'), while it won't with
3967# `rm'.
3968for ac_file in conftest.exe conftest conftest.*; do
3969 test -f "$ac_file" || continue
3970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 break;;
3974 * ) break;;
3975 esac
3976done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003977else
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003980as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003981See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f conftest conftest$ac_cv_exeext
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3985$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986
3987rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003988EXEEXT=$ac_cv_exeext
3989ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991/* end confdefs.h. */
3992#include <stdio.h>
3993int
3994main ()
3995{
3996FILE *f = fopen ("conftest.out", "w");
3997 return ferror (f) || fclose (f) != 0;
3998
3999 ;
4000 return 0;
4001}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004003ac_clean_files="$ac_clean_files conftest.out"
4004# Check that the compiler produces executables we can run. If not, either
4005# the compiler is broken, or we cross compile.
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4007$as_echo_n "checking whether we are cross compiling... " >&6; }
4008if test "$cross_compiling" != yes; then
4009 { { ac_try="$ac_link"
4010case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
4016 (eval "$ac_link") 2>&5
4017 ac_status=$?
4018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }
4020 if { ac_try='./conftest$ac_cv_exeext'
4021 { { case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
4027 (eval "$ac_try") 2>&5
4028 ac_status=$?
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }; }; then
4031 cross_compiling=no
4032 else
4033 if test "$cross_compiling" = maybe; then
4034 cross_compiling=yes
4035 else
4036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004038as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004040See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 fi
4042 fi
4043fi
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4045$as_echo "$cross_compiling" >&6; }
4046
4047rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4048ac_clean_files=$ac_clean_files_save
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4050$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004051if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 $as_echo_n "(cached) " >&6
4053else
4054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055/* end confdefs.h. */
4056
4057int
4058main ()
4059{
4060
4061 ;
4062 return 0;
4063}
4064_ACEOF
4065rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004066if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004074 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 for ac_file in conftest.o conftest.obj conftest.*; do
4078 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4082 break;;
4083 esac
4084done
4085else
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004087sed 's/^/| /' conftest.$ac_ext >&5
4088
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004091as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004093fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4097$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004098OBJEXT=$ac_cv_objext
4099ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4101$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004104else
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Martin v. Löwis11437992002-04-12 09:54:03 +00004108int
4109main ()
4110{
4111#ifndef __GNUC__
4112 choke me
4113#endif
4114
4115 ;
4116 return 0;
4117}
4118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 ac_compiler_gnu=yes
4121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004125ac_cv_c_compiler_gnu=$ac_compiler_gnu
4126
4127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4129$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4130if test $ac_compiler_gnu = yes; then
4131 GCC=yes
4132else
4133 GCC=
4134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004135ac_test_CFLAGS=${CFLAGS+set}
4136ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4138$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004139if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004141else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142 ac_save_c_werror_flag=$ac_c_werror_flag
4143 ac_c_werror_flag=yes
4144 ac_cv_prog_cc_g=no
4145 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149int
4150main ()
4151{
4152
4153 ;
4154 return 0;
4155}
4156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004157if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004158 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159else
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 CFLAGS=""
4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162/* end confdefs.h. */
4163
4164int
4165main ()
4166{
4167
4168 ;
4169 return 0;
4170}
4171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004172if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173
Matthias Kloseb9621712010-04-24 17:59:49 +00004174else
4175 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178/* end confdefs.h. */
4179
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004188if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4196 ac_c_werror_flag=$ac_save_c_werror_flag
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4199$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004200if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004202elif test $ac_cv_prog_cc_g = yes; then
4203 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004204 CFLAGS="-g -O2"
4205 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207 fi
4208else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209 if test "$GCC" = yes; then
4210 CFLAGS="-O2"
4211 else
4212 CFLAGS=
4213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4216$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004217if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004221ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004223/* end confdefs.h. */
4224#include <stdarg.h>
4225#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004226struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004227/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4228struct buf { int x; };
4229FILE * (*rcsopen) (struct buf *, struct stat *, int);
4230static char *e (p, i)
4231 char **p;
4232 int i;
4233{
4234 return p[i];
4235}
4236static char *f (char * (*g) (char **, int), char **p, ...)
4237{
4238 char *s;
4239 va_list v;
4240 va_start (v,p);
4241 s = g (p, va_arg (v,int));
4242 va_end (v);
4243 return s;
4244}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004245
4246/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4247 function prototypes and stuff, but not '\xHH' hex character constants.
4248 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4251 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004253int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4256 inside strings and character constants. */
4257#define FOO(x) 'x'
4258int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4259
Skip Montanaro6dead952003-09-25 14:50:04 +00004260int test (int i, double x);
4261struct s1 {int (*f) (int a);};
4262struct s2 {int (*f) (double a);};
4263int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4264int argc;
4265char **argv;
4266int
4267main ()
4268{
4269return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4270 ;
4271 return 0;
4272}
4273_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4275 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004276do
4277 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281rm -f core conftest.err conftest.$ac_objext
4282 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004283done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285CC=$ac_save_CC
4286
4287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288# AC_CACHE_VAL
4289case "x$ac_cv_prog_cc_c89" in
4290 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4292$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4295$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004296 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4299$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004301if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004302
Matthias Kloseb9621712010-04-24 17:59:49 +00004303fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305ac_ext=c
4306ac_cpp='$CPP $CPPFLAGS'
4307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004311ac_ext=c
4312ac_cpp='$CPP $CPPFLAGS'
4313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4315ac_compiler_gnu=$ac_cv_c_compiler_gnu
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4317$as_echo_n "checking how to run the C preprocessor... " >&6; }
4318# On Suns, sometimes $CPP names a directory.
4319if test -n "$CPP" && test -d "$CPP"; then
4320 CPP=
4321fi
4322if test -z "$CPP"; then
4323 if ${ac_cv_prog_CPP+:} false; then :
4324 $as_echo_n "(cached) " >&6
4325else
4326 # Double quotes because CPP needs to be expanded
4327 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4328 do
4329 ac_preproc_ok=false
4330for ac_c_preproc_warn_flag in '' yes
4331do
4332 # Use a header file that comes with gcc, so configuring glibc
4333 # with a fresh cross-compiler works.
4334 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4335 # <limits.h> exists even on freestanding compilers.
4336 # On the NeXT, cc -E runs the code through the compiler's parser,
4337 # not just through cpp. "Syntax error" is here to catch this case.
4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339/* end confdefs.h. */
4340#ifdef __STDC__
4341# include <limits.h>
4342#else
4343# include <assert.h>
4344#endif
4345 Syntax error
4346_ACEOF
4347if ac_fn_c_try_cpp "$LINENO"; then :
4348
4349else
4350 # Broken: fails on valid input.
4351continue
4352fi
4353rm -f conftest.err conftest.i conftest.$ac_ext
4354
4355 # OK, works on sane cases. Now check whether nonexistent headers
4356 # can be detected and how.
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358/* end confdefs.h. */
4359#include <ac_nonexistent.h>
4360_ACEOF
4361if ac_fn_c_try_cpp "$LINENO"; then :
4362 # Broken: success on invalid input.
4363continue
4364else
4365 # Passes both tests.
4366ac_preproc_ok=:
4367break
4368fi
4369rm -f conftest.err conftest.i conftest.$ac_ext
4370
4371done
4372# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4373rm -f conftest.i conftest.err conftest.$ac_ext
4374if $ac_preproc_ok; then :
4375 break
4376fi
4377
4378 done
4379 ac_cv_prog_CPP=$CPP
4380
4381fi
4382 CPP=$ac_cv_prog_CPP
4383else
4384 ac_cv_prog_CPP=$CPP
4385fi
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4387$as_echo "$CPP" >&6; }
4388ac_preproc_ok=false
4389for ac_c_preproc_warn_flag in '' yes
4390do
4391 # Use a header file that comes with gcc, so configuring glibc
4392 # with a fresh cross-compiler works.
4393 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4394 # <limits.h> exists even on freestanding compilers.
4395 # On the NeXT, cc -E runs the code through the compiler's parser,
4396 # not just through cpp. "Syntax error" is here to catch this case.
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398/* end confdefs.h. */
4399#ifdef __STDC__
4400# include <limits.h>
4401#else
4402# include <assert.h>
4403#endif
4404 Syntax error
4405_ACEOF
4406if ac_fn_c_try_cpp "$LINENO"; then :
4407
4408else
4409 # Broken: fails on valid input.
4410continue
4411fi
4412rm -f conftest.err conftest.i conftest.$ac_ext
4413
4414 # OK, works on sane cases. Now check whether nonexistent headers
4415 # can be detected and how.
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
4418#include <ac_nonexistent.h>
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421 # Broken: success on invalid input.
4422continue
4423else
4424 # Passes both tests.
4425ac_preproc_ok=:
4426break
4427fi
4428rm -f conftest.err conftest.i conftest.$ac_ext
4429
4430done
4431# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4432rm -f conftest.i conftest.err conftest.$ac_ext
4433if $ac_preproc_ok; then :
4434
4435else
4436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4438as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4439See \`config.log' for more details" "$LINENO" 5; }
4440fi
4441
4442ac_ext=c
4443ac_cpp='$CPP $CPPFLAGS'
4444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4446ac_compiler_gnu=$ac_cv_c_compiler_gnu
4447
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4449$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4450if ${ac_cv_path_GREP+:} false; then :
4451 $as_echo_n "(cached) " >&6
4452else
4453 if test -z "$GREP"; then
4454 ac_path_GREP_found=false
4455 # Loop through the user's path and test for each of PROGNAME-LIST
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_prog in grep ggrep; do
4462 for ac_exec_ext in '' $ac_executable_extensions; do
4463 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4464 as_fn_executable_p "$ac_path_GREP" || continue
4465# Check for GNU ac_path_GREP and select it if it is found.
4466 # Check for GNU $ac_path_GREP
4467case `"$ac_path_GREP" --version 2>&1` in
4468*GNU*)
4469 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4470*)
4471 ac_count=0
4472 $as_echo_n 0123456789 >"conftest.in"
4473 while :
4474 do
4475 cat "conftest.in" "conftest.in" >"conftest.tmp"
4476 mv "conftest.tmp" "conftest.in"
4477 cp "conftest.in" "conftest.nl"
4478 $as_echo 'GREP' >> "conftest.nl"
4479 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4480 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4481 as_fn_arith $ac_count + 1 && ac_count=$as_val
4482 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4483 # Best one so far, save it but keep looking for a better one
4484 ac_cv_path_GREP="$ac_path_GREP"
4485 ac_path_GREP_max=$ac_count
4486 fi
4487 # 10*(2^10) chars as input seems more than enough
4488 test $ac_count -gt 10 && break
4489 done
4490 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4491esac
4492
4493 $ac_path_GREP_found && break 3
4494 done
4495 done
4496 done
4497IFS=$as_save_IFS
4498 if test -z "$ac_cv_path_GREP"; then
4499 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4500 fi
4501else
4502 ac_cv_path_GREP=$GREP
4503fi
4504
4505fi
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4507$as_echo "$ac_cv_path_GREP" >&6; }
4508 GREP="$ac_cv_path_GREP"
4509
4510
Łukasz Langaa785c872016-09-09 17:37:37 -07004511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4512$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4513if ${ac_cv_path_SED+:} false; then :
4514 $as_echo_n "(cached) " >&6
4515else
4516 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4517 for ac_i in 1 2 3 4 5 6 7; do
4518 ac_script="$ac_script$as_nl$ac_script"
4519 done
4520 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4521 { ac_script=; unset ac_script;}
4522 if test -z "$SED"; then
4523 ac_path_SED_found=false
4524 # Loop through the user's path and test for each of PROGNAME-LIST
4525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4526for as_dir in $PATH
4527do
4528 IFS=$as_save_IFS
4529 test -z "$as_dir" && as_dir=.
4530 for ac_prog in sed gsed; do
4531 for ac_exec_ext in '' $ac_executable_extensions; do
4532 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4533 as_fn_executable_p "$ac_path_SED" || continue
4534# Check for GNU ac_path_SED and select it if it is found.
4535 # Check for GNU $ac_path_SED
4536case `"$ac_path_SED" --version 2>&1` in
4537*GNU*)
4538 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4539*)
4540 ac_count=0
4541 $as_echo_n 0123456789 >"conftest.in"
4542 while :
4543 do
4544 cat "conftest.in" "conftest.in" >"conftest.tmp"
4545 mv "conftest.tmp" "conftest.in"
4546 cp "conftest.in" "conftest.nl"
4547 $as_echo '' >> "conftest.nl"
4548 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4549 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4550 as_fn_arith $ac_count + 1 && ac_count=$as_val
4551 if test $ac_count -gt ${ac_path_SED_max-0}; then
4552 # Best one so far, save it but keep looking for a better one
4553 ac_cv_path_SED="$ac_path_SED"
4554 ac_path_SED_max=$ac_count
4555 fi
4556 # 10*(2^10) chars as input seems more than enough
4557 test $ac_count -gt 10 && break
4558 done
4559 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4560esac
4561
4562 $ac_path_SED_found && break 3
4563 done
4564 done
4565 done
4566IFS=$as_save_IFS
4567 if test -z "$ac_cv_path_SED"; then
4568 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4569 fi
4570else
4571 ac_cv_path_SED=$SED
4572fi
4573
4574fi
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4576$as_echo "$ac_cv_path_SED" >&6; }
4577 SED="$ac_cv_path_SED"
4578 rm -f conftest.sed
4579
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004580
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581
4582
Matthias Kloseb9621712010-04-24 17:59:49 +00004583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4584$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004586# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004588 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
4590 case $withval in
4591 no) with_cxx_main=no
4592 MAINCC='$(CC)';;
4593 yes) with_cxx_main=yes
4594 MAINCC='$(CXX)';;
4595 *) with_cxx_main=yes
4596 MAINCC=$withval
4597 if test -z "$CXX"
4598 then
4599 CXX=$withval
4600 fi;;
4601 esac
4602else
4603
4604 with_cxx_main=no
4605 MAINCC='$(CC)'
4606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004607fi
4608
Matthias Kloseb9621712010-04-24 17:59:49 +00004609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4610$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611
4612preset_cxx="$CXX"
4613if test -z "$CXX"
4614then
4615 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004616 gcc) if test -n "$ac_tool_prefix"; then
4617 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4618set dummy ${ac_tool_prefix}g++; ac_word=$2
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620$as_echo_n "checking for $ac_word... " >&6; }
4621if ${ac_cv_path_CXX+:} false; then :
4622 $as_echo_n "(cached) " >&6
4623else
4624 case $CXX in
4625 [\\/]* | ?:[\\/]*)
4626 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4627 ;;
4628 *)
4629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in notfound
4631do
4632 IFS=$as_save_IFS
4633 test -z "$as_dir" && as_dir=.
4634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004636 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638 break 2
4639 fi
4640done
4641 done
4642IFS=$as_save_IFS
4643
4644 ;;
4645esac
4646fi
4647CXX=$ac_cv_path_CXX
4648if test -n "$CXX"; then
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4650$as_echo "$CXX" >&6; }
4651else
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4653$as_echo "no" >&6; }
4654fi
4655
4656
4657fi
4658if test -z "$ac_cv_path_CXX"; then
4659 ac_pt_CXX=$CXX
4660 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004661set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664if ${ac_cv_path_ac_pt_CXX+:} false; then :
4665 $as_echo_n "(cached) " >&6
4666else
4667 case $ac_pt_CXX in
4668 [\\/]* | ?:[\\/]*)
4669 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4670 ;;
4671 *)
4672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in notfound
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
4677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 break 2
4682 fi
4683done
4684 done
4685IFS=$as_save_IFS
4686
4687 ;;
4688esac
4689fi
4690ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4691if test -n "$ac_pt_CXX"; then
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4693$as_echo "$ac_pt_CXX" >&6; }
4694else
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699 if test "x$ac_pt_CXX" = x; then
4700 CXX="g++"
4701 else
4702 case $cross_compiling:$ac_tool_warned in
4703yes:)
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4706ac_tool_warned=yes ;;
4707esac
4708 CXX=$ac_pt_CXX
4709 fi
4710else
4711 CXX="$ac_cv_path_CXX"
4712fi
4713 ;;
4714 cc) if test -n "$ac_tool_prefix"; then
4715 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4716set dummy ${ac_tool_prefix}c++; ac_word=$2
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004719if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721else
4722 case $CXX in
4723 [\\/]* | ?:[\\/]*)
4724 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4725 ;;
4726 *)
4727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4728for as_dir in notfound
4729do
4730 IFS=$as_save_IFS
4731 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 break 2
4737 fi
4738done
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004740IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742 ;;
4743esac
4744fi
4745CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004746if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4748$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004749else
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754
4755fi
4756if test -z "$ac_cv_path_CXX"; then
4757 ac_pt_CXX=$CXX
4758 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004762if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 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 +00004768 ;;
4769 *)
4770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in notfound
4772do
4773 IFS=$as_save_IFS
4774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 break 2
4780 fi
4781done
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ;;
4786esac
4787fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4789if test -n "$ac_pt_CXX"; then
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4791$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792else
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797 if test "x$ac_pt_CXX" = x; then
4798 CXX="c++"
4799 else
4800 case $cross_compiling:$ac_tool_warned in
4801yes:)
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4804ac_tool_warned=yes ;;
4805esac
4806 CXX=$ac_pt_CXX
4807 fi
4808else
4809 CXX="$ac_cv_path_CXX"
4810fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 clang|*/clang) if test -n "$ac_tool_prefix"; then
4813 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4814set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CXX+:} false; then :
4818 $as_echo_n "(cached) " >&6
4819else
4820 case $CXX in
4821 [\\/]* | ?:[\\/]*)
4822 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4823 ;;
4824 *)
4825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in notfound
4827do
4828 IFS=$as_save_IFS
4829 test -z "$as_dir" && as_dir=.
4830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834 break 2
4835 fi
4836done
4837 done
4838IFS=$as_save_IFS
4839
Ned Deilycbfb9a52012-06-23 16:02:19 -07004840 ;;
4841esac
4842fi
4843CXX=$ac_cv_path_CXX
4844if test -n "$CXX"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4846$as_echo "$CXX" >&6; }
4847else
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852
4853fi
4854if test -z "$ac_cv_path_CXX"; then
4855 ac_pt_CXX=$CXX
4856 # Extract the first word of "clang++", so it can be a program name with args.
4857set dummy clang++; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if ${ac_cv_path_ac_pt_CXX+:} false; then :
4861 $as_echo_n "(cached) " >&6
4862else
4863 case $ac_pt_CXX in
4864 [\\/]* | ?:[\\/]*)
4865 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4866 ;;
4867 *)
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in notfound
4870do
4871 IFS=$as_save_IFS
4872 test -z "$as_dir" && as_dir=.
4873 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877 break 2
4878 fi
4879done
4880 done
4881IFS=$as_save_IFS
4882
4883 ;;
4884esac
4885fi
4886ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4887if test -n "$ac_pt_CXX"; then
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4889$as_echo "$ac_pt_CXX" >&6; }
4890else
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895 if test "x$ac_pt_CXX" = x; then
4896 CXX="clang++"
4897 else
4898 case $cross_compiling:$ac_tool_warned in
4899yes:)
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4902ac_tool_warned=yes ;;
4903esac
4904 CXX=$ac_pt_CXX
4905 fi
4906else
4907 CXX="$ac_cv_path_CXX"
4908fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004909 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004910 icc|*/icc) if test -n "$ac_tool_prefix"; then
4911 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4912set dummy ${ac_tool_prefix}icpc; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if ${ac_cv_path_CXX+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 case $CXX in
4919 [\\/]* | ?:[\\/]*)
4920 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4921 ;;
4922 *)
4923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in notfound
4925do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_exec_ext in '' $ac_executable_extensions; do
4929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4930 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932 break 2
4933 fi
4934done
4935 done
4936IFS=$as_save_IFS
4937
4938 ;;
4939esac
4940fi
4941CXX=$ac_cv_path_CXX
4942if test -n "$CXX"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4944$as_echo "$CXX" >&6; }
4945else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950
4951fi
4952if test -z "$ac_cv_path_CXX"; then
4953 ac_pt_CXX=$CXX
4954 # Extract the first word of "icpc", so it can be a program name with args.
4955set dummy icpc; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
4958if ${ac_cv_path_ac_pt_CXX+:} false; then :
4959 $as_echo_n "(cached) " >&6
4960else
4961 case $ac_pt_CXX in
4962 [\\/]* | ?:[\\/]*)
4963 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4964 ;;
4965 *)
4966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in notfound
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 for ac_exec_ext in '' $ac_executable_extensions; do
4972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975 break 2
4976 fi
4977done
4978 done
4979IFS=$as_save_IFS
4980
4981 ;;
4982esac
4983fi
4984ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4985if test -n "$ac_pt_CXX"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4987$as_echo "$ac_pt_CXX" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993 if test "x$ac_pt_CXX" = x; then
4994 CXX="icpc"
4995 else
4996 case $cross_compiling:$ac_tool_warned in
4997yes:)
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4999$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5000ac_tool_warned=yes ;;
5001esac
5002 CXX=$ac_pt_CXX
5003 fi
5004else
5005 CXX="$ac_cv_path_CXX"
5006fi
5007 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005008 esac
5009 if test "$CXX" = "notfound"
5010 then
5011 CXX=""
5012 fi
5013fi
5014if test -z "$CXX"
5015then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005016 if test -n "$ac_tool_prefix"; then
5017 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5018 do
5019 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005023if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025else
5026 if test -n "$CXX"; then
5027 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5028else
5029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005036 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005038 break 2
5039 fi
5040done
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005043
5044fi
5045fi
5046CXX=$ac_cv_prog_CXX
5047if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5049$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050else
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005053fi
5054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005056 test -n "$CXX" && break
5057 done
5058fi
5059if test -z "$CXX"; then
5060 ac_ct_CXX=$CXX
5061 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5062do
5063 # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5068 $as_echo_n "(cached) " >&6
5069else
5070 if test -n "$ac_ct_CXX"; then
5071 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5072else
5073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
5078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 ac_cv_prog_ac_ct_CXX="$ac_prog"
5081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082 break 2
5083 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 done
5086IFS=$as_save_IFS
5087
5088fi
5089fi
5090ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5091if test -n "$ac_ct_CXX"; then
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5093$as_echo "$ac_ct_CXX" >&6; }
5094else
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
5097fi
5098
5099
5100 test -n "$ac_ct_CXX" && break
5101done
5102
5103 if test "x$ac_ct_CXX" = x; then
5104 CXX="notfound"
5105 else
5106 case $cross_compiling:$ac_tool_warned in
5107yes:)
5108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5110ac_tool_warned=yes ;;
5111esac
5112 CXX=$ac_ct_CXX
5113 fi
5114fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115
5116 if test "$CXX" = "notfound"
5117 then
5118 CXX=""
5119 fi
5120fi
5121if test "$preset_cxx" != "$CXX"
5122then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005123 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125 By default, distutils will build C++ extension modules with \"$CXX\".
5126 If this is not intended, then set CXX on the configure command line.
5127 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005128$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129
5130 By default, distutils will build C++ extension modules with \"$CXX\".
5131 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133fi
5134
5135
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005136MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5137
5138
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5140$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5141cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005142#undef bfin
5143#undef cris
5144#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005145#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef hppa
5147#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005149#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005150#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005151#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005153#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005154 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005155#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156# if defined(__x86_64__) && defined(__LP64__)
5157 x86_64-linux-gnu
5158# elif defined(__x86_64__) && defined(__ILP32__)
5159 x86_64-linux-gnux32
5160# elif defined(__i386__)
5161 i386-linux-gnu
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-gnu
5165# else
5166 aarch64-linux-gnu
5167# endif
5168# elif defined(__aarch64__) && defined(__AARCH64EB__)
5169# if defined(__ILP32__)
5170 aarch64_be_ilp32-linux-gnu
5171# else
5172 aarch64_be-linux-gnu
5173# endif
5174# elif defined(__alpha__)
5175 alpha-linux-gnu
5176# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5177# if defined(__ARMEL__)
5178 arm-linux-gnueabihf
5179# else
5180 armeb-linux-gnueabihf
5181# endif
5182# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5183# if defined(__ARMEL__)
5184 arm-linux-gnueabi
5185# else
5186 armeb-linux-gnueabi
5187# endif
5188# elif defined(__hppa__)
5189 hppa-linux-gnu
5190# elif defined(__ia64__)
5191 ia64-linux-gnu
5192# elif defined(__m68k__) && !defined(__mcoldfire__)
5193 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005194# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5195# if _MIPS_SIM == _ABIO32
5196 mipsisa32r6el-linux-gnu
5197# elif _MIPS_SIM == _ABIN32
5198 mipsisa64r6el-linux-gnuabin32
5199# elif _MIPS_SIM == _ABI64
5200 mipsisa64r6el-linux-gnuabi64
5201# else
5202# error unknown platform triplet
5203# endif
5204# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5205# if _MIPS_SIM == _ABIO32
5206 mipsisa32r6-linux-gnu
5207# elif _MIPS_SIM == _ABIN32
5208 mipsisa64r6-linux-gnuabin32
5209# elif _MIPS_SIM == _ABI64
5210 mipsisa64r6-linux-gnuabi64
5211# else
5212# error unknown platform triplet
5213# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214# elif defined(__mips_hard_float) && defined(_MIPSEL)
5215# if _MIPS_SIM == _ABIO32
5216 mipsel-linux-gnu
5217# elif _MIPS_SIM == _ABIN32
5218 mips64el-linux-gnuabin32
5219# elif _MIPS_SIM == _ABI64
5220 mips64el-linux-gnuabi64
5221# else
5222# error unknown platform triplet
5223# endif
5224# elif defined(__mips_hard_float)
5225# if _MIPS_SIM == _ABIO32
5226 mips-linux-gnu
5227# elif _MIPS_SIM == _ABIN32
5228 mips64-linux-gnuabin32
5229# elif _MIPS_SIM == _ABI64
5230 mips64-linux-gnuabi64
5231# else
5232# error unknown platform triplet
5233# endif
5234# elif defined(__or1k__)
5235 or1k-linux-gnu
5236# elif defined(__powerpc__) && defined(__SPE__)
5237 powerpc-linux-gnuspe
5238# elif defined(__powerpc64__)
5239# if defined(__LITTLE_ENDIAN__)
5240 powerpc64le-linux-gnu
5241# else
5242 powerpc64-linux-gnu
5243# endif
5244# elif defined(__powerpc__)
5245 powerpc-linux-gnu
5246# elif defined(__s390x__)
5247 s390x-linux-gnu
5248# elif defined(__s390__)
5249 s390-linux-gnu
5250# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5251 sh4-linux-gnu
5252# elif defined(__sparc__) && defined(__arch64__)
5253 sparc64-linux-gnu
5254# elif defined(__sparc__)
5255 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005256# elif defined(__riscv)
5257# if __riscv_xlen == 32
5258 riscv32-linux-gnu
5259# elif __riscv_xlen == 64
5260 riscv64-linux-gnu
5261# else
5262# error unknown platform triplet
5263# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005264# else
5265# error unknown platform triplet
5266# endif
5267#elif defined(__FreeBSD_kernel__)
5268# if defined(__LP64__)
5269 x86_64-kfreebsd-gnu
5270# elif defined(__i386__)
5271 i386-kfreebsd-gnu
5272# else
5273# error unknown platform triplet
5274# endif
5275#elif defined(__gnu_hurd__)
5276 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005277#elif defined(__APPLE__)
5278 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279#else
5280# error unknown platform triplet
5281#endif
5282
5283EOF
5284
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005285if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005286 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5288$as_echo "$PLATFORM_TRIPLET" >&6; }
5289else
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5291$as_echo "none" >&6; }
5292fi
5293rm -f conftest.c conftest.out
5294
5295if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5296 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5297 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5298 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005299elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5300 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005301fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302
doko@ubuntu.com55532312016-06-14 08:55:19 +02005303if test x$MULTIARCH != x; then
5304 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5305fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005306
5307
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5309$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5310save_LDFLAGS="$LDFLAGS"
5311LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005312
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5314/* end confdefs.h. */
5315
5316int
5317main ()
5318{
5319
5320 ;
5321 return 0;
5322}
5323_ACEOF
5324if ac_fn_c_try_link "$LINENO"; then :
5325 NO_AS_NEEDED="-Wl,--no-as-needed"
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5327$as_echo "yes" >&6; }
5328else
5329 NO_AS_NEEDED=""
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333rm -f core conftest.err conftest.$ac_objext \
5334 conftest$ac_exeext conftest.$ac_ext
5335LDFLAGS="$save_LDFLAGS"
5336
5337
5338
5339# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005340
Matthias Kloseb9621712010-04-24 17:59:49 +00005341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5342$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005343if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005344 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005345else
5346 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5347 then ac_cv_path_EGREP="$GREP -E"
5348 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005350 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005351 # Loop through the user's path and test for each of PROGNAME-LIST
5352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5354do
5355 IFS=$as_save_IFS
5356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 for ac_prog in egrep; do
5358 for ac_exec_ext in '' $ac_executable_extensions; do
5359 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005360 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005361# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362 # Check for GNU $ac_path_EGREP
5363case `"$ac_path_EGREP" --version 2>&1` in
5364*GNU*)
5365 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5366*)
5367 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 while :
5370 do
5371 cat "conftest.in" "conftest.in" >"conftest.tmp"
5372 mv "conftest.tmp" "conftest.in"
5373 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5376 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5379 # Best one so far, save it but keep looking for a better one
5380 ac_cv_path_EGREP="$ac_path_EGREP"
5381 ac_path_EGREP_max=$ac_count
5382 fi
5383 # 10*(2^10) chars as input seems more than enough
5384 test $ac_count -gt 10 && break
5385 done
5386 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5387esac
5388
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $ac_path_EGREP_found && break 3
5390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005395 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 +00005396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397else
5398 ac_cv_path_EGREP=$EGREP
5399fi
5400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 fi
5402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5404$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005406
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5409$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005410if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 $as_echo_n "(cached) " >&6
5412else
5413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005414/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005415#include <stdlib.h>
5416#include <stdarg.h>
5417#include <string.h>
5418#include <float.h>
5419
5420int
5421main ()
5422{
5423
5424 ;
5425 return 0;
5426}
5427_ACEOF
5428if ac_fn_c_try_compile "$LINENO"; then :
5429 ac_cv_header_stdc=yes
5430else
5431 ac_cv_header_stdc=no
5432fi
5433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5434
5435if test $ac_cv_header_stdc = yes; then
5436 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438/* end confdefs.h. */
5439#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005441_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005445else
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005448rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450fi
5451
5452if test $ac_cv_header_stdc = yes; then
5453 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455/* end confdefs.h. */
5456#include <stdlib.h>
5457
5458_ACEOF
5459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5460 $EGREP "free" >/dev/null 2>&1; then :
5461
5462else
5463 ac_cv_header_stdc=no
5464fi
5465rm -f conftest*
5466
5467fi
5468
5469if test $ac_cv_header_stdc = yes; then
5470 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5471 if test "$cross_compiling" = yes; then :
5472 :
5473else
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <ctype.h>
5477#include <stdlib.h>
5478#if ((' ' & 0x0FF) == 0x020)
5479# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5480# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5481#else
5482# define ISLOWER(c) \
5483 (('a' <= (c) && (c) <= 'i') \
5484 || ('j' <= (c) && (c) <= 'r') \
5485 || ('s' <= (c) && (c) <= 'z'))
5486# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5487#endif
5488
5489#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5490int
5491main ()
5492{
5493 int i;
5494 for (i = 0; i < 256; i++)
5495 if (XOR (islower (i), ISLOWER (i))
5496 || toupper (i) != TOUPPER (i))
5497 return 2;
5498 return 0;
5499}
5500_ACEOF
5501if ac_fn_c_try_run "$LINENO"; then :
5502
5503else
5504 ac_cv_header_stdc=no
5505fi
5506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5507 conftest.$ac_objext conftest.beam conftest.$ac_ext
5508fi
5509
5510fi
5511fi
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5513$as_echo "$ac_cv_header_stdc" >&6; }
5514if test $ac_cv_header_stdc = yes; then
5515
5516$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5517
5518fi
5519
5520# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5521for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5522 inttypes.h stdint.h unistd.h
5523do :
5524 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5525ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5526"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005527if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005528 cat >>confdefs.h <<_ACEOF
5529#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5530_ACEOF
5531
5532fi
5533
5534done
5535
5536
5537
5538 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 +02005539if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 MINIX=yes
5541else
5542 MINIX=
5543fi
5544
5545
5546 if test "$MINIX" = yes; then
5547
5548$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5549
5550
5551$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5552
5553
5554$as_echo "#define _MINIX 1" >>confdefs.h
5555
5556 fi
5557
5558
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5560$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005561if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 $as_echo_n "(cached) " >&6
5563else
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565/* end confdefs.h. */
5566
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005567# define __EXTENSIONS__ 1
5568 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005569int
5570main ()
5571{
5572
5573 ;
5574 return 0;
5575}
5576_ACEOF
5577if ac_fn_c_try_compile "$LINENO"; then :
5578 ac_cv_safe_to_define___extensions__=yes
5579else
5580 ac_cv_safe_to_define___extensions__=no
5581fi
5582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5583fi
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5585$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5586 test $ac_cv_safe_to_define___extensions__ = yes &&
5587 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5588
5589 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5590
5591 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5592
5593 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5594
5595 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5596
5597
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
Xavier de Gaye95750b12016-07-09 11:05:42 +02005599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5600$as_echo_n "checking for the Android API level... " >&6; }
5601cat >> conftest.c <<EOF
5602#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005603android_api = __ANDROID_API__
5604arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005605#else
5606#error not Android
5607#endif
5608EOF
5609
5610if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005611 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5612 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5614$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005615 if test -z "$ANDROID_API_LEVEL"; then
5616 echo 'Fatal: you must define __ANDROID_API__'
5617 exit 1
5618 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619
5620cat >>confdefs.h <<_ACEOF
5621#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5622_ACEOF
5623
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5626$as_echo_n "checking for the Android arm ABI... " >&6; }
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5628$as_echo "$_arm_arch" >&6; }
5629 if test "$_arm_arch" = 7; then
5630 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5631 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5632 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633else
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5635$as_echo "not Android" >&6; }
5636fi
5637rm -f conftest.c conftest.out
5638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639# Check for unsupported systems
5640case $ac_sys_system/$ac_sys_release in
5641atheos*|Linux*/1*)
5642 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5643 echo See README for details.
5644 exit 1;;
5645esac
5646
5647
Matthias Kloseb9621712010-04-24 17:59:49 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5649$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
5651# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005652if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 withval=$with_suffix;
5654 case $withval in
5655 no) EXEEXT=;;
5656 yes) EXEEXT=.exe;;
5657 *) EXEEXT=$withval;;
5658 esac
5659fi
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5662$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Test whether we're running on a non-case-sensitive system, in which
5665# case we give a warning if no ext is given
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5668$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669if test ! -d CaseSensitiveTestDir; then
5670mkdir CaseSensitiveTestDir
5671fi
5672
5673if test -d casesensitivetestdir
5674then
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5676$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 BUILDEXEEXT=.exe
5678else
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 BUILDEXEEXT=$EXEEXT
5682fi
5683rmdir CaseSensitiveTestDir
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685case $ac_sys_system in
5686hp*|HP*)
5687 case $CC in
5688 cc|*/cc) CC="$CC -Ae";;
5689 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690esac
5691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5694$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test -z "$LIBRARY"
5696then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005697 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5700$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# LDLIBRARY is the name of the library to link against (as opposed to the
5703# name of the library into which to insert object files). BLDLIBRARY is also
5704# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5705# is blank as the main program is not linked directly against LDLIBRARY.
5706# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5707# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5708# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5709# DLLLIBRARY is the shared (i.e., DLL) library.
5710#
5711# RUNSHARED is used to run shared python without installed libraries
5712#
5713# INSTSONAME is the name of the shared library that will be use to install
5714# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005715#
5716# LDVERSION is the shared library version number, normally the Python version
5717# with the ABI build flags appended.
5718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
5720
5721
5722
5723
5724
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726LDLIBRARY="$LIBRARY"
5727BLDLIBRARY='$(LDLIBRARY)'
5728INSTSONAME='$(LDLIBRARY)'
5729DLLLIBRARY=''
5730LDLIBRARYDIR=''
5731RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005732LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734# LINKCC is the command that links the python executable -- default is $(CC).
5735# If CXX is set, and if it is needed to link a main function that was
5736# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5737# python might then depend on the C++ runtime
5738# This is altered for AIX in order to build the export list before
5739# linking.
5740
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5742$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743if test -z "$LINKCC"
5744then
5745 LINKCC='$(PURIFY) $(MAINCC)'
5746 case $ac_sys_system in
5747 AIX*)
5748 exp_extra="\"\""
5749 if test $ac_sys_release -ge 5 -o \
5750 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5751 exp_extra="."
5752 fi
5753 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 QNX*)
5755 # qcc must be used because the other compilers do not
5756 # support -N.
5757 LINKCC=qcc;;
5758 esac
5759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5761$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
5763# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5764# make sure we default having it set to "no": this is used by
5765# distutils.unixccompiler to know if it should add --enable-new-dtags
5766# to linker command lines, and failing to detect GNU ld simply results
5767# in the same bahaviour as before.
5768
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5770$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771ac_prog=ld
5772if test "$GCC" = yes; then
5773 ac_prog=`$CC -print-prog-name=ld`
5774fi
5775case `"$ac_prog" -V 2>&1 < /dev/null` in
5776 *GNU*)
5777 GNULD=yes;;
5778 *)
5779 GNULD=no;;
5780esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5782$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5785$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 enableval=$enable_shared;
5789fi
5790
5791
5792if test -z "$enable_shared"
5793then
5794 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005795 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 enable_shared="yes";;
5797 *)
5798 enable_shared="no";;
5799 esac
5800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5802$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5805$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005808 enableval=$enable_profiling;
5809fi
5810
5811if test "x$enable_profiling" = xyes; then
5812 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005813 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815/* end confdefs.h. */
5816int main() { return 0; }
5817_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005818if ac_fn_c_try_link "$LINENO"; then :
5819
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005823rm -f core conftest.err conftest.$ac_objext \
5824 conftest$ac_exeext conftest.$ac_ext
5825 CC="$ac_save_cc"
5826else
5827 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5830$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832if test "x$enable_profiling" = xyes; then
5833 BASECFLAGS="-pg $BASECFLAGS"
5834 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5838$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
5840# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5841# library that we build, but we do not want to link against it (we
5842# will find it with a -framework option). For this reason there is an
5843# extra variable BLDLIBRARY against which Python and the extension
5844# modules are linked, BLDLIBRARY. This is normally the same as
5845# LDLIBRARY, but empty for MacOSX framework builds.
5846if test "$enable_framework"
5847then
5848 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005849 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 BLDLIBRARY=''
5851else
5852 BLDLIBRARY='$(LDLIBRARY)'
5853fi
5854
5855# Other platforms follow
5856if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005857 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
5861 case $ac_sys_system in
5862 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005863 LDLIBRARY='libpython$(LDVERSION).dll.a'
5864 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ;;
5866 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005867 LDLIBRARY='libpython$(LDVERSION).so'
5868 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005869 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005871 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005872 then
5873 PY3LIBRARY=libpython3.so
5874 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005876 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 LDLIBRARY='libpython$(LDVERSION).so'
5878 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005879 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005881 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005882 then
5883 PY3LIBRARY=libpython3.so
5884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
5886 hp*|HP*)
5887 case `uname -m` in
5888 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
5891 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
5894 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005895 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).dylib'
5900 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005901 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005903 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005906 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 esac
5909else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005910 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 case $ac_sys_system in
5912 CYGWIN*)
5913 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 esac
5917fi
5918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005919if test "$cross_compiling" = yes; then
5920 RUNSHARED=
5921fi
5922
Matthias Kloseb9621712010-04-24 17:59:49 +00005923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5924$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005927if test -n "$ac_tool_prefix"; then
5928 for ac_prog in ar aal
5929 do
5930 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005934if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 if test -n "$AR"; then
5938 ac_cv_prog_AR="$AR" # Let the user override the test.
5939else
5940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943 IFS=$as_save_IFS
5944 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005947 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 break 2
5950 fi
5951done
Matthias Kloseb9621712010-04-24 17:59:49 +00005952 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953IFS=$as_save_IFS
5954
5955fi
5956fi
5957AR=$ac_cv_prog_AR
5958if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5960$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961else
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964fi
5965
5966
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005967 test -n "$AR" && break
5968 done
5969fi
5970if test -z "$AR"; then
5971 ac_ct_AR=$AR
5972 for ac_prog in ar aal
5973do
5974 # Extract the first word of "$ac_prog", so it can be a program name with args.
5975set dummy $ac_prog; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_prog_ac_ct_AR+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980else
5981 if test -n "$ac_ct_AR"; then
5982 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
5989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005991 ac_cv_prog_ac_ct_AR="$ac_prog"
5992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993 break 2
5994 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005996 done
5997IFS=$as_save_IFS
5998
5999fi
6000fi
6001ac_ct_AR=$ac_cv_prog_ac_ct_AR
6002if test -n "$ac_ct_AR"; then
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6004$as_echo "$ac_ct_AR" >&6; }
6005else
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011 test -n "$ac_ct_AR" && break
6012done
6013
6014 if test "x$ac_ct_AR" = x; then
6015 AR="ar"
6016 else
6017 case $cross_compiling:$ac_tool_warned in
6018yes:)
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6021ac_tool_warned=yes ;;
6022esac
6023 AR=$ac_ct_AR
6024 fi
6025fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026
6027
6028# tweak ARFLAGS only if the user didn't set it on the command line
6029
6030if test -z "$ARFLAGS"
6031then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006032 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033fi
6034
doko@ubuntu.com58844492012-06-30 18:25:32 +02006035if test -n "$ac_tool_prefix"; then
6036 for ac_prog in readelf
6037 do
6038 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_prog_READELF+:} false; then :
6043 $as_echo_n "(cached) " >&6
6044else
6045 if test -n "$READELF"; then
6046 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6047else
6048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051 IFS=$as_save_IFS
6052 test -z "$as_dir" && as_dir=.
6053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006055 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6057 break 2
6058 fi
6059done
6060 done
6061IFS=$as_save_IFS
6062
6063fi
6064fi
6065READELF=$ac_cv_prog_READELF
6066if test -n "$READELF"; then
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6068$as_echo "$READELF" >&6; }
6069else
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075 test -n "$READELF" && break
6076 done
6077fi
6078if test -z "$READELF"; then
6079 ac_ct_READELF=$READELF
6080 for ac_prog in readelf
6081do
6082 # Extract the first word of "$ac_prog", so it can be a program name with args.
6083set dummy $ac_prog; ac_word=$2
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6085$as_echo_n "checking for $ac_word... " >&6; }
6086if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6087 $as_echo_n "(cached) " >&6
6088else
6089 if test -n "$ac_ct_READELF"; then
6090 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6091else
6092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6093for as_dir in $PATH
6094do
6095 IFS=$as_save_IFS
6096 test -z "$as_dir" && as_dir=.
6097 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006099 ac_cv_prog_ac_ct_READELF="$ac_prog"
6100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6101 break 2
6102 fi
6103done
6104 done
6105IFS=$as_save_IFS
6106
6107fi
6108fi
6109ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6110if test -n "$ac_ct_READELF"; then
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6112$as_echo "$ac_ct_READELF" >&6; }
6113else
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6115$as_echo "no" >&6; }
6116fi
6117
6118
6119 test -n "$ac_ct_READELF" && break
6120done
6121
6122 if test "x$ac_ct_READELF" = x; then
6123 READELF=":"
6124 else
6125 case $cross_compiling:$ac_tool_warned in
6126yes:)
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6129ac_tool_warned=yes ;;
6130esac
6131 READELF=$ac_ct_READELF
6132 fi
6133fi
6134
6135if test "$cross_compiling" = yes; then
6136 case "$READELF" in
6137 readelf|:)
6138 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6139 ;;
6140 esac
6141fi
6142
6143
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006146hp*|HP*)
6147 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 if test -z "$INSTALL"
6149 then
6150 INSTALL="${srcdir}/install-sh -c"
6151 fi
6152esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153# Find a good install program. We prefer a C program (faster),
6154# so one script is as good as another. But avoid the broken or
6155# incompatible versions:
6156# SysV /etc/install, /usr/sbin/install
6157# SunOS /usr/etc/install
6158# IRIX /sbin/install
6159# AIX /bin/install
6160# AmigaOS /C/install, which installs bootblocks on floppy discs
6161# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6162# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6163# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6164# OS/2's system install, which has a completely different semantic
6165# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006166# Reject install programs that cannot install multiple files.
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6168$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006170if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172else
6173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 # Account for people who put trailing slashes in PATH elements.
6179case $as_dir/ in #((
6180 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 /usr/ucb/* ) ;;
6184 *)
6185 # OSF1 and SCO ODT 3.0 have their own names for install.
6186 # Don't use installbsd from OSF since it installs stuff as root
6187 # by default.
6188 for ac_prog in ginstall scoinst install; do
6189 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006190 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 if test $ac_prog = install &&
6192 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6193 # AIX install. It has an incompatible calling convention.
6194 :
6195 elif test $ac_prog = install &&
6196 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6197 # program-specific install script used by HP pwplus--don't use.
6198 :
6199 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 rm -rf conftest.one conftest.two conftest.dir
6201 echo one > conftest.one
6202 echo two > conftest.two
6203 mkdir conftest.dir
6204 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6205 test -s conftest.one && test -s conftest.two &&
6206 test -s conftest.dir/conftest.one &&
6207 test -s conftest.dir/conftest.two
6208 then
6209 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6210 break 3
6211 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 fi
6213 fi
6214 done
6215 done
6216 ;;
6217esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006218
6219 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220IFS=$as_save_IFS
6221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223
6224fi
6225 if test "${ac_cv_path_install+set}" = set; then
6226 INSTALL=$ac_cv_path_install
6227 else
6228 # As a last resort, use the slow shell script. Don't cache a
6229 # value for INSTALL within a source directory, because that will
6230 # break other packages using the cache if that directory is
6231 # removed, or if the value is a relative name.
6232 INSTALL=$ac_install_sh
6233 fi
6234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6236$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
6238# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6239# It thinks the first close brace ends the variable substitution.
6240test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6241
6242test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6243
6244test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6245
Matthias Klose93a0ef12012-03-15 18:08:34 +01006246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6247$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6248if test -z "$MKDIR_P"; then
6249 if ${ac_cv_path_mkdir+:} false; then :
6250 $as_echo_n "(cached) " >&6
6251else
6252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6254do
6255 IFS=$as_save_IFS
6256 test -z "$as_dir" && as_dir=.
6257 for ac_prog in mkdir gmkdir; do
6258 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006259 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006260 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6261 'mkdir (GNU coreutils) '* | \
6262 'mkdir (coreutils) '* | \
6263 'mkdir (fileutils) '4.1*)
6264 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6265 break 3;;
6266 esac
6267 done
6268 done
6269 done
6270IFS=$as_save_IFS
6271
6272fi
6273
6274 test -d ./--version && rmdir ./--version
6275 if test "${ac_cv_path_mkdir+set}" = set; then
6276 MKDIR_P="$ac_cv_path_mkdir -p"
6277 else
6278 # As a last resort, use the slow shell script. Don't cache a
6279 # value for MKDIR_P within a source directory, because that will
6280 # break other packages using the cache if that directory is
6281 # removed, or if the value is a relative name.
6282 MKDIR_P="$ac_install_sh -d"
6283 fi
6284fi
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6286$as_echo "$MKDIR_P" >&6; }
6287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288
6289# Not every filesystem supports hard links
6290
6291if test -z "$LN" ; then
6292 case $ac_sys_system in
6293 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294 *) LN=ln;;
6295 esac
6296fi
6297
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006298# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006299
6300ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6304$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305
6306# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006307if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 withval=$with_pydebug;
6309if test "$withval" != no
6310then
6311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6315$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006317 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006318else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320fi
6321else
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324fi
6325
6326
T. Woutersddbfa2c2017-05-23 01:30:49 +02006327# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6328# the ABI. This allows enabling assertions without changing the ABI.
6329assertions='false'
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6331$as_echo_n "checking for --with-assertions... " >&6; }
6332
6333# Check whether --with-assertions was given.
6334if test "${with_assertions+set}" = set; then :
6335 withval=$with_assertions;
6336if test "$withval" != no
6337then
6338 assertions='true'
6339fi
6340fi
6341
6342if test "$assertions" = 'true'; then
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6344$as_echo "yes" >&6; }
6345elif test "$Py_DEBUG" = 'true'; then
6346 assertions='true'
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6348$as_echo "implied by --with-pydebug" >&6; }
6349else
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6351$as_echo "no" >&6; }
6352fi
6353
Brett Cannon63d98bc2016-09-06 17:12:40 -07006354# Enable optimization flags
6355
6356
6357Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6359$as_echo_n "checking for --enable-optimizations... " >&6; }
6360# Check whether --enable-optimizations was given.
6361if test "${enable_optimizations+set}" = set; then :
6362 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006363if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006364then
6365 Py_OPT='true'
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6367$as_echo "yes" >&6; };
6368else
6369 Py_OPT='false'
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; };
6372fi
6373else
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376fi
6377
6378if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006379 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6380 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006381 # 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 +00006382 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006383 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006384 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006385 DEF_MAKE_RULE="build_all"
6386else
6387 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006388 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389 DEF_MAKE_RULE="all"
6390fi
6391
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006392# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6394$as_echo_n "checking for --with-lto... " >&6; }
6395
6396# Check whether --with-lto was given.
6397if test "${with_lto+set}" = set; then :
6398 withval=$with_lto;
6399if test "$withval" != no
6400then
6401 Py_LTO='true'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
6404else
6405 Py_LTO='false'
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; };
6408fi
6409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414if test "$Py_LTO" = 'true' ; then
6415 case $CC in
6416 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006417 case $ac_sys_system in
6418 Darwin*)
6419 # Any changes made here should be reflected in the GCC+Darwin case below
6420 LTOFLAGS="-flto -Wl,-export_dynamic"
6421 ;;
6422 *)
6423 LTOFLAGS="-flto"
6424 ;;
6425 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006426 ;;
6427 *gcc*)
6428 case $ac_sys_system in
6429 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006430 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006431 ;;
6432 *)
6433 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6434 ;;
6435 esac
6436 ;;
6437 esac
Victor Stinner06fe77a2018-06-19 18:24:58 +02006438
6439 if test "$ac_cv_prog_cc_g" = "yes"
6440 then
6441 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6442 # to get debug symbols.
6443 LTOFLAGS="$LTOFLAGS -g"
6444 fi
6445
octaviansoldea4c814012017-09-08 12:14:33 -07006446 CFLAGS="$CFLAGS $LTOFLAGS"
6447 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448fi
6449
Brett Cannon7188a3e2015-09-18 15:13:44 -07006450# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006451
6452
6453
6454
6455
Gregory P. Smith799520c2016-09-07 16:10:00 -07006456# Make this work on systems where llvm tools are not installed with their
6457# normal names in the default $PATH (ie: Ubuntu). They exist under the
6458# non-suffixed name in their versioned llvm directory.
6459llvm_bin_dir=''
6460llvm_path="${PATH}"
6461if test "${CC}" = "clang"
6462then
6463 clang_bin=`which clang`
6464 # Some systems install clang elsewhere as a symlink to the real path
6465 # which is where the related llvm tools are located.
6466 if test -L "${clang_bin}"
6467 then
6468 clang_dir=`dirname "${clang_bin}"`
6469 clang_bin=`readlink "${clang_bin}"`
6470 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6471 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6472 fi
6473fi
Zachary Ware5af85642015-12-21 12:09:17 -06006474
Gregory P. Smith799520c2016-09-07 16:10:00 -07006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6476$as_echo_n "checking target system type... " >&6; }
6477if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006478 $as_echo_n "(cached) " >&6
6479else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006480 if test "x$target_alias" = x; then
6481 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006482else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6484 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6485fi
6486
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6489$as_echo "$ac_cv_target" >&6; }
6490case $ac_cv_target in
6491*-*-*) ;;
6492*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6493esac
6494target=$ac_cv_target
6495ac_save_IFS=$IFS; IFS='-'
6496set x $ac_cv_target
6497shift
6498target_cpu=$1
6499target_vendor=$2
6500shift; shift
6501# Remember, the first character of IFS is used to create $*,
6502# except with old shells:
6503target_os=$*
6504IFS=$ac_save_IFS
6505case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6506
6507
6508# The aliases save the names the user supplied, while $host etc.
6509# will get canonicalized.
6510test -n "$target_alias" &&
6511 test "$program_prefix$program_suffix$program_transform_name" = \
6512 NONENONEs,x,x, &&
6513 program_prefix=${target_alias}-
6514# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6515set dummy $target_alias-llvm-profdata; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 case $LLVM_PROFDATA in
6522 [\\/]* | ?:[\\/]*)
6523 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6524 ;;
6525 *)
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006528do
6529 IFS=$as_save_IFS
6530 test -z "$as_dir" && as_dir=.
6531 for ac_exec_ext in '' $ac_executable_extensions; do
6532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006533 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535 break 2
6536 fi
6537done
6538 done
6539IFS=$as_save_IFS
6540
Gregory P. Smith799520c2016-09-07 16:10:00 -07006541 ;;
6542esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006543fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6545if test -n "$LLVM_PROFDATA"; then
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6547$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006548else
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6555 if test "$build" = "$target"; then
6556 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6557 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6558set dummy llvm-profdata; ac_word=$2
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6560$as_echo_n "checking for $ac_word... " >&6; }
6561if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 case $ac_pt_LLVM_PROFDATA in
6565 [\\/]* | ?:[\\/]*)
6566 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6567 ;;
6568 *)
6569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6570for as_dir in ${llvm_path}
6571do
6572 IFS=$as_save_IFS
6573 test -z "$as_dir" && as_dir=.
6574 for ac_exec_ext in '' $ac_executable_extensions; do
6575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6576 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6578 break 2
6579 fi
6580done
6581 done
6582IFS=$as_save_IFS
6583
6584 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6585 ;;
6586esac
6587fi
6588ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6589if test -n "$ac_pt_LLVM_PROFDATA"; then
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6591$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6598 else
6599 LLVM_PROFDATA="''"
6600 fi
6601else
6602 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6603fi
6604
6605
6606if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6607then
6608 LLVM_PROF_FOUND="found"
6609else
6610 LLVM_PROF_FOUND="not-found"
6611fi
6612if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6613then
6614 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6615 if test -n "${found_llvm_profdata}"
6616 then
6617 # llvm-profdata isn't directly in $PATH in some cases.
6618 # https://apple.stackexchange.com/questions/197053/
6619 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6620 LLVM_PROF_FOUND=found
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6622$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6623 fi
6624fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006625LLVM_PROF_ERR=no
6626case $CC in
6627 *clang*)
6628 # Any changes made here should be reflected in the GCC+Darwin case below
6629 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6630 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006631 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6633 if test $LLVM_PROF_FOUND = not-found
6634 then
6635 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006636 if test "${REQUIRE_PGO}" = "yes"
6637 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006638 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006639 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640 fi
6641 ;;
6642 *gcc*)
6643 case $ac_sys_system in
6644 Darwin*)
6645 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6646 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650 then
6651 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652 if test "${REQUIRE_PGO}" = "yes"
6653 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006654 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006655 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656 fi
6657 ;;
6658 *)
6659 PGO_PROF_GEN_FLAG="-fprofile-generate"
6660 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6661 LLVM_PROF_MERGER="true"
6662 LLVM_PROF_FILE=""
6663 ;;
6664 esac
6665 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006666 *icc*)
6667 PGO_PROF_GEN_FLAG="-prof-gen"
6668 PGO_PROF_USE_FLAG="-prof-use"
6669 LLVM_PROF_MERGER="true"
6670 LLVM_PROF_FILE=""
6671 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672esac
6673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6675# merged with this chunk of code?
6676
6677# Optimizer/debugger flags
6678# ------------------------
6679# (The following bit of code is complicated enough - please keep things
6680# indented properly. Just pretend you're editing Python code. ;-)
6681
6682# There are two parallel sets of case statements below, one that checks to
6683# see if OPT was set and one that does BASECFLAGS setting based upon
6684# compiler and platform. BASECFLAGS tweaks need to be made even if the
6685# user set OPT.
6686
6687# tweak OPT based on compiler and platform, only if the user didn't set
6688# it on the command line
6689
Victor Stinner9ed34a82017-05-02 22:35:58 +02006690
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006691if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692then
6693 case $GCC in
6694 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6696 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6697 WRAP="-fwrapv"
6698 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006699
Stefan Krahaf04ff22011-12-08 22:20:31 +01006700 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006701 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006702 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006703 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006704 *)
6705 if $CC --version 2>&1 | grep -q clang
6706 then
6707 cc_is_clang=1
6708 else
6709 cc_is_clang=
6710 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006711 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006712
Victor Stinner35f3d242017-04-21 12:35:24 +02006713 if test -n "${cc_is_clang}"
6714 then
6715 # Clang also needs -fwrapv
6716 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006717 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6718 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006719 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006720 fi
6721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722 case $ac_cv_prog_cc_g in
6723 yes)
6724 if test "$Py_DEBUG" = 'true' ; then
6725 # Optimization messes up debuggers, so turn it off for
6726 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006727 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006728 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006729 else
Victor Stinner28205b22017-04-21 11:24:34 +02006730 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006731 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 else
Victor Stinner28205b22017-04-21 11:24:34 +02006733 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734 fi
6735 ;;
6736 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006737 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 ;;
6739 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 case $ac_sys_system in
6742 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6743 ;;
6744 esac
6745 ;;
6746
6747 *)
6748 OPT="-O"
6749 ;;
6750 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751fi
6752
6753
6754
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756# The -arch flags for universal builds on OSX
6757UNIVERSAL_ARCH_FLAGS=
6758
6759
6760# tweak BASECFLAGS based on compiler and platform
6761case $GCC in
6762yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006763 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006764
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6766$as_echo_n "checking for -Wextra... " >&6; }
6767 ac_save_cc="$CC"
6768 CC="$CC -Wextra -Werror"
6769 if ${ac_cv_extra_warnings+:} false; then :
6770 $as_echo_n "(cached) " >&6
6771else
6772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6773/* end confdefs.h. */
6774
6775
6776int
6777main ()
6778{
6779
6780 ;
6781 return 0;
6782}
6783
6784_ACEOF
6785if ac_fn_c_try_compile "$LINENO"; then :
6786
6787 ac_cv_extra_warnings=yes
6788
6789else
6790
6791 ac_cv_extra_warnings=no
6792
6793fi
6794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6795fi
6796
6797 CC="$ac_save_cc"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6799$as_echo "$ac_cv_extra_warnings" >&6; }
6800
6801 if test $ac_cv_extra_warnings = yes
6802 then
6803 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6804 fi
6805
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806 # Python doesn't violate C99 aliasing rules, but older versions of
6807 # GCC produce warnings for legal Python code. Enable
6808 # -fno-strict-aliasing on versions of GCC that support but produce
6809 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6811$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812 ac_save_cc="$CC"
6813 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006814 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006815 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006820
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006822int
6823main ()
6824{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006825
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006826 ;
6827 return 0;
6828}
Matthias Kloseb159a552010-04-25 21:00:44 +00006829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006831if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006832
6833 CC="$ac_save_cc -fstrict-aliasing"
6834 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006836/* end confdefs.h. */
6837
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006838 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006839int
6840main ()
6841{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006842double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006843 ;
6844 return 0;
6845}
Matthias Kloseb159a552010-04-25 21:00:44 +00006846
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006848if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006849
6850 ac_cv_no_strict_aliasing=no
6851
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852else
Matthias Kloseb159a552010-04-25 21:00:44 +00006853
6854 ac_cv_no_strict_aliasing=yes
6855
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006858
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859else
Matthias Kloseb159a552010-04-25 21:00:44 +00006860
6861 ac_cv_no_strict_aliasing=no
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006865fi
6866
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006867 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6870$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006871 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 then
6873 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6874 fi
6875
Zachary Ware5af85642015-12-21 12:09:17 -06006876 # ICC doesn't recognize the option, but only emits a warning
6877 ## XXX does it emit an unused result warning and can it be disabled?
6878 case "$CC" in
6879 *icc*)
6880 ac_cv_disable_unused_result_warning=no
6881 ;;
6882 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6884$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6885 ac_save_cc="$CC"
6886 CC="$CC -Wunused-result -Werror"
6887 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006888 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006889 $as_echo_n "(cached) " >&6
6890else
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892/* end confdefs.h. */
6893
6894
6895int
6896main ()
6897{
6898
6899 ;
6900 return 0;
6901}
6902
6903_ACEOF
6904if ac_fn_c_try_compile "$LINENO"; then :
6905
6906 ac_cv_disable_unused_result_warning=yes
6907
6908else
6909
6910 ac_cv_disable_unused_result_warning=no
6911
6912fi
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914fi
6915
6916 CFLAGS="$save_CFLAGS"
6917 CC="$ac_save_cc"
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6919$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006920 ;;
6921 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006922
6923 if test $ac_cv_disable_unused_result_warning = yes
6924 then
6925 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006926 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6927 fi
6928
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6930$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6931 ac_save_cc="$CC"
6932 CC="$CC -Wunused-parameter -Werror"
6933 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938
6939
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
6947
6948_ACEOF
6949if ac_fn_c_try_compile "$LINENO"; then :
6950
6951 ac_cv_disable_unused_parameter_warning=yes
6952
6953else
6954
6955 ac_cv_disable_unused_parameter_warning=no
6956
6957fi
6958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6959fi
6960
6961 CC="$ac_save_cc"
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6963$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6964
6965 if test $ac_cv_disable_unused_parameter_warning = yes
6966 then
6967 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6968 fi
6969
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6971$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6972 ac_save_cc="$CC"
6973 CC="$CC -Wmissing-field-initializers -Werror"
6974 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6975 $as_echo_n "(cached) " >&6
6976else
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6978/* end confdefs.h. */
6979
6980
6981int
6982main ()
6983{
6984
6985 ;
6986 return 0;
6987}
6988
6989_ACEOF
6990if ac_fn_c_try_compile "$LINENO"; then :
6991
6992 ac_cv_disable_missing_field_initializers=yes
6993
6994else
6995
6996 ac_cv_disable_missing_field_initializers=no
6997
6998fi
6999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7000fi
7001
7002 CC="$ac_save_cc"
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7004$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7005
7006 if test $ac_cv_disable_missing_field_initializers = yes
7007 then
7008 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007009 fi
7010
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7012$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7013 ac_save_cc="$CC"
7014 CC="$CC -Wsign-compare"
7015 save_CFLAGS="$CFLAGS"
7016 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7017 $as_echo_n "(cached) " >&6
7018else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020/* end confdefs.h. */
7021
7022
7023int
7024main ()
7025{
7026
7027 ;
7028 return 0;
7029}
7030
7031_ACEOF
7032if ac_fn_c_try_compile "$LINENO"; then :
7033
7034 ac_cv_enable_sign_compare_warning=yes
7035
7036else
7037
7038 ac_cv_enable_sign_compare_warning=no
7039
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042fi
7043
7044 CFLAGS="$save_CFLAGS"
7045 CC="$ac_save_cc"
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7047$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7048
7049 if test $ac_cv_enable_sign_compare_warning = yes
7050 then
7051 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7052 fi
7053
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7055$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7056 ac_save_cc="$CC"
7057 CC="$CC -Wunreachable-code"
7058 save_CFLAGS="$CFLAGS"
7059 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061else
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064
7065
7066int
7067main ()
7068{
7069
7070 ;
7071 return 0;
7072}
7073
7074_ACEOF
7075if ac_fn_c_try_compile "$LINENO"; then :
7076
7077 ac_cv_enable_unreachable_code_warning=yes
7078
7079else
7080
7081 ac_cv_enable_unreachable_code_warning=no
7082
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085fi
7086
7087 CFLAGS="$save_CFLAGS"
7088 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007089
7090 # Don't enable unreachable code warning in debug mode, since it usually
7091 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007092 # Issue #24324: Unfortunately, the unreachable code warning does not work
7093 # correctly on gcc and has been silently removed from the compiler.
7094 # It is supported on clang but on OS X systems gcc may be an alias
7095 # for clang. Try to determine if the compiler is not really gcc and,
7096 # if so, only then enable the warning.
7097 if test $ac_cv_enable_unreachable_code_warning = yes && \
7098 test "$Py_DEBUG" != "true" && \
7099 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007100 then
7101 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007102 else
7103 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007104 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7106$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007107
INADA Naokie3364842018-06-05 20:40:53 +09007108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7109$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7110 ac_save_cc="$CC"
7111 CC="$CC -Werror -Wstrict-prototypes"
7112 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114else
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116/* end confdefs.h. */
7117
7118
7119int
7120main ()
7121{
7122
7123 ;
7124 return 0;
7125}
7126
7127_ACEOF
7128if ac_fn_c_try_compile "$LINENO"; then :
7129
7130 ac_cv_enable_strict_prototypes_warning=yes
7131
7132else
7133
7134 ac_cv_enable_strict_prototypes_warning=no
7135
7136fi
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138fi
7139
7140 CC="$ac_save_cc"
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7142$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7143
7144 if test $ac_cv_enable_strict_prototypes_warning = yes
7145 then
7146 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7147 fi
7148
Victor Stinner193ee0a2017-02-06 14:24:00 +01007149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7150$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7151 ac_save_cc="$CC"
7152 CC="$CC -Werror=implicit-function-declaration"
7153 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158
7159
7160int
7161main ()
7162{
7163
7164 ;
7165 return 0;
7166}
7167
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 ac_cv_enable_implicit_function_declaration_error=yes
7172
7173else
7174
7175 ac_cv_enable_implicit_function_declaration_error=no
7176
7177fi
7178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179fi
7180
7181 CC="$ac_save_cc"
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7183$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7184
7185 if test $ac_cv_enable_implicit_function_declaration_error = yes
7186 then
7187 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7188 fi
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7191 # support. Without this, treatment of subnormals doesn't follow
7192 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007193 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194 alpha*)
7195 BASECFLAGS="$BASECFLAGS -mieee"
7196 ;;
7197 esac
7198
7199 case $ac_sys_system in
7200 SCO_SV*)
7201 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7202 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007203
Ned Deily87adb6e2013-10-18 21:09:56 -07007204 Darwin*)
7205 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7206 # used to be here, but non-Apple gcc doesn't accept them.
7207 if test "${CC}" = gcc
7208 then
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007210$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007211 case "${UNIVERSALSDK}" in
7212 */MacOSX10.4u.sdk)
7213 # Build using 10.4 SDK, force usage of gcc when the
7214 # compiler is gcc, otherwise the user will get very
7215 # confusing error messages when building on OSX 10.6
7216 CC=gcc-4.0
7217 CPP=cpp-4.0
7218 ;;
7219 esac
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007221$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007222 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223
Ned Deily87adb6e2013-10-18 21:09:56 -07007224 if test "${enable_universalsdk}"
7225 then
7226 case "$UNIVERSAL_ARCHS" in
7227 32-bit)
7228 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7229 LIPO_32BIT_FLAGS=""
7230 ARCH_RUN_32BIT=""
7231 ;;
7232 64-bit)
7233 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7234 LIPO_32BIT_FLAGS=""
7235 ARCH_RUN_32BIT="true"
7236 ;;
7237 all)
7238 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7239 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7240 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7241 ;;
7242 intel)
7243 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7244 LIPO_32BIT_FLAGS="-extract i386"
7245 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7246 ;;
7247 intel-32)
7248 UNIVERSAL_ARCH_FLAGS="-arch i386"
7249 LIPO_32BIT_FLAGS=""
7250 ARCH_RUN_32BIT=""
7251 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007252 intel-64)
7253 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7254 LIPO_32BIT_FLAGS=""
7255 ARCH_RUN_32BIT="true"
7256 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007257 3-way)
7258 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7259 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7260 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7261 ;;
7262 *)
7263 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7264 ;;
7265 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 if test "${UNIVERSALSDK}" != "/"
7268 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007269 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7270 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007271 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007272 else
7273 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7274 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007275 fi
7276 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277
Ned Deily87adb6e2013-10-18 21:09:56 -07007278 # Calculate an appropriate deployment target for this build:
7279 # The deployment target value is used explicitly to enable certain
7280 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007281 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007282 # component of the string returned by distutils.get_platform().
7283 #
7284 # Use the value from:
7285 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7286 # 2. the operating system version of the build machine if >= 10.6
7287 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7288 # below to pick either 10.3, 10.4, or 10.5 as the target.
7289 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7292$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007293 cur_target_major=`sw_vers -productVersion | \
7294 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7295 cur_target_minor=`sw_vers -productVersion | \
7296 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7297 cur_target="${cur_target_major}.${cur_target_minor}"
7298 if test ${cur_target_major} -eq 10 && \
7299 test ${cur_target_minor} -ge 3 && \
7300 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 then
Ned Deily36820b62014-06-25 13:44:22 -07007302 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007303 cur_target=10.3
7304 if test ${enable_universalsdk}
7305 then
7306 case "$UNIVERSAL_ARCHS" in
7307 all|3-way|intel|64-bit)
7308 # These configurations were first supported in 10.5
7309 cur_target='10.5'
7310 ;;
7311 esac
7312 else
7313 if test `/usr/bin/arch` = "i386"
7314 then
7315 # 10.4 was the first release to support Intel archs
7316 cur_target="10.4"
7317 fi
7318 fi
7319 fi
7320 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007321
Ned Deily87adb6e2013-10-18 21:09:56 -07007322 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7323 # environment with a value that is the same as what we'll use
7324 # in the Makefile to ensure that we'll get the same compiler
7325 # environment during configure and build time.
7326 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7327 export MACOSX_DEPLOYMENT_TARGET
7328 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7330$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007331
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 # end of Darwin* tests
7333 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334 esac
7335 ;;
7336
7337*)
7338 case $ac_sys_system in
7339 OpenUNIX*|UnixWare*)
7340 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7341 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342 SCO_SV*)
7343 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7344 ;;
7345 esac
7346 ;;
7347esac
7348
Zachary Ware5af85642015-12-21 12:09:17 -06007349# ICC needs -fp-model strict or floats behave badly
7350case "$CC" in
7351*icc*)
7352 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7353 ;;
7354esac
7355
T. Woutersddbfa2c2017-05-23 01:30:49 +02007356if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007357 :
7358else
7359 OPT="-DNDEBUG $OPT"
7360fi
7361
7362if test "$ac_arch_flags"
7363then
7364 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7365fi
7366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367# On some compilers, pthreads are available without further options
7368# (e.g. MacOS X). On some of these systems, the compiler will not
7369# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7370# So we have to see first whether pthreads are available without
7371# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7373$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007374if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378 ac_cv_pthread_is_default=no
7379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381/* end confdefs.h. */
7382
Stefan Krah7dba5942012-11-22 22:49:11 +01007383#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384#include <pthread.h>
7385
7386void* routine(void* p){return NULL;}
7387
7388int main(){
7389 pthread_t p;
7390 if(pthread_create(&p,NULL,routine,NULL)!=0)
7391 return 1;
7392 (void)pthread_detach(p);
7393 return 0;
7394}
7395
7396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007397if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
7399 ac_cv_pthread_is_default=yes
7400 ac_cv_kthread=no
7401 ac_cv_pthread=no
7402
7403else
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408fi
7409
7410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411fi
7412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7414$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415
7416
7417if test $ac_cv_pthread_is_default = yes
7418then
7419 ac_cv_kpthread=no
7420else
7421# -Kpthread, if available, provides the right #defines
7422# and linker options to make pthread_create available
7423# Some compilers won't report that they do not support -Kpthread,
7424# so we need to run a program to see whether it really made the
7425# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7427$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007428if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430else
7431 ac_save_cc="$CC"
7432CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007433if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434 ac_cv_kpthread=no
7435else
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437/* end confdefs.h. */
7438
Stefan Krah7dba5942012-11-22 22:49:11 +01007439#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440#include <pthread.h>
7441
7442void* routine(void* p){return NULL;}
7443
7444int main(){
7445 pthread_t p;
7446 if(pthread_create(&p,NULL,routine,NULL)!=0)
7447 return 1;
7448 (void)pthread_detach(p);
7449 return 0;
7450}
7451
7452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007453if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 ac_cv_kpthread=yes
7455else
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460fi
7461
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462CC="$ac_save_cc"
7463fi
7464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7466$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
7468
7469if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7470then
7471# -Kthread, if available, provides the right #defines
7472# and linker options to make pthread_create available
7473# Some compilers won't report that they do not support -Kthread,
7474# so we need to run a program to see whether it really made the
7475# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7477$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
7481 ac_save_cc="$CC"
7482CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007483if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 ac_cv_kthread=no
7485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487/* end confdefs.h. */
7488
Stefan Krah7dba5942012-11-22 22:49:11 +01007489#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490#include <pthread.h>
7491
7492void* routine(void* p){return NULL;}
7493
7494int main(){
7495 pthread_t p;
7496 if(pthread_create(&p,NULL,routine,NULL)!=0)
7497 return 1;
7498 (void)pthread_detach(p);
7499 return 0;
7500}
7501
7502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007503if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 ac_cv_kthread=yes
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510fi
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512CC="$ac_save_cc"
7513fi
7514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7516$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
7519if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7520then
7521# -pthread, if available, provides the right #defines
7522# and linker options to make pthread_create available
7523# Some compilers won't report that they do not support -pthread,
7524# so we need to run a program to see whether it really made the
7525# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7527$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007528if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530else
7531 ac_save_cc="$CC"
7532CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007533if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 ac_cv_pthread=no
7535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537/* end confdefs.h. */
7538
Stefan Krah7dba5942012-11-22 22:49:11 +01007539#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540#include <pthread.h>
7541
7542void* routine(void* p){return NULL;}
7543
7544int main(){
7545 pthread_t p;
7546 if(pthread_create(&p,NULL,routine,NULL)!=0)
7547 return 1;
7548 (void)pthread_detach(p);
7549 return 0;
7550}
7551
7552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554 ac_cv_pthread=yes
7555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562CC="$ac_save_cc"
7563fi
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7566$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568
7569# If we have set a CC compiler flag for thread support then
7570# check if it works for CXX, too.
7571ac_cv_cxx_thread=no
7572if test ! -z "$CXX"
7573then
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7575$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576ac_save_cxx="$CXX"
7577
7578if test "$ac_cv_kpthread" = "yes"
7579then
7580 CXX="$CXX -Kpthread"
7581 ac_cv_cxx_thread=yes
7582elif test "$ac_cv_kthread" = "yes"
7583then
7584 CXX="$CXX -Kthread"
7585 ac_cv_cxx_thread=yes
7586elif test "$ac_cv_pthread" = "yes"
7587then
7588 CXX="$CXX -pthread"
7589 ac_cv_cxx_thread=yes
7590fi
7591
7592if test $ac_cv_cxx_thread = yes
7593then
7594 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7595 $CXX -c conftest.$ac_ext 2>&5
7596 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7597 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7598 then
7599 ac_cv_cxx_thread=yes
7600 else
7601 ac_cv_cxx_thread=no
7602 fi
7603 rm -fr conftest*
7604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7606$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
7608CXX="$ac_save_cxx"
7609
7610
7611# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7613$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007614if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616else
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618/* end confdefs.h. */
7619#include <stdlib.h>
7620#include <stdarg.h>
7621#include <string.h>
7622#include <float.h>
7623
7624int
7625main ()
7626{
7627
7628 ;
7629 return 0;
7630}
7631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007632if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633 ac_cv_header_stdc=yes
7634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7638
7639if test $ac_cv_header_stdc = yes; then
7640 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642/* end confdefs.h. */
7643#include <string.h>
7644
7645_ACEOF
7646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 $EGREP "memchr" >/dev/null 2>&1; then :
7648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649else
7650 ac_cv_header_stdc=no
7651fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007652rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653
7654fi
7655
7656if test $ac_cv_header_stdc = yes; then
7657 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659/* end confdefs.h. */
7660#include <stdlib.h>
7661
7662_ACEOF
7663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 $EGREP "free" >/dev/null 2>&1; then :
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666else
7667 ac_cv_header_stdc=no
7668fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007669rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670
7671fi
7672
7673if test $ac_cv_header_stdc = yes; then
7674 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 :
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679/* end confdefs.h. */
7680#include <ctype.h>
7681#include <stdlib.h>
7682#if ((' ' & 0x0FF) == 0x020)
7683# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7684# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7685#else
7686# define ISLOWER(c) \
7687 (('a' <= (c) && (c) <= 'i') \
7688 || ('j' <= (c) && (c) <= 'r') \
7689 || ('s' <= (c) && (c) <= 'z'))
7690# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7691#endif
7692
7693#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7694int
7695main ()
7696{
7697 int i;
7698 for (i = 0; i < 256; i++)
7699 if (XOR (islower (i), ISLOWER (i))
7700 || toupper (i) != TOUPPER (i))
7701 return 2;
7702 return 0;
7703}
7704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007705if ac_fn_c_try_run "$LINENO"; then :
7706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
7715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7717$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718if test $ac_cv_header_stdc = yes; then
7719
Matthias Kloseb9621712010-04-24 17:59:49 +00007720$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721
7722fi
7723
stratakise768c862018-01-23 16:11:24 +01007724for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007725fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007726ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007727sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007728utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007729poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007730sys/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 +01007731sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007732sys/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 +01007733sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007734sys/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 -07007735libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007736linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007737sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007738do :
7739 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7740ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007741if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007743#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744_ACEOF
7745
7746fi
7747
Guido van Rossum627b2d71993-12-24 10:39:16 +00007748done
7749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007751for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7754$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760#include <sys/types.h>
7761#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763int
7764main ()
7765{
7766if ((DIR *) 0)
7767return 0;
7768 ;
7769 return 0;
7770}
7771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779eval ac_res=\$$as_ac_Header
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7781$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007782if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007784#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
7786
7787ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007789
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790done
7791# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7792if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7794$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007795if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797else
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802/* Override any GCC internal prototype to avoid an error.
7803 Use char because int might match the return type of a GCC
7804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805#ifdef __cplusplus
7806extern "C"
7807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007808char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007809int
7810main ()
7811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ;
7814 return 0;
7815}
7816_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817for ac_lib in '' dir; do
7818 if test -z "$ac_lib"; then
7819 ac_res="none required"
7820 else
7821 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827rm -f core conftest.err conftest.$ac_objext \
7828 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007829 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832done
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835else
7836 ac_cv_search_opendir=no
7837fi
7838rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007839LIBS=$ac_func_search_save_LIBS
7840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7842$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
Michael W. Hudson54241132001-12-07 15:38:26 +00007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7851$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007854else
7855 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859/* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007862#ifdef __cplusplus
7863extern "C"
7864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007865char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007866int
7867main ()
7868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ;
7871 return 0;
7872}
7873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874for ac_lib in '' x; do
7875 if test -z "$ac_lib"; then
7876 ac_res="none required"
7877 else
7878 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884rm -f core conftest.err conftest.$ac_objext \
7885 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007886 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889done
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892else
7893 ac_cv_search_opendir=no
7894fi
7895rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_func_search_save_LIBS
7897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7899$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007901if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
7905
7906fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7909$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007910if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007914/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007915#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007916int
7917main ()
7918{
7919return makedev(0, 0);
7920 ;
7921 return 0;
7922}
7923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007925 ac_cv_header_sys_types_h_makedev=yes
7926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929rm -f core conftest.err conftest.$ac_objext \
7930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007931
7932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7934$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007935
7936if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007937ac_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 +02007938if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007939
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007941
7942fi
7943
7944
7945
7946 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 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 +02007948if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007949
Matthias Kloseb9621712010-04-24 17:59:49 +00007950$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007951
7952fi
7953
7954
7955 fi
7956fi
7957
Michael W. Hudson54241132001-12-07 15:38:26 +00007958
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007959# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7960# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7961SAVE_CFLAGS=$CFLAGS
7962CFLAGS="-std=c99 $CFLAGS"
7963for ac_header in bluetooth/bluetooth.h
7964do :
7965 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7966if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7967 cat >>confdefs.h <<_ACEOF
7968#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7969_ACEOF
7970
7971fi
7972
7973done
7974
7975CFLAGS=$SAVE_CFLAGS
7976
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007977# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7978for ac_header in net/if.h
7979do :
7980 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7981#ifdef STDC_HEADERS
7982# include <stdlib.h>
7983# include <stddef.h>
7984#else
7985# ifdef HAVE_STDLIB_H
7986# include <stdlib.h>
7987# endif
7988#endif
7989#ifdef HAVE_SYS_SOCKET_H
7990# include <sys/socket.h>
7991#endif
7992
7993"
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007995 cat >>confdefs.h <<_ACEOF
7996#define HAVE_NET_IF_H 1
7997_ACEOF
7998
7999fi
8000
8001done
8002
8003
Martin v. Löwis11017b12006-01-14 18:12:57 +00008004# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008005for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008006do :
8007 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 +00008008#ifdef HAVE_ASM_TYPES_H
8009#include <asm/types.h>
8010#endif
8011#ifdef HAVE_SYS_SOCKET_H
8012#include <sys/socket.h>
8013#endif
8014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015"
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008017 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008019_ACEOF
8020
8021fi
8022
8023done
8024
8025
caaveryeffc12f2017-09-06 18:18:10 -04008026for ac_header in linux/vm_sockets.h
8027do :
8028 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8029#ifdef HAVE_SYS_SOCKET_H
8030#include <sys/socket.h>
8031#endif
8032
8033"
8034if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8035 cat >>confdefs.h <<_ACEOF
8036#define HAVE_LINUX_VM_SOCKETS_H 1
8037_ACEOF
8038
8039fi
8040
8041done
8042
8043
Charles-François Natali47413c12011-10-06 19:47:44 +02008044# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008045for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008046do :
8047 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8048ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8049#ifdef HAVE_SYS_SOCKET_H
8050#include <sys/socket.h>
8051#endif
8052
8053"
8054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8055 cat >>confdefs.h <<_ACEOF
8056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8057_ACEOF
8058
8059fi
8060
8061done
8062
8063
Guido van Rossum627b2d71993-12-24 10:39:16 +00008064# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008065was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8067$as_echo_n "checking for clock_t in time.h... " >&6; }
8068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008069/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008070#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
8072_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008075 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008076else
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
8078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008080
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008081
Guido van Rossum627b2d71993-12-24 10:39:16 +00008082fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008083rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8086$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8089$as_echo_n "checking for makedev... " >&6; }
8090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008092
Jesus Cea740f53a2010-04-28 11:35:30 +00008093#if defined(MAJOR_IN_MKDEV)
8094#include <sys/mkdev.h>
8095#elif defined(MAJOR_IN_SYSMACROS)
8096#include <sys/sysmacros.h>
8097#else
8098#include <sys/types.h>
8099#endif
8100
Neal Norwitz11690112002-07-30 01:08:28 +00008101int
8102main ()
8103{
Jesus Cea740f53a2010-04-28 11:35:30 +00008104
8105 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008106 ;
8107 return 0;
8108}
Matthias Kloseb159a552010-04-25 21:00:44 +00008109
Neal Norwitz11690112002-07-30 01:08:28 +00008110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008111if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008112 ac_cv_has_makedev=yes
8113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116rm -f core conftest.err conftest.$ac_objext \
8117 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8119$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008120if test "$ac_cv_has_makedev" = "yes"; then
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008123
8124fi
8125
Christian Heimes985ecdc2013-11-20 11:46:18 +01008126# byte swapping
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8128$as_echo_n "checking for le64toh... " >&6; }
8129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8130/* end confdefs.h. */
8131
8132#ifdef HAVE_ENDIAN_H
8133#include <endian.h>
8134#elif defined(HAVE_SYS_ENDIAN_H)
8135#include <sys/endian.h>
8136#endif
8137
8138int
8139main ()
8140{
8141
8142 le64toh(1)
8143 ;
8144 return 0;
8145}
8146
8147_ACEOF
8148if ac_fn_c_try_link "$LINENO"; then :
8149 ac_cv_has_le64toh=yes
8150else
8151 ac_cv_has_le64toh=no
8152fi
8153rm -f core conftest.err conftest.$ac_objext \
8154 conftest$ac_exeext conftest.$ac_ext
8155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8156$as_echo "$ac_cv_has_le64toh" >&6; }
8157if test "$ac_cv_has_le64toh" = "yes"; then
8158
8159$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8160
8161fi
8162
Martin v. Löwis399a6892002-10-04 10:22:02 +00008163use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008164# Don't use largefile support for GNU/Hurd
8165case $ac_sys_system in GNU*)
8166 use_lfs=no
8167esac
8168
Martin v. Löwis399a6892002-10-04 10:22:02 +00008169if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008170# Two defines needed to enable largefile support on various platforms
8171# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008172case $ac_sys_system/$ac_sys_release in
8173AIX*)
8174
8175$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8176
8177 ;;
8178esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008179
Matthias Kloseb9621712010-04-24 17:59:49 +00008180$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008181
8182
Matthias Kloseb9621712010-04-24 17:59:49 +00008183$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008184
Martin v. Löwis399a6892002-10-04 10:22:02 +00008185fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008186
Guido van Rossum84e7b241996-08-19 21:59:00 +00008187# Add some code to confdefs.h so that the test for off_t works on SCO
8188cat >> confdefs.h <<\EOF
8189#if defined(SCO_DS)
8190#undef _OFF_T
8191#endif
8192EOF
8193
Guido van Rossumef2255b2000-03-10 22:30:29 +00008194# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008195ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008196if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008198else
Martin v. Löwis11437992002-04-12 09:54:03 +00008199
8200cat >>confdefs.h <<_ACEOF
8201#define mode_t int
8202_ACEOF
8203
8204fi
8205
Matthias Kloseb9621712010-04-24 17:59:49 +00008206ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008207if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008209else
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
8211cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008213_ACEOF
8214
8215fi
8216
Matthias Kloseb9621712010-04-24 17:59:49 +00008217ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220else
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222cat >>confdefs.h <<_ACEOF
8223#define pid_t int
8224_ACEOF
8225
8226fi
8227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008230#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008231_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236else
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008240_ACEOF
8241
8242fi
8243
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8245$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008246if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008250/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008251#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008252
8253_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008256 ac_cv_type_uid_t=yes
8257else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008258 ac_cv_type_uid_t=no
8259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008260rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8264$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008265if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008266
Matthias Kloseb9621712010-04-24 17:59:49 +00008267$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008271
8272fi
8273
Mark Dickinson983bc162012-12-02 12:11:38 +00008274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277
Matthias Kloseb9621712010-04-24 17:59:49 +00008278$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008279
8280fi
8281
Stefan Krah1919b7e2012-03-21 18:25:23 +01008282ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8283if test "x$ac_cv_type___uint128_t" = xyes; then :
8284
8285$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8286
8287fi
8288
Jack Jansendd19cf82001-12-06 22:36:17 +00008289
Michael W. Hudson54241132001-12-07 15:38:26 +00008290# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008291# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292# The cast to long int works around a bug in the HP C Compiler
8293# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8294# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8295# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8297$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008298if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008300else
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 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 +00008302
Martin v. Löwis11437992002-04-12 09:54:03 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 if test "$ac_cv_type_int" = yes; then
8305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008307as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008308See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309 else
8310 ac_cv_sizeof_int=0
8311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8316$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317
8318
8319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008322_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323
8324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325# The cast to long int works around a bug in the HP C Compiler
8326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8328# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8330$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008331if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008333else
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 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 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 if test "$ac_cv_type_long" = yes; then
8338 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008340as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008341See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342 else
8343 ac_cv_sizeof_long=0
8344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8349$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008350
8351
8352
Martin v. Löwis11437992002-04-12 09:54:03 +00008353cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008354#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008355_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008356
8357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358# The cast to long int works around a bug in the HP C Compiler
8359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8361# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8363$as_echo_n "checking size of long long... " >&6; }
8364if ${ac_cv_sizeof_long_long+:} false; then :
8365 $as_echo_n "(cached) " >&6
8366else
8367 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8368
8369else
8370 if test "$ac_cv_type_long_long" = yes; then
8371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8373as_fn_error 77 "cannot compute sizeof (long long)
8374See \`config.log' for more details" "$LINENO" 5; }
8375 else
8376 ac_cv_sizeof_long_long=0
8377 fi
8378fi
8379
8380fi
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8382$as_echo "$ac_cv_sizeof_long_long" >&6; }
8383
8384
8385
8386cat >>confdefs.h <<_ACEOF
8387#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8388_ACEOF
8389
8390
8391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8396$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 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 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 if test "$ac_cv_type_void_p" = yes; then
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008406as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 else
8409 ac_cv_sizeof_void_p=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8415$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008420#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008422
8423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424# The cast to long int works around a bug in the HP C Compiler
8425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8427# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8429$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008430if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 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 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 if test "$ac_cv_type_short" = yes; then
8437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008439as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008440See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441 else
8442 ac_cv_sizeof_short=0
8443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8448$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449
8450
8451
Martin v. Löwis11437992002-04-12 09:54:03 +00008452cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008453#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008455
8456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457# The cast to long int works around a bug in the HP C Compiler
8458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8462$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 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 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 if test "$ac_cv_type_float" = yes; then
8470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008472as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 else
8475 ac_cv_sizeof_float=0
8476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8481$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
8483
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008486#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008488
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8495$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_double" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_double=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8514$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008519#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8528$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_fpos_t" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_fpos_t=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8547$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008552#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008554
Michael W. Hudson54241132001-12-07 15:38:26 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8561$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Martin v. Löwis18e16552006-02-15 17:27:45 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_size_t" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_size_t=0
8575 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Martin v. Löwis18e16552006-02-15 17:27:45 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8580$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582
8583
Martin v. Löwis18e16552006-02-15 17:27:45 +00008584cat >>confdefs.h <<_ACEOF
8585#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8586_ACEOF
8587
8588
Christian Heimes400adb02008-02-01 08:12:03 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8594$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Christian Heimes400adb02008-02-01 08:12:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_pid_t" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008606 else
8607 ac_cv_sizeof_pid_t=0
8608 fi
8609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Christian Heimes400adb02008-02-01 08:12:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8613$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008614
8615
8616
8617cat >>confdefs.h <<_ACEOF
8618#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8619_ACEOF
8620
8621
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
8626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8627$as_echo_n "checking size of uintptr_t... " >&6; }
8628if ${ac_cv_sizeof_uintptr_t+:} false; then :
8629 $as_echo_n "(cached) " >&6
8630else
8631 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8632
8633else
8634 if test "$ac_cv_type_uintptr_t" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8637as_fn_error 77 "cannot compute sizeof (uintptr_t)
8638See \`config.log' for more details" "$LINENO" 5; }
8639 else
8640 ac_cv_sizeof_uintptr_t=0
8641 fi
8642fi
8643
8644fi
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8646$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8647
8648
8649
8650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8652_ACEOF
8653
8654
Michael W. Hudson54241132001-12-07 15:38:26 +00008655
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008656
Eitan Adler3055c942018-05-15 22:58:09 -07008657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8658$as_echo_n "checking for long double... " >&6; }
8659if ${ac_cv_type_long_double+:} false; then :
8660 $as_echo_n "(cached) " >&6
8661else
8662 if test "$GCC" = yes; then
8663 ac_cv_type_long_double=yes
8664 else
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666/* end confdefs.h. */
8667/* The Stardent Vistra knows sizeof (long double), but does
8668 not support it. */
8669 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008670int
8671main ()
8672{
Eitan Adler3055c942018-05-15 22:58:09 -07008673static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8674 sizeof (double) <= sizeof (long double))];
8675test_array [0] = 0;
8676return test_array [0];
8677
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008678 ;
8679 return 0;
8680}
8681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008682if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008683 ac_cv_type_long_double=yes
8684else
8685 ac_cv_type_long_double=no
8686fi
8687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8688 fi
8689fi
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8691$as_echo "$ac_cv_type_long_double" >&6; }
8692 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008693
Matthias Kloseb9621712010-04-24 17:59:49 +00008694$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008695
Eitan Adler3055c942018-05-15 22:58:09 -07008696 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008697
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8703$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 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 +00008708
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if test "$ac_cv_type_long_double" = yes; then
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008713as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008714See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008715 else
8716 ac_cv_sizeof_long_double=0
8717 fi
8718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8722$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008723
8724
8725
8726cat >>confdefs.h <<_ACEOF
8727#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8728_ACEOF
8729
8730
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8737$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Thomas Woutersb2137042007-02-01 18:02:27 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type__Bool" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 else
8750 ac_cv_sizeof__Bool=0
8751 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Thomas Woutersb2137042007-02-01 18:02:27 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8756$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757
8758
8759
Thomas Woutersb2137042007-02-01 18:02:27 +00008760cat >>confdefs.h <<_ACEOF
8761#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8762_ACEOF
8763
8764
Thomas Woutersb2137042007-02-01 18:02:27 +00008765
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008766# The cast to long int works around a bug in the HP C Compiler
8767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8769# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8771$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008772if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776#ifdef HAVE_SYS_TYPES_H
8777#include <sys/types.h>
8778#endif
8779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if test "$ac_cv_type_off_t" = yes; then
8784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008786as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008787See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788 else
8789 ac_cv_sizeof_off_t=0
8790 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8795$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008797
8798
Martin v. Löwis11437992002-04-12 09:54:03 +00008799cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008800#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008801_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008802
Michael W. Hudson54241132001-12-07 15:38:26 +00008803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8806$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008807if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008808 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008809
Matthias Kloseb9621712010-04-24 17:59:49 +00008810$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8813$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008817fi
8818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819# The cast to long int works around a bug in the HP C Compiler
8820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8824$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008825if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827else
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829#ifdef HAVE_SYS_TYPES_H
8830#include <sys/types.h>
8831#endif
8832#ifdef HAVE_TIME_H
8833#include <time.h>
8834#endif
8835
Matthias Kloseb9621712010-04-24 17:59:49 +00008836"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 if test "$ac_cv_type_time_t" = yes; then
8840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008842as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008843See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844 else
8845 ac_cv_sizeof_time_t=0
8846 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8851$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853
8854
Martin v. Löwis11437992002-04-12 09:54:03 +00008855cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008856#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008857_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008858
Michael W. Hudson54241132001-12-07 15:38:26 +00008859
8860
Trent Mick635f6fb2000-08-23 21:33:05 +00008861# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008862ac_save_cc="$CC"
8863if test "$ac_cv_kpthread" = "yes"
8864then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008865elif test "$ac_cv_kthread" = "yes"
8866then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008867elif test "$ac_cv_pthread" = "yes"
8868then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008869fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8872$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008873have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008875/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
8877 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Guido van Rossum12580492000-09-24 16:47:19 +00008881pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ;
8883 return 0;
8884}
Matthias Kloseb159a552010-04-25 21:00:44 +00008885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008888 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8892$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008893if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8896# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8897# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8899$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904#ifdef HAVE_PTHREAD_H
8905#include <pthread.h>
8906#endif
8907
Matthias Kloseb9621712010-04-24 17:59:49 +00008908"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 if test "$ac_cv_type_pthread_t" = yes; then
8912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008914as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008915See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916 else
8917 ac_cv_sizeof_pthread_t=0
8918 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920
Trent Mick635f6fb2000-08-23 21:33:05 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8923$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925
8926
Martin v. Löwis11437992002-04-12 09:54:03 +00008927cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008928#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008929_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931
Trent Mick635f6fb2000-08-23 21:33:05 +00008932fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008933
8934# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8935# This checking will be unnecessary after removing deprecated TLS API.
8936# The cast to long int works around a bug in the HP C Compiler
8937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8939# This bug is HP SR number 8606223364.
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8941$as_echo_n "checking size of pthread_key_t... " >&6; }
8942if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8943 $as_echo_n "(cached) " >&6
8944else
8945 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8946"; then :
8947
8948else
8949 if test "$ac_cv_type_pthread_key_t" = yes; then
8950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8952as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8953See \`config.log' for more details" "$LINENO" 5; }
8954 else
8955 ac_cv_sizeof_pthread_key_t=0
8956 fi
8957fi
8958
8959fi
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8961$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8962
8963
8964
8965cat >>confdefs.h <<_ACEOF
8966#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8967_ACEOF
8968
8969
8970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8971$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8972if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974/* end confdefs.h. */
8975#include <pthread.h>
8976int
8977main ()
8978{
8979pthread_key_t k; k * 1;
8980 ;
8981 return 0;
8982}
8983_ACEOF
8984if ac_fn_c_try_compile "$LINENO"; then :
8985 ac_pthread_key_t_is_arithmetic_type=yes
8986else
8987 ac_pthread_key_t_is_arithmetic_type=no
8988
8989fi
8990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8992$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8993 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8994
8995$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8996
8997 fi
8998else
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9000$as_echo "no" >&6; }
9001fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009002CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009003
Michael W. Hudson54241132001-12-07 15:38:26 +00009004
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009005case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009006 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009007 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9008 ;;
9009 Darwin/*)
9010 OTHER_LIBTOOL_OPT=""
9011 ;;
9012esac
9013
9014
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009016case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009017 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009018 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9019 if test "${enable_universalsdk}"; then
9020 :
9021 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009022 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009023 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009024 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009025 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009026 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009027 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009028 if test ${gcc_version} '<' 4.0
9029 then
9030 LIBTOOL_CRUFT="-lcc_dynamic"
9031 else
9032 LIBTOOL_CRUFT=""
9033 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009035 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036else
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009039
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040 #include <unistd.h>
9041 int main(int argc, char*argv[])
9042 {
9043 if (sizeof(long) == 4) {
9044 return 0;
9045 } else {
9046 return 1;
9047 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009048 }
9049
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009051if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052 ac_osx_32bit=yes
9053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058fi
9059
9060
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009062 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063 i386)
9064 MACOSX_DEFAULT_ARCH="i386"
9065 ;;
9066 ppc)
9067 MACOSX_DEFAULT_ARCH="ppc"
9068 ;;
9069 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009070 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009071 ;;
9072 esac
9073 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009074 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009075 i386)
9076 MACOSX_DEFAULT_ARCH="x86_64"
9077 ;;
9078 ppc)
9079 MACOSX_DEFAULT_ARCH="ppc64"
9080 ;;
9081 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009082 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009083 ;;
9084 esac
9085
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009086 fi
9087
9088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009090 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009091esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9093$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009094if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009095then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009096 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009097 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009098 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9103$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009104 if test $enable_shared = "yes"
9105 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009106 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 +00009107 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009108else
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009111fi
9112
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9114$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009115case $ac_sys_system/$ac_sys_release in
9116 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9121$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009122 ;;
9123 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009126 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009127esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009128
Guido van Rossum0a516c91994-09-12 10:58:40 +00009129# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009130
Michael W. Hudson54241132001-12-07 15:38:26 +00009131
9132
9133
9134
Benjamin Peterson99f03762010-04-11 22:15:28 +00009135
Thomas Wouters477c8d52006-05-27 19:21:47 +00009136
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009137# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9138# -- usually .so, .sl on HP-UX, .dll on Cygwin
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9140$as_echo_n "checking the extension of shared libraries... " >&6; }
9141if test -z "$SHLIB_SUFFIX"; then
9142 case $ac_sys_system in
9143 hp*|HP*)
9144 case `uname -m` in
9145 ia64) SHLIB_SUFFIX=.so;;
9146 *) SHLIB_SUFFIX=.sl;;
9147 esac
9148 ;;
9149 CYGWIN*) SHLIB_SUFFIX=.dll;;
9150 *) SHLIB_SUFFIX=.so;;
9151 esac
9152fi
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9154$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009155
Guido van Rossum0a516c91994-09-12 10:58:40 +00009156# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009157# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009158# (Shared libraries in this instance are shared modules to be loaded into
9159# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9161$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009162if test -z "$LDSHARED"
9163then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009164 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009165 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009166 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009167 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009168 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009170 if test "$GCC" = "yes" ; then
9171 LDSHARED='$(CC) -shared'
9172 LDCXXSHARED='$(CXX) -shared'
9173 else
9174 LDSHARED='$(CC) -G'
9175 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009176 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009177 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009178 if test "$GCC" = "yes" ; then
9179 LDSHARED='$(CC) -shared'
9180 LDCXXSHARED='$(CXX) -shared'
9181 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009182 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009183 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009184 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009185 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009186 LDSHARED='$(CC) -bundle'
9187 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009188 if test "$enable_framework" ; then
9189 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009190 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9191 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009193 else
9194 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009195 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009197 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009198 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009199 LDSHARED='$(CC) -bundle'
9200 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009201 if test "$enable_framework" ; then
9202 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009203 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9204 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009206 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009207 # No framework, use the Python app as bundle-loader
9208 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009209 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009210 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009211 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009212 Darwin/*)
9213 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9214 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009215
Ned Deily36820b62014-06-25 13:44:22 -07009216 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9217 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9218 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9219 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9220 if test ${dep_target_major} -eq 10 && \
9221 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009222 then
Ned Deily36820b62014-06-25 13:44:22 -07009223 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009224 LDSHARED='$(CC) -bundle'
9225 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009226 if test "$enable_framework" ; then
9227 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009228 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9229 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009230 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009231 else
9232 # No framework, use the Python app as bundle-loader
9233 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9234 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009235 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009236 fi
Ned Deily36820b62014-06-25 13:44:22 -07009237 else
9238 # building for OS X 10.3 and later
9239 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9240 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9241 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009242 fi
9243 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 Linux*|GNU*|QNX*)
9245 LDSHARED='$(CC) -shared'
9246 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009247 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009248 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009249 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009250 LDSHARED='$(CC) -shared'
9251 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009252 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009253 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009254 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009255 OpenBSD*)
9256 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9257 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009258 LDSHARED='$(CC) -shared $(CCSHARED)'
9259 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009260 else
9261 case `uname -r` in
9262 [01].* | 2.[0-7] | 2.[0-7].*)
9263 LDSHARED="ld -Bshareable ${LDFLAGS}"
9264 ;;
9265 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009266 LDSHARED='$(CC) -shared $(CCSHARED)'
9267 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009268 ;;
9269 esac
9270 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009271 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009272 LDSHARED='$(CC) -shared'
9273 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009274 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009275 if test "$GCC" = "yes" ; then
9276 LDSHARED='$(CC) -shared'
9277 LDCXXSHARED='$(CXX) -shared'
9278 else
9279 LDSHARED='$(CC) -G'
9280 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009281 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009282 SCO_SV*)
9283 LDSHARED='$(CC) -Wl,-G,-Bexport'
9284 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9285 CYGWIN*)
9286 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9287 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009288 *) LDSHARED="ld";;
9289 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9292$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009293LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009294BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009295# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9298$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299if test -z "$CCSHARED"
9300then
Guido van Rossum07397971997-04-29 21:49:50 +00009301 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009302 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009303 then CCSHARED="-fPIC";
9304 elif test `uname -p` = sparc;
9305 then CCSHARED="-xcode=pic32";
9306 else CCSHARED="-Kpic";
9307 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009308 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009309 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009310 else CCSHARED="+z";
9311 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009312 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009313 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009314 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009315 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009316 if test "$GCC" = "yes"
9317 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009318 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009319 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009320 SCO_SV*)
9321 if test "$GCC" = "yes"
9322 then CCSHARED="-fPIC"
9323 else CCSHARED="-Kpic -belf"
9324 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9328$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009330# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9332$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333if test -z "$LINKFORSHARED"
9334then
Guido van Rossum07397971997-04-29 21:49:50 +00009335 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009336 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009337 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009338 LINKFORSHARED="-Wl,-E -Wl,+s";;
9339# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009340 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009341 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009342 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009343 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009344 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009345
9346 # Issue #18075: the default maximum stack size (8MBytes) is too
9347 # small for the default recursion limit. Increase the stack size
9348 # to ensure that tests don't crash
9349 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9350
Jack Jansene578a632001-08-15 01:27:14 +00009351 if test "$enable_framework"
9352 then
Jack Jansenda49e192005-01-07 13:08:22 +00009353 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009354 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009355 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009356 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009357 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009358 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009359 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009360 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9361 then
9362 LINKFORSHARED="-Wl,--export-dynamic"
9363 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009364 SunOS/5*) case $CC in
9365 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009366 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009367 then
9368 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009369 fi;;
9370 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009371 CYGWIN*)
9372 if test $enable_shared = "no"
9373 then
9374 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9375 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009376 QNX*)
9377 # -Wl,-E causes the symbols to be added to the dynamic
9378 # symbol table so that they can be found when a module
9379 # is loaded. -N 2048K causes the stack size to be set
9380 # to 2048 kilobytes so that the stack doesn't overflow
9381 # when running test_compile.py.
9382 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009383 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9386$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009387
Michael W. Hudson54241132001-12-07 15:38:26 +00009388
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009389
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9391$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009392if test ! "$LIBRARY" = "$LDLIBRARY"
9393then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009394 case $ac_sys_system in
9395 CYGWIN*)
9396 # Cygwin needs CCSHARED when building extension DLLs
9397 # but not when building the interpreter DLL.
9398 CFLAGSFORSHARED='';;
9399 *)
9400 CFLAGSFORSHARED='$(CCSHARED)'
9401 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9404$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009405
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9407# library (with --enable-shared).
9408# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009409# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9410# if it is not required, since it creates a dependency of the shared library
9411# to LIBS. This, in turn, means that applications linking the shared libpython
9412# don't need to link LIBS explicitly. The default should be only changed
9413# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009414
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9416$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009417case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009419 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009420esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9422$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009423
9424
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9427$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009428if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009429 $as_echo_n "(cached) " >&6
9430else
9431 ac_check_lib_save_LIBS=$LIBS
9432LIBS="-lsendfile $LIBS"
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9434/* end confdefs.h. */
9435
9436/* Override any GCC internal prototype to avoid an error.
9437 Use char because int might match the return type of a GCC
9438 builtin and then its argument prototype would still apply. */
9439#ifdef __cplusplus
9440extern "C"
9441#endif
9442char sendfile ();
9443int
9444main ()
9445{
9446return sendfile ();
9447 ;
9448 return 0;
9449}
9450_ACEOF
9451if ac_fn_c_try_link "$LINENO"; then :
9452 ac_cv_lib_sendfile_sendfile=yes
9453else
9454 ac_cv_lib_sendfile_sendfile=no
9455fi
9456rm -f core conftest.err conftest.$ac_objext \
9457 conftest$ac_exeext conftest.$ac_ext
9458LIBS=$ac_check_lib_save_LIBS
9459fi
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9461$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009462if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009463 cat >>confdefs.h <<_ACEOF
9464#define HAVE_LIBSENDFILE 1
9465_ACEOF
9466
9467 LIBS="-lsendfile $LIBS"
9468
9469fi
9470
Matthias Kloseb9621712010-04-24 17:59:49 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9472$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009479/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481/* Override any GCC internal prototype to avoid an error.
9482 Use char because int might match the return type of a GCC
9483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484#ifdef __cplusplus
9485extern "C"
9486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009487char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009488int
9489main ()
9490{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ;
9493 return 0;
9494}
9495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009496if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009498else
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501rm -f core conftest.err conftest.$ac_objext \
9502 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009503LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9506$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 cat >>confdefs.h <<_ACEOF
9509#define HAVE_LIBDL 1
9510_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009512 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009514fi
9515 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9517$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9551$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 cat >>confdefs.h <<_ACEOF
9554#define HAVE_LIBDLD 1
9555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009556
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009557 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009558
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009559fi
9560 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009561
Michael Felt0d3ccb42017-12-30 22:39:20 +01009562# checks for uuid.h location
9563for ac_header in uuid/uuid.h uuid.h
9564do :
9565 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9566ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9567if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9568 cat >>confdefs.h <<_ACEOF
9569#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9570_ACEOF
9571
9572fi
9573
9574done
9575
9576
Berker Peksag9a10ff42017-11-08 23:09:16 +03009577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9578$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580/* end confdefs.h. */
9581#include <uuid/uuid.h>
9582int
9583main ()
9584{
9585
9586#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009587void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009588#endif
9589
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594if ac_fn_c_try_compile "$LINENO"; then :
9595
9596$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9597
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9599$as_echo "yes" >&6; }
9600else
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
9603
9604fi
9605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9606
Michael Felt0d3ccb42017-12-30 22:39:20 +01009607# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009608# FreeBSD and OpenBSD provides support as well
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9610$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9612/* end confdefs.h. */
9613#include <uuid.h>
9614int
9615main ()
9616{
9617
9618#ifndef uuid_create
9619void *x = uuid_create
9620#endif
9621
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626if ac_fn_c_try_compile "$LINENO"; then :
9627
9628$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9629
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9631$as_echo "yes" >&6; }
9632else
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
9635
9636fi
9637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9638
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009639# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9640# stream in big-endian byte-order
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9642$as_echo_n "checking for uuid_enc_be... " >&6; }
9643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9644/* end confdefs.h. */
9645#include <uuid.h>
9646int
9647main ()
9648{
9649
9650#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009651void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009652#endif
9653
9654 ;
9655 return 0;
9656}
9657_ACEOF
9658if ac_fn_c_try_compile "$LINENO"; then :
9659
9660$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9661
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9663$as_echo "yes" >&6; }
9664else
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9666$as_echo "no" >&6; }
9667
9668fi
9669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9670
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009671# 'Real Time' functions on Solaris
9672# posix4 on Solaris 2.6
9673# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009676if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009677 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009678else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009679 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009686#ifdef __cplusplus
9687extern "C"
9688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009689char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ;
9695 return 0;
9696}
9697_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698for ac_lib in '' pthread rt posix4; do
9699 if test -z "$ac_lib"; then
9700 ac_res="none required"
9701 else
9702 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009703 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708rm -f core conftest.err conftest.$ac_objext \
9709 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009710 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713done
Victor Stinnere0be4232011-10-25 13:06:09 +02009714if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716else
9717 ac_cv_search_sem_init=no
9718fi
9719rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009720LIBS=$ac_func_search_save_LIBS
9721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9723$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009725if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009727
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009728fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009729
Martin v. Löwis519adae2003-09-20 10:47:47 +00009730
Martin v. Löwis19d17342003-06-14 21:03:05 +00009731# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9733$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009734if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009736else
9737 ac_check_lib_save_LIBS=$LIBS
9738LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009740/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742/* Override any GCC internal prototype to avoid an error.
9743 Use char because int might match the return type of a GCC
9744 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009745#ifdef __cplusplus
9746extern "C"
9747#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009748char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009749int
9750main ()
9751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009753 ;
9754 return 0;
9755}
9756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009758 ac_cv_lib_intl_textdomain=yes
9759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009764LIBS=$ac_check_lib_save_LIBS
9765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9767$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009768if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009769
Matthias Kloseb9621712010-04-24 17:59:49 +00009770$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009771
Brett Cannonc6d936e2009-06-07 20:09:53 +00009772 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009773fi
9774
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009775
9776# checks for system dependent C++ extensions support
9777case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9779$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009782
Georg Brandl59e87bd2011-02-15 19:48:59 +00009783 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009784int
9785main ()
9786{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009787loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 ;
9789 return 0;
9790}
Matthias Kloseb159a552010-04-25 21:00:44 +00009791
Martin v. Löwis11437992002-04-12 09:54:03 +00009792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009794
Matthias Kloseb159a552010-04-25 21:00:44 +00009795
Matthias Kloseb9621712010-04-24 17:59:49 +00009796$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Matthias Kloseb159a552010-04-25 21:00:44 +00009798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009799$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009800
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009801else
Matthias Kloseb159a552010-04-25 21:00:44 +00009802
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009804$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009805
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009807rm -f core conftest.err conftest.$ac_objext \
9808 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009809 *) ;;
9810esac
9811
Christian Heimes985ecdc2013-11-20 11:46:18 +01009812# check for systems that require aligned memory access
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9814$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009815if ${ac_cv_aligned_required+:} false; then :
9816 $as_echo_n "(cached) " >&6
9817else
9818 if test "$cross_compiling" = yes; then :
9819 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009820else
9821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9822/* end confdefs.h. */
9823
9824int main()
9825{
9826 char s[16];
9827 int i, *p1, *p2;
9828 for (i=0; i < 16; i++)
9829 s[i] = i;
9830 p1 = (int*)(s+1);
9831 p2 = (int*)(s+2);
9832 if (*p1 == *p2)
9833 return 1;
9834 return 0;
9835}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009836_ACEOF
9837if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009838 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009839else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009840 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009841fi
9842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9843 conftest.$ac_objext conftest.beam conftest.$ac_ext
9844fi
9845
9846
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009847fi
9848
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9850$as_echo "$ac_cv_aligned_required" >&6; }
9851if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009852
9853$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9854
9855fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009856
9857# str, bytes and memoryview hash algorithm
9858
9859
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9861$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9862
9863# Check whether --with-hash_algorithm was given.
9864if test "${with_hash_algorithm+set}" = set; then :
9865 withval=$with_hash_algorithm;
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9867$as_echo "$withval" >&6; }
9868case "$withval" in
9869 siphash24)
9870 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9871
9872 ;;
9873 fnv)
9874 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9875
9876 ;;
9877 *)
9878 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9879 ;;
9880esac
9881
9882else
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9884$as_echo "default" >&6; }
9885fi
9886
9887
Charles-François Natalid30b0222014-05-08 23:08:51 +01009888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9889$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9890
9891# Check whether --with-address_sanitizer was given.
9892if test "${with_address_sanitizer+set}" = set; then :
9893 withval=$with_address_sanitizer;
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9895$as_echo "$withval" >&6; }
9896BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9897LDFLAGS="-fsanitize=address $LDFLAGS"
9898
9899else
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
9902fi
9903
9904
Guido van Rossum70c7f481998-03-26 18:44:10 +00009905# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9907$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009908if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009910else
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009912LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916/* Override any GCC internal prototype to avoid an error.
9917 Use char because int might match the return type of a GCC
9918 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919#ifdef __cplusplus
9920extern "C"
9921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009922char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009923int
9924main ()
9925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 ;
9928 return 0;
9929}
9930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009931if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009933else
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009936rm -f core conftest.err conftest.$ac_objext \
9937 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009938LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9941$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009942if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009943 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009944fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009945 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9947$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009948if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009950else
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009952LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009956/* Override any GCC internal prototype to avoid an error.
9957 Use char because int might match the return type of a GCC
9958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009959#ifdef __cplusplus
9960extern "C"
9961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009962char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009963int
9964main ()
9965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009976rm -f core conftest.err conftest.$ac_objext \
9977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009978LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9981$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009982if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009983 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009984fi
9985 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9988$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009992 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9994$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009995LIBS="$withval $LIBS"
9996
9997else
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000fi
10001
Guido van Rossum7f43da71994-08-01 12:15:30 +000010002
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010003
10004
10005
10006
10007
10008
10009
10010if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10011 if test -n "$ac_tool_prefix"; then
10012 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10013set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10015$as_echo_n "checking for $ac_word... " >&6; }
10016if ${ac_cv_path_PKG_CONFIG+:} false; then :
10017 $as_echo_n "(cached) " >&6
10018else
10019 case $PKG_CONFIG in
10020 [\\/]* | ?:[\\/]*)
10021 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10022 ;;
10023 *)
10024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10025for as_dir in $PATH
10026do
10027 IFS=$as_save_IFS
10028 test -z "$as_dir" && as_dir=.
10029 for ac_exec_ext in '' $ac_executable_extensions; do
10030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10031 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10033 break 2
10034 fi
10035done
10036 done
10037IFS=$as_save_IFS
10038
10039 ;;
10040esac
10041fi
10042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10043if test -n "$PKG_CONFIG"; then
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10045$as_echo "$PKG_CONFIG" >&6; }
10046else
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10048$as_echo "no" >&6; }
10049fi
10050
10051
10052fi
10053if test -z "$ac_cv_path_PKG_CONFIG"; then
10054 ac_pt_PKG_CONFIG=$PKG_CONFIG
10055 # Extract the first word of "pkg-config", so it can be a program name with args.
10056set dummy pkg-config; ac_word=$2
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10058$as_echo_n "checking for $ac_word... " >&6; }
10059if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10060 $as_echo_n "(cached) " >&6
10061else
10062 case $ac_pt_PKG_CONFIG in
10063 [\\/]* | ?:[\\/]*)
10064 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10065 ;;
10066 *)
10067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068for as_dir in $PATH
10069do
10070 IFS=$as_save_IFS
10071 test -z "$as_dir" && as_dir=.
10072 for ac_exec_ext in '' $ac_executable_extensions; do
10073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10074 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10076 break 2
10077 fi
10078done
10079 done
10080IFS=$as_save_IFS
10081
10082 ;;
10083esac
10084fi
10085ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10086if test -n "$ac_pt_PKG_CONFIG"; then
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10088$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10089else
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
10092fi
10093
10094 if test "x$ac_pt_PKG_CONFIG" = x; then
10095 PKG_CONFIG=""
10096 else
10097 case $cross_compiling:$ac_tool_warned in
10098yes:)
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10101ac_tool_warned=yes ;;
10102esac
10103 PKG_CONFIG=$ac_pt_PKG_CONFIG
10104 fi
10105else
10106 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10107fi
10108
10109fi
10110if test -n "$PKG_CONFIG"; then
10111 _pkg_min_version=0.9.0
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10113$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10114 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10116$as_echo "yes" >&6; }
10117 else
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
10120 PKG_CONFIG=""
10121 fi
10122fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010123
10124# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10126$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010127
10128# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010129if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010130 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010131else
10132 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010133fi
10134
10135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10137$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010138
10139# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10141$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010142
10143# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010144if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010145 withval=$with_system_ffi;
10146fi
10147
10148
Zachary Waref40d4dd2016-09-17 01:25:24 -050010149if test "$ac_sys_system" = "Darwin"
10150then
10151 case "$with_system_ffi" in
10152 "")
10153 with_system_ffi="no"
10154 ;;
10155 yes|no)
10156 ;;
10157 *)
10158 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10159 ;;
10160 esac
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10162$as_echo "$with_system_ffi" >&6; }
10163else
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10165$as_echo "yes" >&6; }
10166 if test "$with_system_ffi" != ""
10167 then
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10169$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10170 fi
10171 with_system_ffi="yes"
10172fi
Zachary Ware935043d2016-09-09 17:01:21 -070010173
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010174if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010175 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10176else
10177 LIBFFI_INCLUDEDIR=""
10178fi
10179
10180
Stefan Krah60187b52012-03-23 19:06:27 +010010181# Check for use of the system libmpdec library
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10183$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10184
10185# Check whether --with-system_libmpdec was given.
10186if test "${with_system_libmpdec+set}" = set; then :
10187 withval=$with_system_libmpdec;
10188else
10189 with_system_libmpdec="no"
10190fi
10191
10192
10193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10194$as_echo "$with_system_libmpdec" >&6; }
10195
Benjamin Peterson076ed002010-10-31 17:11:02 +000010196# Check for support for loadable sqlite extensions
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10198$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10199# Check whether --enable-loadable-sqlite-extensions was given.
10200if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10201 enableval=$enable_loadable_sqlite_extensions;
10202else
10203 enable_loadable_sqlite_extensions="no"
10204fi
10205
10206
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10208$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10209
Ned Deilyd819b932013-09-06 01:07:05 -070010210# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10211
10212
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10214$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10215
10216# Check whether --with-tcltk-includes was given.
10217if test "${with_tcltk_includes+set}" = set; then :
10218 withval=$with_tcltk_includes;
10219else
10220 with_tcltk_includes="default"
10221fi
10222
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10224$as_echo "$with_tcltk_includes" >&6; }
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10226$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10227
10228# Check whether --with-tcltk-libs was given.
10229if test "${with_tcltk_libs+set}" = set; then :
10230 withval=$with_tcltk_libs;
10231else
10232 with_tcltk_libs="default"
10233fi
10234
10235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10236$as_echo "$with_tcltk_libs" >&6; }
10237if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10238then
10239 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10240 then
10241 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10242 fi
10243 TCLTK_INCLUDES=""
10244 TCLTK_LIBS=""
10245else
10246 TCLTK_INCLUDES="$with_tcltk_includes"
10247 TCLTK_LIBS="$with_tcltk_libs"
10248fi
10249
Matthias Klose55708cc2009-04-30 08:06:49 +000010250# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10252$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010253
10254# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010255if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010256 withval=$with_dbmliborder;
10257if test x$with_dbmliborder = xyes
10258then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010259as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010260else
10261 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10262 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10263 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010264 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010265 fi
10266 done
10267fi
10268fi
10269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10271$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
10275# Templates for things AC_DEFINEd more than once.
10276# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010277
10278
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010279if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010280then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010281 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010283
10284 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010285elif test "$ac_cv_kpthread" = "yes"
10286then
10287 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010288 if test "$ac_cv_cxx_thread" = "yes"; then
10289 CXX="$CXX -Kpthread"
10290 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010291 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010292elif test "$ac_cv_kthread" = "yes"
10293then
10294 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010295 if test "$ac_cv_cxx_thread" = "yes"; then
10296 CXX="$CXX -Kthread"
10297 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010298 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010299elif test "$ac_cv_pthread" = "yes"
10300then
10301 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010302 if test "$ac_cv_cxx_thread" = "yes"; then
10303 CXX="$CXX -pthread"
10304 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010306else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010307 if test ! -z "$withval" -a -d "$withval"
10308 then LDFLAGS="$LDFLAGS -L$withval"
10309 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010310
10311 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010312 # define _POSIX_THREADS in unistd.h. Some apparently don't
10313 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10315$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010317/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010318
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010319#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010320#ifdef _POSIX_THREADS
10321yes
10322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010323
10324_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010327 unistd_defines_pthreads=yes
10328else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010329 unistd_defines_pthreads=no
10330fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010331rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10334$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010335
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010337
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010338 # Just looking for pthread_create in libpthread is not enough:
10339 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10340 # So we really have to include pthread.h, and then link.
10341 _libs=$LIBS
10342 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10344$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010346/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010347
10348#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010349#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010350
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010351void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010352int
10353main ()
10354{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010355
10356pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10364$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010365 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010366
Guido van Rossum02a1c402000-02-25 19:26:31 +000010367else
Martin v. Löwis11437992002-04-12 09:54:03 +000010368
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010369 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010371if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010372
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010373 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010374
Guido van Rossumad678af1998-10-02 14:42:15 +000010375else
Guido van Rossumad678af1998-10-02 14:42:15 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10378$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010383LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387/* Override any GCC internal prototype to avoid an error.
10388 Use char because int might match the return type of a GCC
10389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010409LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10412$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010413if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010414
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010415 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010416 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010417
Greg Steinadf63d62000-07-05 10:38:09 +000010418else
Greg Steinadf63d62000-07-05 10:38:09 +000010419
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10421$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010422if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010424else
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010426LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430/* Override any GCC internal prototype to avoid an error.
10431 Use char because int might match the return type of a GCC
10432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433#ifdef __cplusplus
10434extern "C"
10435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010436char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010437int
10438main ()
10439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ;
10442 return 0;
10443}
10444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010447else
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010450rm -f core conftest.err conftest.$ac_objext \
10451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10455$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010456if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010459 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010460
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010461else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10464$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010465if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010467else
Martin v. Löwis11437992002-04-12 09:54:03 +000010468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010469LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473/* Override any GCC internal prototype to avoid an error.
10474 Use char because int might match the return type of a GCC
10475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010476#ifdef __cplusplus
10477extern "C"
10478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010479char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010480int
10481main ()
10482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 ;
10485 return 0;
10486}
10487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010490else
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010493rm -f core conftest.err conftest.$ac_objext \
10494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10498$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010500
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010501 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010502 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010503
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010504else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010505
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10507$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010508if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010510else
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010512LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010516/* Override any GCC internal prototype to avoid an error.
10517 Use char because int might match the return type of a GCC
10518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010519#ifdef __cplusplus
10520extern "C"
10521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010522char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010523int
10524main ()
10525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 ;
10528 return 0;
10529}
10530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010536rm -f core conftest.err conftest.$ac_objext \
10537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010538LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10541$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010542if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010543
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010544 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010546
Guido van Rossumb93a8621998-05-07 13:27:32 +000010547else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010548
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010549 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10550
Guido van Rossum2d38f911996-06-26 19:47:01 +000010551fi
10552
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010554fi
10555
Guido van Rossum0be3e491997-05-22 20:33:33 +000010556fi
10557
Guido van Rossum49545951997-12-02 19:28:29 +000010558fi
10559
Guido van Rossumb93a8621998-05-07 13:27:32 +000010560fi
10561
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010563rm -f core conftest.err conftest.$ac_objext \
10564 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010565
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10567$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010568if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010572LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576/* Override any GCC internal prototype to avoid an error.
10577 Use char because int might match the return type of a GCC
10578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010579#ifdef __cplusplus
10580extern "C"
10581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010582char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010583int
10584main ()
10585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593else
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596rm -f core conftest.err conftest.$ac_objext \
10597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010598LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10601$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010602if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010603
Martin v. Löwis130fb172001-07-19 11:00:41 +000010604 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010605
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606fi
10607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611if test "$posix_threads" = "yes"; then
10612 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615
10616 fi
10617
10618 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10619 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010620 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010622
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623 ;;
10624 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010625$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626
10627 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010628 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010629$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010630
10631 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632 esac
10633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10635$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010636 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010638else
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010640 ac_cv_pthread_system_supported=no
10641else
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010644
10645 #include <stdio.h>
10646 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010647 void *foo(void *parm) {
10648 return NULL;
10649 }
10650 main() {
10651 pthread_attr_t attr;
10652 pthread_t id;
10653 if (pthread_attr_init(&attr)) exit(-1);
10654 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10655 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10656 exit(0);
10657 }
10658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010659if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010660 ac_cv_pthread_system_supported=yes
10661else
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669fi
10670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10672$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673 if test "$ac_cv_pthread_system_supported" = "yes"; then
10674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676
10677 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 for ac_func in pthread_sigmask
10679do :
10680 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010681if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010685 case $ac_sys_system in
10686 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010689
10690 ;;
10691 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692fi
10693done
10694
pdoxe14679c2017-10-05 00:01:56 -070010695 for ac_func in pthread_getcpuclockid
10696do :
10697 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10698if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10699 cat >>confdefs.h <<_ACEOF
10700#define HAVE_PTHREAD_GETCPUCLOCKID 1
10701_ACEOF
10702
10703fi
10704done
10705
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706fi
10707
10708
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10712$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010714if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719 ipv6=no
10720 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10722$as_echo "yes" >&6; }
10723 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724
10725 ipv6=yes
10726 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010731/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732 /* AF_INET6 available check */
10733#include <sys/types.h>
10734#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010735int
10736main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010738int domain = AF_INET6;
10739 ;
10740 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741}
Martin v. Löwis11437992002-04-12 09:54:03 +000010742_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010743if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10746$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010748
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749else
Matthias Kloseb159a552010-04-25 21:00:44 +000010750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010754
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010758if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10760$as_echo_n "checking if RFC2553 API is available... " >&6; }
10761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010762/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
10764 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010765#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010766int
10767main ()
10768{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010769struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010770 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ;
10772 return 0;
10773}
Matthias Kloseb159a552010-04-25 21:00:44 +000010774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010776if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010777
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010779$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010780 ipv6=yes
10781
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010782else
Matthias Kloseb159a552010-04-25 21:00:44 +000010783
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010785$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 ipv6=no
10787
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010790fi
10791
10792if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010794
10795fi
10796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797fi
10798
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799
10800ipv6type=unknown
10801ipv6lib=none
10802ipv6trylibc=no
10803
10804if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10806$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010807 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10808 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 case $i in
10810 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814#include <netinet/in.h>
10815#ifdef IPV6_INRIA_VERSION
10816yes
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010821 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010823rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824
10825 ;;
10826 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010828/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010829
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830#include <netinet/in.h>
10831#ifdef __KAME__
10832yes
10833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010834_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837 ipv6type=$i;
10838 ipv6lib=inet6
10839 ipv6libdir=/usr/local/v6/lib
10840 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843
10844 ;;
10845 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010847/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849#include <features.h>
10850#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10851yes
10852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010853_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856 ipv6type=$i;
10857 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010859rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860
10861 ;;
10862 linux-inet6)
10863 if test -d /usr/inet6; then
10864 ipv6type=$i
10865 ipv6lib=inet6
10866 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010867 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 fi
10869 ;;
10870 solaris)
10871 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010872 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873 ipv6type=$i
10874 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 fi
10876 fi
10877 ;;
10878 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882#include <sys/param.h>
10883#ifdef _TOSHIBA_INET6
10884yes
10885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889 ipv6type=$i;
10890 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010891 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010893rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894
10895 ;;
10896 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900#include </usr/local/v6/include/sys/v6config.h>
10901#ifdef __V6D__
10902yes
10903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 ipv6type=$i;
10908 ipv6lib=v6;
10909 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010910 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913
10914 ;;
10915 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919#include <sys/param.h>
10920#ifdef _ZETA_MINAMI_INET6
10921yes
10922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 ipv6type=$i;
10927 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010928 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931
10932 ;;
10933 esac
10934 if test "$ipv6type" != "unknown"; then
10935 break
10936 fi
10937 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10939$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940fi
10941
10942if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10943 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10944 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10945 echo "using lib$ipv6lib"
10946 else
10947 if test $ipv6trylibc = "yes"; then
10948 echo "using libc"
10949 else
10950 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10951 echo "You need to fetch lib$ipv6lib.a from appropriate"
10952 echo 'ipv6 kit and compile beforehand.'
10953 exit 1
10954 fi
10955 fi
10956fi
10957
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10959$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10961/* end confdefs.h. */
10962 /* CAN_RAW_FD_FRAMES available check */
10963#include <linux/can/raw.h>
10964int
10965main ()
10966{
10967int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972if ac_fn_c_try_compile "$LINENO"; then :
10973
10974
10975$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10976
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10978$as_echo "yes" >&6; }
10979
10980else
10981
10982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10983$as_echo "no" >&6; }
10984
10985fi
10986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10987
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010988# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10990$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010993if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994 withval=$with_doc_strings;
10995fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010996
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
10998if test -z "$with_doc_strings"
10999then with_doc_strings="yes"
11000fi
11001if test "$with_doc_strings" != "no"
11002then
11003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011005
11006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11008$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011009
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011010# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11012$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 withval=$with_pymalloc;
11017fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011018
Neil Schemenauera35c6882001-02-27 04:45:05 +000011019
Neil Schemenauer16c22972002-03-22 15:34:49 +000011020if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011021then
11022 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011023fi
11024if test "$with_pymalloc" != "no"
11025then
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011028
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011029 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11032$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011033
Nick Coghlan6ea41862017-06-11 13:16:15 +100011034# Check for --with-c-locale-coercion
11035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11036$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11037
11038# Check whether --with-c-locale-coercion was given.
11039if test "${with_c_locale_coercion+set}" = set; then :
11040 withval=$with_c_locale_coercion;
11041fi
11042
11043
11044if test -z "$with_c_locale_coercion"
11045then
11046 with_c_locale_coercion="yes"
11047fi
11048if test "$with_c_locale_coercion" != "no"
11049then
11050
11051$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11052
11053fi
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11055$as_echo "$with_c_locale_coercion" >&6; }
11056
Benjamin Peterson05159c42009-12-03 03:01:27 +000011057# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11059$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011060
11061# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011063 withval=$with_valgrind;
11064else
11065 with_valgrind=no
11066fi
11067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11069$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011070if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 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 +020011072if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011075
11076else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011077 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011078
11079fi
11080
11081
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011082 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011083fi
11084
Łukasz Langaa785c872016-09-09 17:37:37 -070011085# Check for DTrace support
11086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11087$as_echo_n "checking for --with-dtrace... " >&6; }
11088
11089# Check whether --with-dtrace was given.
11090if test "${with_dtrace+set}" = set; then :
11091 withval=$with_dtrace;
11092else
11093 with_dtrace=no
11094fi
11095
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11097$as_echo "$with_dtrace" >&6; }
11098
11099
11100
11101
11102
11103DTRACE=
11104DFLAGS=
11105DTRACE_HEADERS=
11106DTRACE_OBJS=
11107
11108if test "$with_dtrace" = "yes"
11109then
11110 # Extract the first word of "dtrace", so it can be a program name with args.
11111set dummy dtrace; ac_word=$2
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11113$as_echo_n "checking for $ac_word... " >&6; }
11114if ${ac_cv_path_DTRACE+:} false; then :
11115 $as_echo_n "(cached) " >&6
11116else
11117 case $DTRACE in
11118 [\\/]* | ?:[\\/]*)
11119 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11120 ;;
11121 *)
11122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11123for as_dir in $PATH
11124do
11125 IFS=$as_save_IFS
11126 test -z "$as_dir" && as_dir=.
11127 for ac_exec_ext in '' $ac_executable_extensions; do
11128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11129 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11131 break 2
11132 fi
11133done
11134 done
11135IFS=$as_save_IFS
11136
11137 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11138 ;;
11139esac
11140fi
11141DTRACE=$ac_cv_path_DTRACE
11142if test -n "$DTRACE"; then
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11144$as_echo "$DTRACE" >&6; }
11145else
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11147$as_echo "no" >&6; }
11148fi
11149
11150
11151 if test "$DTRACE" = "not found"; then
11152 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11153 fi
11154
11155$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11156
11157 DTRACE_HEADERS="Include/pydtrace_probes.h"
11158
11159 # On OS X, DTrace providers do not need to be explicitly compiled and
11160 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11161 # generation flag '-G'. We check for presence of this flag, rather than
11162 # hardcoding support by OS, in the interest of robustness.
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11164$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11165if ${ac_cv_dtrace_link+:} false; then :
11166 $as_echo_n "(cached) " >&6
11167else
11168 ac_cv_dtrace_link=no
11169 echo 'BEGIN' > conftest.d
11170 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11171 ac_cv_dtrace_link=yes
11172
11173fi
11174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11175$as_echo "$ac_cv_dtrace_link" >&6; }
11176 if test "$ac_cv_dtrace_link" = "yes"; then
11177 DTRACE_OBJS="Python/pydtrace.o"
11178 fi
11179fi
11180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011181# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Guido van Rossum98935bf2001-09-05 19:13:16 +000011183DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184
Guido van Rossume97ee181999-12-20 21:27:22 +000011185# the dlopen() function means we might want to use dynload_shlib.o. some
11186# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011187for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011188do :
11189 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011190if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011192#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011193_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011194
Guido van Rossume97ee181999-12-20 21:27:22 +000011195fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011196done
Guido van Rossume97ee181999-12-20 21:27:22 +000011197
Michael W. Hudson54241132001-12-07 15:38:26 +000011198
Guido van Rossume97ee181999-12-20 21:27:22 +000011199# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11200# loading of modules.
11201
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11203$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011204if test -z "$DYNLOADFILE"
11205then
11206 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011207 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11208 if test "$ac_cv_func_dlopen" = yes
11209 then DYNLOADFILE="dynload_shlib.o"
11210 else DYNLOADFILE="dynload_aix.o"
11211 fi
11212 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011213 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011214 *)
11215 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11216 # out any dynamic loading
11217 if test "$ac_cv_func_dlopen" = yes
11218 then DYNLOADFILE="dynload_shlib.o"
11219 else DYNLOADFILE="dynload_stub.o"
11220 fi
11221 ;;
11222 esac
11223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11225$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011226if test "$DYNLOADFILE" != "dynload_stub.o"
11227then
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011230
11231fi
11232
Neil Schemenauer4e425612001-06-19 15:44:15 +000011233# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11234
Michael W. Hudson54241132001-12-07 15:38:26 +000011235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11237$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011238if test -z "$MACHDEP_OBJS"
11239then
Jack Jansene578a632001-08-15 01:27:14 +000011240 MACHDEP_OBJS=$extra_machdep_objs
11241else
11242 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011243fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011244if test -z "$MACHDEP_OBJS"; then
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11246$as_echo "none" >&6; }
11247else
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11249$as_echo "$MACHDEP_OBJS" >&6; }
11250fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011251
Guido van Rossum627b2d71993-12-24 10:39:16 +000011252# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011253for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011254 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011255 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011256 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011257 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011258 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011259 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011260 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011261 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011262 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011263 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011264 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011265 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011266 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011267 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011268 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011269 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11270 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011271 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011272 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011273 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011274 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011275 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011276do :
11277 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11278ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011279if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011282_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011283
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011284fi
11285done
11286
Michael W. Hudson54241132001-12-07 15:38:26 +000011287
Benjamin Peterson40caa052018-09-12 15:52:40 -070011288# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11289# links. Some libc implementations have a stub lchmod implementation that always
11290# returns an error.
11291if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011292 for ac_func in lchmod
11293do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011294 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11295if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011296 cat >>confdefs.h <<_ACEOF
11297#define HAVE_LCHMOD 1
11298_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011299
11300fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011301done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011302
11303fi
11304
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011305ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11306 #include <dirent.h>
11307"
11308if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11309
11310$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11311
11312fi
11313
11314
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315# For some functions, having a definition is not sufficient, since
11316# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11318$as_echo_n "checking for chroot... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011321#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322int
11323main ()
11324{
11325void *x=chroot
11326 ;
11327 return 0;
11328}
11329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011333
Matthias Kloseb159a552010-04-25 21:00:44 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011336else
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011339
11340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11343$as_echo_n "checking for link... " >&6; }
11344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011345/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011346#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011347int
11348main ()
11349{
11350void *x=link
11351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358
Matthias Kloseb159a552010-04-25 21:00:44 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011360$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011361else
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011364
11365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11368$as_echo_n "checking for symlink... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011371#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011372int
11373main ()
11374{
11375void *x=symlink
11376 ;
11377 return 0;
11378}
11379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011383
Matthias Kloseb159a552010-04-25 21:00:44 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011386else
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011389
11390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11393$as_echo_n "checking for fchdir... " >&6; }
11394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011395/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011396#include <unistd.h>
11397int
11398main ()
11399{
11400void *x=fchdir
11401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011408
Matthias Kloseb159a552010-04-25 21:00:44 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011411else
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011414
11415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11418$as_echo_n "checking for fsync... " >&6; }
11419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011420/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011421#include <unistd.h>
11422int
11423main ()
11424{
11425void *x=fsync
11426 ;
11427 return 0;
11428}
11429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433
Matthias Kloseb159a552010-04-25 21:00:44 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011435$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011436else
Matthias Kloseb9621712010-04-24 17:59:49 +000011437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011439
11440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11443$as_echo_n "checking for fdatasync... " >&6; }
11444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011445/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011446#include <unistd.h>
11447int
11448main ()
11449{
11450void *x=fdatasync
11451 ;
11452 return 0;
11453}
11454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011456
Matthias Kloseb9621712010-04-24 17:59:49 +000011457$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011458
Matthias Kloseb159a552010-04-25 21:00:44 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011461else
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011464
11465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11468$as_echo_n "checking for epoll... " >&6; }
11469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011470/* end confdefs.h. */
11471#include <sys/epoll.h>
11472int
11473main ()
11474{
11475void *x=epoll_create
11476 ;
11477 return 0;
11478}
11479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011480if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483
Matthias Kloseb159a552010-04-25 21:00:44 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011485$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011486else
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011489
11490fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11493$as_echo_n "checking for epoll_create1... " >&6; }
11494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11495/* end confdefs.h. */
11496#include <sys/epoll.h>
11497int
11498main ()
11499{
11500void *x=epoll_create1
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505if ac_fn_c_try_compile "$LINENO"; then :
11506
11507$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11508
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11510$as_echo "yes" >&6; }
11511else
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514
11515fi
11516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11518$as_echo_n "checking for kqueue... " >&6; }
11519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011520/* end confdefs.h. */
11521
11522#include <sys/types.h>
11523#include <sys/event.h>
11524
11525int
11526main ()
11527{
11528int x=kqueue()
11529 ;
11530 return 0;
11531}
11532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011533if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011536
Matthias Kloseb159a552010-04-25 21:00:44 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011538$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011539else
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11541$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011542
11543fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11546$as_echo_n "checking for prlimit... " >&6; }
11547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11548/* end confdefs.h. */
11549
11550#include <sys/time.h>
11551#include <sys/resource.h>
11552
11553int
11554main ()
11555{
11556void *x=prlimit
11557 ;
11558 return 0;
11559}
11560_ACEOF
11561if ac_fn_c_try_compile "$LINENO"; then :
11562
11563$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11564
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11566$as_echo "yes" >&6; }
11567else
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
11570
11571fi
11572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11573
Martin v. Löwisd5843682002-11-21 20:41:28 +000011574# On some systems (eg. FreeBSD 5), we would find a definition of the
11575# functions ctermid_r, setgroups in the library, but no prototype
11576# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11577# address to avoid compiler warnings and potential miscompilations
11578# because of the missing prototypes.
11579
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11581$as_echo_n "checking for ctermid_r... " >&6; }
11582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011583/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011584
Martin v. Löwisd5843682002-11-21 20:41:28 +000011585#include <stdio.h>
11586
Martin v. Löwisd5843682002-11-21 20:41:28 +000011587int
11588main ()
11589{
11590void* p = ctermid_r
11591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011598
Matthias Kloseb159a552010-04-25 21:00:44 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011600$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011601else
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11603$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011604
11605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11607
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11609$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011610if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011611 $as_echo_n "(cached) " >&6
11612else
11613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011615#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011616int
11617main ()
11618{
11619void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011620
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011621 ;
11622 return 0;
11623}
11624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011625if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011626 ac_cv_flock_decl=yes
11627else
11628 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011629
11630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011632
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011633fi
11634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11635$as_echo "$ac_cv_flock_decl" >&6; }
11636if test "x${ac_cv_flock_decl}" = xyes; then
11637 for ac_func in flock
11638do :
11639 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011641 cat >>confdefs.h <<_ACEOF
11642#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011643_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011644
Antoine Pitroua3000072010-09-07 14:52:42 +000011645else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011647$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011648if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011649 $as_echo_n "(cached) " >&6
11650else
11651 ac_check_lib_save_LIBS=$LIBS
11652LIBS="-lbsd $LIBS"
11653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11654/* end confdefs.h. */
11655
11656/* Override any GCC internal prototype to avoid an error.
11657 Use char because int might match the return type of a GCC
11658 builtin and then its argument prototype would still apply. */
11659#ifdef __cplusplus
11660extern "C"
11661#endif
11662char flock ();
11663int
11664main ()
11665{
11666return flock ();
11667 ;
11668 return 0;
11669}
11670_ACEOF
11671if ac_fn_c_try_link "$LINENO"; then :
11672 ac_cv_lib_bsd_flock=yes
11673else
11674 ac_cv_lib_bsd_flock=no
11675fi
11676rm -f core conftest.err conftest.$ac_objext \
11677 conftest$ac_exeext conftest.$ac_ext
11678LIBS=$ac_check_lib_save_LIBS
11679fi
11680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11681$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011682if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011683 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011684
11685
11686$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11687
11688
11689fi
11690
11691
11692fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011693done
11694
Antoine Pitroua3000072010-09-07 14:52:42 +000011695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11698$as_echo_n "checking for getpagesize... " >&6; }
11699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011700/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011701
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011702#include <unistd.h>
11703
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011704int
11705main ()
11706{
11707void* p = getpagesize
11708 ;
11709 return 0;
11710}
11711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011712if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011715
Matthias Kloseb159a552010-04-25 21:00:44 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011718else
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11720$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011721
11722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011724
Victor Stinner984890f2011-11-24 13:53:38 +010011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11726$as_echo_n "checking for broken unsetenv... " >&6; }
11727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728/* end confdefs.h. */
11729
11730#include <stdlib.h>
11731
11732int
11733main ()
11734{
11735int res = unsetenv("DUMMY")
11736 ;
11737 return 0;
11738}
11739_ACEOF
11740if ac_fn_c_try_compile "$LINENO"; then :
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
11743else
11744
11745$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11746
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11748$as_echo "yes" >&6; }
11749
11750fi
11751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11752
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011753for ac_prog in true
11754do
11755 # Extract the first word of "$ac_prog", so it can be a program name with args.
11756set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011759if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011761else
11762 if test -n "$TRUE"; then
11763 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11764else
11765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11766for as_dir in $PATH
11767do
11768 IFS=$as_save_IFS
11769 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011772 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 $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 +000011774 break 2
11775 fi
11776done
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011779
11780fi
11781fi
11782TRUE=$ac_cv_prog_TRUE
11783if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11785$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011789fi
11790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011792 test -n "$TRUE" && break
11793done
11794test -n "$TRUE" || TRUE="/bin/true"
11795
11796
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11798$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011799if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801else
11802 ac_check_lib_save_LIBS=$LIBS
11803LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011807/* Override any GCC internal prototype to avoid an error.
11808 Use char because int might match the return type of a GCC
11809 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810#ifdef __cplusplus
11811extern "C"
11812#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011813char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011814int
11815main ()
11816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011817return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011818 ;
11819 return 0;
11820}
11821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823 ac_cv_lib_c_inet_aton=yes
11824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011826fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011827rm -f core conftest.err conftest.$ac_objext \
11828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011829LIBS=$ac_check_lib_save_LIBS
11830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11832$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011833if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011834 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11837$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011838if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840else
11841 ac_check_lib_save_LIBS=$LIBS
11842LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011844/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011846/* Override any GCC internal prototype to avoid an error.
11847 Use char because int might match the return type of a GCC
11848 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849#ifdef __cplusplus
11850extern "C"
11851#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011852char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011853int
11854main ()
11855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011862 ac_cv_lib_resolv_inet_aton=yes
11863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011866rm -f core conftest.err conftest.$ac_objext \
11867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011868LIBS=$ac_check_lib_save_LIBS
11869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11871$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011872if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011873 cat >>confdefs.h <<_ACEOF
11874#define HAVE_LIBRESOLV 1
11875_ACEOF
11876
11877 LIBS="-lresolv $LIBS"
11878
11879fi
11880
11881
11882fi
11883
11884
Christian Heimesd0764e22007-12-04 15:00:33 +000011885# On Tru64, chflags seems to be present, but calling it will
11886# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11888$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011889if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011891else
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011893 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011896/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011897
Christian Heimesd0764e22007-12-04 15:00:33 +000011898#include <sys/stat.h>
11899#include <unistd.h>
11900int main(int argc, char*argv[])
11901{
11902 if(chflags(argv[0], 0) != 0)
11903 return 1;
11904 return 0;
11905}
Ned Deily3eb67d52011-06-28 00:00:28 -070011906
Christian Heimesd0764e22007-12-04 15:00:33 +000011907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011915fi
11916
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011917
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11920$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011921if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011923if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011924 ac_cv_have_chflags="yes"
11925else
11926 ac_cv_have_chflags="no"
11927fi
11928
11929fi
11930if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011931
Matthias Kloseb9621712010-04-24 17:59:49 +000011932$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011933
11934fi
11935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11937$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011938if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011942 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011945/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011946
Christian Heimesd0764e22007-12-04 15:00:33 +000011947#include <sys/stat.h>
11948#include <unistd.h>
11949int main(int argc, char*argv[])
11950{
11951 if(lchflags(argv[0], 0) != 0)
11952 return 1;
11953 return 0;
11954}
Ned Deily3eb67d52011-06-28 00:00:28 -070011955
Christian Heimesd0764e22007-12-04 15:00:33 +000011956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011957if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011958 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011964fi
11965
11966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11969$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011970if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011973 ac_cv_have_lchflags="yes"
11974else
11975 ac_cv_have_lchflags="no"
11976fi
11977
11978fi
11979if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011982
11983fi
11984
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011985case $ac_sys_system/$ac_sys_release in
11986Darwin/*)
11987 _CUR_CFLAGS="${CFLAGS}"
11988 _CUR_LDFLAGS="${LDFLAGS}"
11989 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11990 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11991 ;;
11992esac
11993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11995$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011996if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011998else
11999 ac_check_lib_save_LIBS=$LIBS
12000LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012002/* end confdefs.h. */
12003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004/* Override any GCC internal prototype to avoid an error.
12005 Use char because int might match the return type of a GCC
12006 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007#ifdef __cplusplus
12008extern "C"
12009#endif
12010char inflateCopy ();
12011int
12012main ()
12013{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012015 ;
12016 return 0;
12017}
12018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012019if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012020 ac_cv_lib_z_inflateCopy=yes
12021else
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012024rm -f core conftest.err conftest.$ac_objext \
12025 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012026LIBS=$ac_check_lib_save_LIBS
12027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12029$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012030if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012033
12034fi
12035
12036
12037case $ac_sys_system/$ac_sys_release in
12038Darwin/*)
12039 CFLAGS="${_CUR_CFLAGS}"
12040 LDFLAGS="${_CUR_LDFLAGS}"
12041 ;;
12042esac
12043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12045$as_echo_n "checking for hstrerror... " >&6; }
12046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012048
Martin v. Löwise9416172003-05-03 10:12:45 +000012049#include <netdb.h>
12050
Martin v. Löwise9416172003-05-03 10:12:45 +000012051int
12052main ()
12053{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012055 ;
12056 return 0;
12057}
12058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012059if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
Matthias Kloseb9621712010-04-24 17:59:49 +000012061$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012062
Matthias Kloseb159a552010-04-25 21:00:44 +000012063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012064$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012065else
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012068
12069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012070rm -f core conftest.err conftest.$ac_objext \
12071 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12074$as_echo_n "checking for inet_aton... " >&6; }
12075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012077
Martin v. Löwis86d66262006-02-17 08:40:11 +000012078#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012079#include <sys/socket.h>
12080#include <netinet/in.h>
12081#include <arpa/inet.h>
12082
Martin v. Löwise9416172003-05-03 10:12:45 +000012083int
12084main ()
12085{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012086void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012087 ;
12088 return 0;
12089}
12090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012091if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012094
Matthias Kloseb159a552010-04-25 21:00:44 +000012095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012100
12101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102rm -f core conftest.err conftest.$ac_objext \
12103 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12106$as_echo_n "checking for inet_pton... " >&6; }
12107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012108/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012109
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012110#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012111#include <sys/socket.h>
12112#include <netinet/in.h>
12113#include <arpa/inet.h>
12114
Martin v. Löwise9416172003-05-03 10:12:45 +000012115int
12116main ()
12117{
12118void* p = inet_pton
12119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012124
Matthias Kloseb9621712010-04-24 17:59:49 +000012125$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012126
Matthias Kloseb159a552010-04-25 21:00:44 +000012127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012128$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012132
12133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012135
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012136# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12138$as_echo_n "checking for setgroups... " >&6; }
12139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012141
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012142#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012143#ifdef HAVE_GRP_H
12144#include <grp.h>
12145#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012146
Martin v. Löwisd5843682002-11-21 20:41:28 +000012147int
12148main ()
12149{
12150void* p = setgroups
12151 ;
12152 return 0;
12153}
12154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012156
Matthias Kloseb9621712010-04-24 17:59:49 +000012157$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012158
Matthias Kloseb159a552010-04-25 21:00:44 +000012159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012160$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012161else
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12163$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012164
12165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012167
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012168# check for openpty and forkpty
12169
12170for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012171do :
12172 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012173if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012175#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012176_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012178else
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12180$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183else
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012185LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189/* Override any GCC internal prototype to avoid an error.
12190 Use char because int might match the return type of a GCC
12191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012192#ifdef __cplusplus
12193extern "C"
12194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012195char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012196int
12197main ()
12198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 ;
12201 return 0;
12202}
12203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012209rm -f core conftest.err conftest.$ac_objext \
12210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012211LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12214$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012215if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012216 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012217 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12220$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223else
12224 ac_check_lib_save_LIBS=$LIBS
12225LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227/* end confdefs.h. */
12228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229/* Override any GCC internal prototype to avoid an error.
12230 Use char because int might match the return type of a GCC
12231 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012232#ifdef __cplusplus
12233extern "C"
12234#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012235char openpty ();
12236int
12237main ()
12238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012240 ;
12241 return 0;
12242}
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245 ac_cv_lib_bsd_openpty=yes
12246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012249rm -f core conftest.err conftest.$ac_objext \
12250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012251LIBS=$ac_check_lib_save_LIBS
12252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12254$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012255if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012257 LIBS="$LIBS -lbsd"
12258fi
12259
12260
12261fi
12262
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263
12264fi
12265done
12266
12267for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012268do :
12269 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012270if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012273_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275else
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12277$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012280else
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012282LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286/* Override any GCC internal prototype to avoid an error.
12287 Use char because int might match the return type of a GCC
12288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012289#ifdef __cplusplus
12290extern "C"
12291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012292char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012293int
12294main ()
12295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 ;
12298 return 0;
12299}
12300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012303else
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012308LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12311$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012314 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012315else
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12317$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012318if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320else
12321 ac_check_lib_save_LIBS=$LIBS
12322LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324/* end confdefs.h. */
12325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326/* Override any GCC internal prototype to avoid an error.
12327 Use char because int might match the return type of a GCC
12328 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012329#ifdef __cplusplus
12330extern "C"
12331#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012332char forkpty ();
12333int
12334main ()
12335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012336return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012342 ac_cv_lib_bsd_forkpty=yes
12343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012346rm -f core conftest.err conftest.$ac_objext \
12347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012348LIBS=$ac_check_lib_save_LIBS
12349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12351$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012352if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012354 LIBS="$LIBS -lbsd"
12355fi
12356
12357
12358fi
12359
Fred Drake8cef4cf2000-06-28 16:40:38 +000012360
12361fi
12362done
12363
Jack Jansendd19cf82001-12-06 22:36:17 +000012364
Michael W. Hudson54241132001-12-07 15:38:26 +000012365# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012366for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012367do :
12368 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12369ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012370if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012373_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012374
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012376done
12377
Michael W. Hudson54241132001-12-07 15:38:26 +000012378
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012379ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012380if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012381 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012382
Martin v. Löwis1142de32002-03-29 16:28:31 +000012383else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012385 *" dup2.$ac_objext "* ) ;;
12386 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012387 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012388esac
12389
Martin v. Löwis1142de32002-03-29 16:28:31 +000012390fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012391
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012392ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012394 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12395
12396else
12397 case " $LIBOBJS " in
12398 *" strdup.$ac_objext "* ) ;;
12399 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12400 ;;
12401esac
12402
12403fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012404
12405
12406for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012407do :
12408 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012427
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012430
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012432done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433
Jack Jansen150753c2003-03-29 22:07:47 +000012434for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012435do :
12436 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012437if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012438 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012442/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012443#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012444int
12445main ()
12446{
12447setpgrp(0,0);
12448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012455
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012458
12459fi
12460done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012461
Thomas Wouters3a584202000-08-05 23:28:51 +000012462for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012463do :
12464 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012471#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_compile "$LINENO"; then :
12481
Guido van Rossum627b2d71993-12-24 10:39:16 +000012482else
Skip Montanaro6dead952003-09-25 14:50:04 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Guido van Rossum627b2d71993-12-24 10:39:16 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012489
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012491done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492
Michael W. Hudson54241132001-12-07 15:38:26 +000012493
Victor Stinnere0be4232011-10-25 13:06:09 +020012494for ac_func in clock_gettime
12495do :
12496 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12497if test "x$ac_cv_func_clock_gettime" = xyes; then :
12498 cat >>confdefs.h <<_ACEOF
12499#define HAVE_CLOCK_GETTIME 1
12500_ACEOF
12501
12502else
12503
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12505$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12506if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12507 $as_echo_n "(cached) " >&6
12508else
12509 ac_check_lib_save_LIBS=$LIBS
12510LIBS="-lrt $LIBS"
12511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h. */
12513
12514/* Override any GCC internal prototype to avoid an error.
12515 Use char because int might match the return type of a GCC
12516 builtin and then its argument prototype would still apply. */
12517#ifdef __cplusplus
12518extern "C"
12519#endif
12520char clock_gettime ();
12521int
12522main ()
12523{
12524return clock_gettime ();
12525 ;
12526 return 0;
12527}
12528_ACEOF
12529if ac_fn_c_try_link "$LINENO"; then :
12530 ac_cv_lib_rt_clock_gettime=yes
12531else
12532 ac_cv_lib_rt_clock_gettime=no
12533fi
12534rm -f core conftest.err conftest.$ac_objext \
12535 conftest$ac_exeext conftest.$ac_ext
12536LIBS=$ac_check_lib_save_LIBS
12537fi
12538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12539$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12540if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12541
Victor Stinner7efb8332014-08-29 15:41:08 +020012542 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012543 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12544
12545
12546$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12547
12548
12549fi
12550
12551
12552fi
12553done
12554
12555
12556for ac_func in clock_getres
12557do :
12558 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12559if test "x$ac_cv_func_clock_getres" = xyes; then :
12560 cat >>confdefs.h <<_ACEOF
12561#define HAVE_CLOCK_GETRES 1
12562_ACEOF
12563
12564else
12565
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12567$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12568if ${ac_cv_lib_rt_clock_getres+:} false; then :
12569 $as_echo_n "(cached) " >&6
12570else
12571 ac_check_lib_save_LIBS=$LIBS
12572LIBS="-lrt $LIBS"
12573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574/* end confdefs.h. */
12575
12576/* Override any GCC internal prototype to avoid an error.
12577 Use char because int might match the return type of a GCC
12578 builtin and then its argument prototype would still apply. */
12579#ifdef __cplusplus
12580extern "C"
12581#endif
12582char clock_getres ();
12583int
12584main ()
12585{
12586return clock_getres ();
12587 ;
12588 return 0;
12589}
12590_ACEOF
12591if ac_fn_c_try_link "$LINENO"; then :
12592 ac_cv_lib_rt_clock_getres=yes
12593else
12594 ac_cv_lib_rt_clock_getres=no
12595fi
12596rm -f core conftest.err conftest.$ac_objext \
12597 conftest$ac_exeext conftest.$ac_ext
12598LIBS=$ac_check_lib_save_LIBS
12599fi
12600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12601$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12602if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12603
12604 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12605
12606
12607fi
12608
12609
12610fi
12611done
12612
12613
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012614for ac_func in clock_settime
12615do :
12616 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12617if test "x$ac_cv_func_clock_settime" = xyes; then :
12618 cat >>confdefs.h <<_ACEOF
12619#define HAVE_CLOCK_SETTIME 1
12620_ACEOF
12621
12622else
12623
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12625$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12626if ${ac_cv_lib_rt_clock_settime+:} false; then :
12627 $as_echo_n "(cached) " >&6
12628else
12629 ac_check_lib_save_LIBS=$LIBS
12630LIBS="-lrt $LIBS"
12631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12632/* end confdefs.h. */
12633
12634/* Override any GCC internal prototype to avoid an error.
12635 Use char because int might match the return type of a GCC
12636 builtin and then its argument prototype would still apply. */
12637#ifdef __cplusplus
12638extern "C"
12639#endif
12640char clock_settime ();
12641int
12642main ()
12643{
12644return clock_settime ();
12645 ;
12646 return 0;
12647}
12648_ACEOF
12649if ac_fn_c_try_link "$LINENO"; then :
12650 ac_cv_lib_rt_clock_settime=yes
12651else
12652 ac_cv_lib_rt_clock_settime=no
12653fi
12654rm -f core conftest.err conftest.$ac_objext \
12655 conftest$ac_exeext conftest.$ac_ext
12656LIBS=$ac_check_lib_save_LIBS
12657fi
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12659$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12660if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12661
12662 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12663
12664
12665fi
12666
12667
12668fi
12669done
12670
12671
Matthias Kloseb9621712010-04-24 17:59:49 +000012672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12673$as_echo_n "checking for major... " >&6; }
12674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012676
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012677#if defined(MAJOR_IN_MKDEV)
12678#include <sys/mkdev.h>
12679#elif defined(MAJOR_IN_SYSMACROS)
12680#include <sys/sysmacros.h>
12681#else
12682#include <sys/types.h>
12683#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012684
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012685int
12686main ()
12687{
12688
12689 makedev(major(0),minor(0));
12690
12691 ;
12692 return 0;
12693}
12694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012696
12697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12701$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012702
12703else
Skip Montanaro6dead952003-09-25 14:50:04 +000012704
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12706$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012707
12708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012709rm -f core conftest.err conftest.$ac_objext \
12710 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012711
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012712# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012713# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12715$as_echo_n "checking for getaddrinfo... " >&6; }
12716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012717/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012718
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012719#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012720#include <sys/socket.h>
12721#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012722#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012723
Martin v. Löwis11437992002-04-12 09:54:03 +000012724int
12725main ()
12726{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012727getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ;
12729 return 0;
12730}
12731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012732if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012733 have_getaddrinfo=yes
12734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737rm -f core conftest.err conftest.$ac_objext \
12738 conftest$ac_exeext conftest.$ac_ext
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12740$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012741if test $have_getaddrinfo = yes
12742then
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12744$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012745 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012747else
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012749
12750if test "${enable_ipv6+set}" = set; then
12751 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12752else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012753 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012754fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012757/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012758
Stefan Krah19c21392012-11-22 23:47:32 +010012759#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760#include <sys/types.h>
12761#include <netdb.h>
12762#include <string.h>
12763#include <sys/socket.h>
12764#include <netinet/in.h>
12765
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012766int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012767{
12768 int passive, gaierr, inet4 = 0, inet6 = 0;
12769 struct addrinfo hints, *ai, *aitop;
12770 char straddr[INET6_ADDRSTRLEN], strport[16];
12771
12772 for (passive = 0; passive <= 1; passive++) {
12773 memset(&hints, 0, sizeof(hints));
12774 hints.ai_family = AF_UNSPEC;
12775 hints.ai_flags = passive ? AI_PASSIVE : 0;
12776 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012777 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12779 (void)gai_strerror(gaierr);
12780 goto bad;
12781 }
12782 for (ai = aitop; ai; ai = ai->ai_next) {
12783 if (ai->ai_addr == NULL ||
12784 ai->ai_addrlen == 0 ||
12785 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12786 straddr, sizeof(straddr), strport, sizeof(strport),
12787 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12788 goto bad;
12789 }
12790 switch (ai->ai_family) {
12791 case AF_INET:
12792 if (strcmp(strport, "54321") != 0) {
12793 goto bad;
12794 }
12795 if (passive) {
12796 if (strcmp(straddr, "0.0.0.0") != 0) {
12797 goto bad;
12798 }
12799 } else {
12800 if (strcmp(straddr, "127.0.0.1") != 0) {
12801 goto bad;
12802 }
12803 }
12804 inet4++;
12805 break;
12806 case AF_INET6:
12807 if (strcmp(strport, "54321") != 0) {
12808 goto bad;
12809 }
12810 if (passive) {
12811 if (strcmp(straddr, "::") != 0) {
12812 goto bad;
12813 }
12814 } else {
12815 if (strcmp(straddr, "::1") != 0) {
12816 goto bad;
12817 }
12818 }
12819 inet6++;
12820 break;
12821 case AF_UNSPEC:
12822 goto bad;
12823 break;
12824 default:
12825 /* another family support? */
12826 break;
12827 }
12828 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012829 freeaddrinfo(aitop);
12830 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012831 }
12832
12833 if (!(inet4 == 0 || inet4 == 2))
12834 goto bad;
12835 if (!(inet6 == 0 || inet6 == 2))
12836 goto bad;
12837
12838 if (aitop)
12839 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012840 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841
12842 bad:
12843 if (aitop)
12844 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012845 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012846}
12847
Martin v. Löwis11437992002-04-12 09:54:03 +000012848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012850 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012858fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012859
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12863$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12864
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012865if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012866then
12867 if test $ipv6 = yes
12868 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012869 echo 'Fatal: You must get working getaddrinfo() function.'
12870 echo ' or you can specify "--disable-ipv6"'.
12871 exit 1
12872 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012873else
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012876
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012877fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012878
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012879for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012880do :
12881 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012882if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012885_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012886
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012887fi
12888done
12889
Michael W. Hudson54241132001-12-07 15:38:26 +000012890
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12893$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012894if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012899#include <sys/types.h>
12900#include <sys/time.h>
12901#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
Martin v. Löwis11437992002-04-12 09:54:03 +000012903int
12904main ()
12905{
12906if ((struct tm *) 0)
12907return 0;
12908 ;
12909 return 0;
12910}
12911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012913 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12920$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012921if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012924
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12928$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012929if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934#include <sys/types.h>
12935#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
Martin v. Löwis11437992002-04-12 09:54:03 +000012937int
12938main ()
12939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940struct tm tm;
12941 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ;
12944 return 0;
12945}
12946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948 ac_cv_struct_tm=time.h
12949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12955$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012956if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959
12960fi
12961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962ac_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 +000012963#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965"
Victor Stinnere0be4232011-10-25 13:06:09 +020012966if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
12968cat >>confdefs.h <<_ACEOF
12969#define HAVE_STRUCT_TM_TM_ZONE 1
12970_ACEOF
12971
12972
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012973fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978
12979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12981"
Victor Stinnere0be4232011-10-25 13:06:09 +020012982if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986fi
12987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012989#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990_ACEOF
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12993$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012994if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012998/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012999#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000#if !HAVE_DECL_TZNAME
13001extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Martin v. Löwis11437992002-04-12 09:54:03 +000013004int
13005main ()
13006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013 ac_cv_var_tzname=yes
13014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017rm -f core conftest.err conftest.$ac_objext \
13018 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13021$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013022 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013025
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026 fi
13027fi
13028
Matthias Kloseb9621712010-04-24 17:59:49 +000013029ac_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 +020013030if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013031
13032cat >>confdefs.h <<_ACEOF
13033#define HAVE_STRUCT_STAT_ST_RDEV 1
13034_ACEOF
13035
13036
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013037fi
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039ac_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 +020013040if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013041
Martin v. Löwis11437992002-04-12 09:54:03 +000013042cat >>confdefs.h <<_ACEOF
13043#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13044_ACEOF
13045
13046
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013047fi
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049ac_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 +020013050if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013051
13052cat >>confdefs.h <<_ACEOF
13053#define HAVE_STRUCT_STAT_ST_FLAGS 1
13054_ACEOF
13055
13056
13057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059ac_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 +020013060if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013061
13062cat >>confdefs.h <<_ACEOF
13063#define HAVE_STRUCT_STAT_ST_GEN 1
13064_ACEOF
13065
13066
13067fi
13068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069ac_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 +020013070if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013071
13072cat >>confdefs.h <<_ACEOF
13073#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13074_ACEOF
13075
13076
13077fi
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079ac_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 +020013080if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082cat >>confdefs.h <<_ACEOF
13083#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13084_ACEOF
13085
13086
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013087fi
13088
Stefan Krah267b6392016-04-26 01:09:18 +020013089ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13090 #include <sys/types.h>
13091 #include <pwd.h>
13092
13093"
13094if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13095
13096cat >>confdefs.h <<_ACEOF
13097#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13098_ACEOF
13099
13100
13101fi
13102ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13103 #include <sys/types.h>
13104 #include <pwd.h>
13105
13106"
13107if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13108
13109cat >>confdefs.h <<_ACEOF
13110#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13111_ACEOF
13112
13113
13114fi
13115
Zachary Ware6a6967e2016-10-01 00:47:27 -050013116# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13117ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13118"
13119if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13120
13121cat >>confdefs.h <<_ACEOF
13122#define HAVE_SIGINFO_T_SI_BAND 1
13123_ACEOF
13124
13125
13126fi
13127
Michael W. Hudson54241132001-12-07 15:38:26 +000013128
Matthias Kloseb9621712010-04-24 17:59:49 +000013129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13130$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013131if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133else
Matthias Kloseb159a552010-04-25 21:00:44 +000013134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013136/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013137#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013138int
13139main ()
13140{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013141return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ;
13143 return 0;
13144}
13145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013146if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013147 ac_cv_header_time_altzone=yes
13148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153fi
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13156$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Matthias Kloseb9621712010-04-24 17:59:49 +000013159$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160
13161fi
13162
Guido van Rossumda88dad1995-01-26 00:46:29 +000013163was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13165$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013167/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013168
13169#include <sys/types.h>
13170#include <sys/select.h>
13171#include <sys/time.h>
13172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173int
13174main ()
13175{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176;
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ;
13178 return 0;
13179}
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013186 was_it_defined=yes
13187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13191$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13194$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013195if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013196 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013197else
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013199/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013200#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013201int
13202main ()
13203{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 ;
13206 return 0;
13207}
13208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013210 ac_cv_struct_addrinfo=yes
13211else
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13215fi
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13218$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013219if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222
13223fi
13224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13226$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013227if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229else
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232
13233# include <sys/types.h>
13234# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013235int
13236main ()
13237{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 ;
13240 return 0;
13241}
13242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244 ac_cv_struct_sockaddr_storage=yes
13245else
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13249fi
13250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13252$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013256
13257fi
13258
Christian Heimesdffa3942016-09-05 23:54:41 +020013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13260$as_echo_n "checking for sockaddr_alg... " >&6; }
13261if ${ac_cv_struct_sockaddr_alg+:} false; then :
13262 $as_echo_n "(cached) " >&6
13263else
13264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13265/* end confdefs.h. */
13266
13267# include <sys/types.h>
13268# include <sys/socket.h>
13269# include <linux/if_alg.h>
13270int
13271main ()
13272{
13273struct sockaddr_alg s
13274 ;
13275 return 0;
13276}
13277_ACEOF
13278if ac_fn_c_try_compile "$LINENO"; then :
13279 ac_cv_struct_sockaddr_alg=yes
13280else
13281 ac_cv_struct_sockaddr_alg=no
13282fi
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284fi
13285
13286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13287$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13288if test $ac_cv_struct_sockaddr_alg = yes; then
13289
13290$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13291
13292fi
13293
Guido van Rossum627b2d71993-12-24 10:39:16 +000013294# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13297$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013298if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013303$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013304int
13305main ()
13306{
13307static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013308test_array [0] = 0;
13309return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
13311 ;
13312 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013313}
Martin v. Löwis11437992002-04-12 09:54:03 +000013314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013316 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13323$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326
13327fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13330$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013331if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013333else
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013342 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013344 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346 char const *const *pcpcc;
13347 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 /* NEC SVR4.0.2 mips cc rejects this. */
13349 struct point {int x, y;};
13350 static struct point const zero = {0,0};
13351 /* AIX XL C 1.02.0.0 rejects this.
13352 It does not let you subtract one const X* pointer from another in
13353 an arm of an if-expression whose if-part is not a constant
13354 expression */
13355 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 ++pcpcc;
13359 ppc = (char**) pcpcc;
13360 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013361 { /* SCO 3.2v4 cc rejects this sort of thing. */
13362 char tx;
13363 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 }
13369 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13370 int x[] = {25, 17};
13371 const int *foo = &x[0];
13372 ++foo;
13373 }
13374 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13375 typedef const int *iptr;
13376 iptr p = 0;
13377 ++p;
13378 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013379 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013381 struct s { int j; const int *ap[3]; } bx;
13382 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 }
13384 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13385 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013389#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013393}
Martin v. Löwis11437992002-04-12 09:54:03 +000013394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013395if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396 ac_cv_c_const=yes
13397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13403$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013404if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407
13408fi
13409
Michael W. Hudson54241132001-12-07 15:38:26 +000013410
Guido van Rossumda88dad1995-01-26 00:46:29 +000013411works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13413$as_echo_n "checking for working signed char... " >&6; }
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013415/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417int
13418main ()
13419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 ;
13422 return 0;
13423}
13424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013426 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013427else
Skip Montanaro6dead952003-09-25 14:50:04 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013430
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013431
Guido van Rossum7f43da71994-08-01 12:15:30 +000013432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13435$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013436
Guido van Rossumda88dad1995-01-26 00:46:29 +000013437have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13439$as_echo_n "checking for prototypes... " >&6; }
13440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013441/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013442int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013443int
13444main ()
13445{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013446return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 ;
13448 return 0;
13449}
13450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013454
Matthias Kloseb159a552010-04-25 21:00:44 +000013455 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13459$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460
Guido van Rossumda88dad1995-01-26 00:46:29 +000013461works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13463$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013465/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013466
13467#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013468int foo(int x, ...) {
13469 va_list va;
13470 va_start(va, x);
13471 va_arg(va, int);
13472 va_arg(va, char *);
13473 va_arg(va, double);
13474 return 0;
13475}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477int
13478main ()
13479{
Guido van Rossum90eea071996-08-30 20:58:57 +000013480return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 ;
13482 return 0;
13483}
13484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
13487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013489
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013490 works=yes
13491
Guido van Rossum627b2d71993-12-24 10:39:16 +000013492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13495$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013496
Martin v. Löwisd6320502004-08-12 13:45:08 +000013497# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13499$as_echo_n "checking for socketpair... " >&6; }
13500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013501/* end confdefs.h. */
13502
13503#include <sys/types.h>
13504#include <sys/socket.h>
13505
13506int
13507main ()
13508{
13509void *x=socketpair
13510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013517
Matthias Kloseb159a552010-04-25 21:00:44 +000013518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013519$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013520else
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13522$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013523
13524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013526
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13529$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013532#include <sys/types.h>
13533#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013534int
13535main ()
13536{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013537struct sockaddr x;
13538x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ;
13540 return 0;
13541}
13542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013543if ac_fn_c_try_compile "$LINENO"; then :
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13545$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013548
13549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13551$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013552
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013556# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
13558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013560if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13565$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013566 OLD_CFLAGS=$CFLAGS
13567 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013569/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013570
13571# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Martin v. Löwis11437992002-04-12 09:54:03 +000013573int
13574main ()
13575{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013576
13577 char *name;
13578 struct hostent *he, *res;
13579 char buffer[2048];
13580 int buflen = 2048;
13581 int h_errnop;
13582
13583 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
13585 ;
13586 return 0;
13587}
13588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13597$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013598
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013599else
Skip Montanaro6dead952003-09-25 14:50:04 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13602$as_echo "no" >&6; }
13603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13604$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013608# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610int
13611main ()
13612{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013613
13614 char *name;
13615 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013616 char buffer[2048];
13617 int buflen = 2048;
13618 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619
Matthias Kloseb159a552010-04-25 21:00:44 +000013620 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013621
13622 ;
13623 return 0;
13624}
13625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013629
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Matthias Kloseb159a552010-04-25 21:00:44 +000013631$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13634$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013636else
Skip Montanaro6dead952003-09-25 14:50:04 +000013637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13639$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13641$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643/* end confdefs.h. */
13644
13645# include <netdb.h>
13646
13647int
13648main ()
13649{
13650
13651 char *name;
13652 struct hostent *he;
13653 struct hostent_data data;
13654
13655 (void) gethostbyname_r(name, he, &data);
13656
13657 ;
13658 return 0;
13659}
13660_ACEOF
13661if ac_fn_c_try_compile "$LINENO"; then :
13662
13663 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13664
13665
13666$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13667
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13669$as_echo "yes" >&6; }
13670
13671else
13672
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13674$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013684 CFLAGS=$OLD_CFLAGS
13685
13686else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 for ac_func in gethostbyname
13689do :
13690 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013691if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013692 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013693#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013694_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013696fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013697done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013698
Michael W. Hudson54241132001-12-07 15:38:26 +000013699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013700fi
13701
Michael W. Hudson54241132001-12-07 15:38:26 +000013702
13703
13704
13705
13706
13707
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708# checks for system services
13709# (none yet)
13710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013712ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013713if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013714
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13717$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013718if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013720else
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013722LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726/* Override any GCC internal prototype to avoid an error.
13727 Use char because int might match the return type of a GCC
13728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013729#ifdef __cplusplus
13730extern "C"
13731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013732char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013733int
13734main ()
13735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 ;
13738 return 0;
13739}
13740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013746rm -f core conftest.err conftest.$ac_objext \
13747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13751$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013752if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 cat >>confdefs.h <<_ACEOF
13754#define HAVE_LIBIEEE 1
13755_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013757 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013758
Guido van Rossum627b2d71993-12-24 10:39:16 +000013759fi
13760
Michael W. Hudson54241132001-12-07 15:38:26 +000013761
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013762fi
13763
Michael W. Hudson54241132001-12-07 15:38:26 +000013764
Guido van Rossum7f43da71994-08-01 12:15:30 +000013765# check for --with-libm=...
13766
Guido van Rossum563e7081996-09-10 18:20:48 +000013767case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013768Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013769*) LIBM=-lm
13770esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13772$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013776 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013777if test "$withval" = no
13778then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13780$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013781elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013782then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13784$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013785else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013786fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13789$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790fi
13791
Guido van Rossum7f43da71994-08-01 12:15:30 +000013792
13793# check for --with-libc=...
13794
Matthias Kloseb9621712010-04-24 17:59:49 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13796$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013801if test "$withval" = no
13802then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13804$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013805elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013806then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13808$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013809else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013810fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013811else
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13813$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814fi
13815
Guido van Rossum7f43da71994-08-01 12:15:30 +000013816
Stefan Krah1919b7e2012-03-21 18:25:23 +010013817# **************************************
13818# * Check for gcc x64 inline assembler *
13819# **************************************
13820
13821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13822$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824/* end confdefs.h. */
13825
13826int
13827main ()
13828{
13829
13830 __asm__ __volatile__ ("movq %rcx, %rax");
13831
13832 ;
13833 return 0;
13834}
13835_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013836if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013837 have_gcc_asm_for_x64=yes
13838else
13839 have_gcc_asm_for_x64=no
13840fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013841rm -f core conftest.err conftest.$ac_objext \
13842 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13844$as_echo "$have_gcc_asm_for_x64" >&6; }
13845if test "$have_gcc_asm_for_x64" = yes
13846then
13847
13848$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13849
13850fi
13851
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852# **************************************************
13853# * Check for various properties of floating point *
13854# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13857$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013858if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860else
13861
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013863 ac_cv_little_endian_double=no
13864else
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866/* end confdefs.h. */
13867
13868#include <string.h>
13869int main() {
13870 double x = 9006104071832581.0;
13871 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13872 return 0;
13873 else
13874 return 1;
13875}
13876
13877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879 ac_cv_little_endian_double=yes
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885fi
13886
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013887fi
13888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13890$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013891if test "$ac_cv_little_endian_double" = yes
13892then
13893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895
13896fi
13897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13899$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013900if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902else
13903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905 ac_cv_big_endian_double=no
13906else
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013908/* end confdefs.h. */
13909
13910#include <string.h>
13911int main() {
13912 double x = 9006104071832581.0;
13913 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13914 return 0;
13915 else
13916 return 1;
13917}
13918
13919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013921 ac_cv_big_endian_double=yes
13922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927fi
13928
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929fi
13930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13932$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933if test "$ac_cv_big_endian_double" = yes
13934then
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013937
13938fi
13939
13940# Some ARM platforms use a mixed-endian representation for doubles.
13941# While Python doesn't currently have full support for these platforms
13942# (see e.g., issue 1762561), we can at least make sure that float <-> string
13943# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13945$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013946if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948else
13949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951 ac_cv_mixed_endian_double=no
13952else
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954/* end confdefs.h. */
13955
13956#include <string.h>
13957int main() {
13958 double x = 9006104071832581.0;
13959 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13960 return 0;
13961 else
13962 return 1;
13963}
13964
13965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013966if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967 ac_cv_mixed_endian_double=yes
13968else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973fi
13974
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013975fi
13976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13978$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979if test "$ac_cv_mixed_endian_double" = yes
13980then
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013983
13984fi
13985
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013986# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013987# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013988# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013989# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013990# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013991# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013992
13993# This inline assembler syntax may also work for suncc and icc,
13994# so we try it on all platforms.
13995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13997$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013999/* end confdefs.h. */
14000
14001int
14002main ()
14003{
14004
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014005 unsigned short cw;
14006 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14007 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008
14009 ;
14010 return 0;
14011}
14012_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014013if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014 have_gcc_asm_for_x87=yes
14015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014018rm -f core conftest.err conftest.$ac_objext \
14019 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14021$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014022if test "$have_gcc_asm_for_x87" = yes
14023then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014027fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14030$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032/* end confdefs.h. */
14033
14034int
14035main ()
14036{
14037
14038 unsigned int fpcr;
14039 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14040 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14041
14042 ;
14043 return 0;
14044}
14045_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014046if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014047 have_gcc_asm_for_mc68881=yes
14048else
14049 have_gcc_asm_for_mc68881=no
14050fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014051rm -f core conftest.err conftest.$ac_objext \
14052 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14054$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14055if test "$have_gcc_asm_for_mc68881" = yes
14056then
14057
14058$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14059
14060fi
14061
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014062# Detect whether system arithmetic is subject to x87-style double
14063# rounding issues. The result of this test has little meaning on non
14064# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14065# mode is round-to-nearest and double rounding issues are present, and
14066# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14068$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014069# $BASECFLAGS may affect the result
14070ac_save_cc="$CC"
14071CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014072if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014073 ac_cv_x87_double_rounding=no
14074else
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014076/* end confdefs.h. */
14077
14078#include <stdlib.h>
14079#include <math.h>
14080int main() {
14081 volatile double x, y, z;
14082 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14083 x = 0.99999999999999989; /* 1-2**-53 */
14084 y = 1./x;
14085 if (y != 1.)
14086 exit(0);
14087 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14088 x = 1e16;
14089 y = 2.99999;
14090 z = x + y;
14091 if (z != 1e16+4.)
14092 exit(0);
14093 /* both tests show evidence of double rounding */
14094 exit(1);
14095}
14096
14097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014098if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014099 ac_cv_x87_double_rounding=no
14100else
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14104 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014105fi
14106
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014107CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14109$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014110if test "$ac_cv_x87_double_rounding" = yes
14111then
14112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014114
14115fi
14116
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014117# ************************************
14118# * Check for mathematical functions *
14119# ************************************
14120
14121LIBS_SAVE=$LIBS
14122LIBS="$LIBS $LIBM"
14123
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014124for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14125do :
14126 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14127ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014128if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014129 cat >>confdefs.h <<_ACEOF
14130#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14131_ACEOF
14132
14133fi
14134done
14135
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014136for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014137do :
14138 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14139ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014140if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014141 cat >>confdefs.h <<_ACEOF
14142#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14143_ACEOF
14144
14145fi
14146done
14147
14148ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14149"
Victor Stinnere0be4232011-10-25 13:06:09 +020014150if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014151 ac_have_decl=1
14152else
14153 ac_have_decl=0
14154fi
14155
14156cat >>confdefs.h <<_ACEOF
14157#define HAVE_DECL_ISINF $ac_have_decl
14158_ACEOF
14159ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14160"
Victor Stinnere0be4232011-10-25 13:06:09 +020014161if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014162 ac_have_decl=1
14163else
14164 ac_have_decl=0
14165fi
14166
14167cat >>confdefs.h <<_ACEOF
14168#define HAVE_DECL_ISNAN $ac_have_decl
14169_ACEOF
14170ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14171"
Victor Stinnere0be4232011-10-25 13:06:09 +020014172if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014173 ac_have_decl=1
14174else
14175 ac_have_decl=0
14176fi
14177
14178cat >>confdefs.h <<_ACEOF
14179#define HAVE_DECL_ISFINITE $ac_have_decl
14180_ACEOF
14181
14182
Mark Dickinsona614f042009-11-28 12:48:43 +000014183# For multiprocessing module, check that sem_open
14184# actually works. For FreeBSD versions <= 7.2,
14185# the kernel module that provides POSIX semaphores
14186# isn't loaded by default, so an attempt to call
14187# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14189$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014190if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014194 ac_cv_posix_semaphores_enabled=yes
14195else
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014197/* end confdefs.h. */
14198
14199#include <unistd.h>
14200#include <fcntl.h>
14201#include <stdio.h>
14202#include <semaphore.h>
14203#include <sys/stat.h>
14204
14205int main(void) {
14206 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14207 if (a == SEM_FAILED) {
14208 perror("sem_open");
14209 return 1;
14210 }
14211 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014212 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014213 return 0;
14214}
14215
14216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014217if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014218 ac_cv_posix_semaphores_enabled=yes
14219else
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014224fi
14225
14226
Mark Dickinsona614f042009-11-28 12:48:43 +000014227fi
14228
Matthias Kloseb9621712010-04-24 17:59:49 +000014229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14230$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014231if test $ac_cv_posix_semaphores_enabled = no
14232then
14233
Matthias Kloseb9621712010-04-24 17:59:49 +000014234$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014235
14236fi
14237
Mark Dickinson10683072009-04-18 21:18:19 +000014238# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14240$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014241if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014245 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014246else
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014248/* end confdefs.h. */
14249
14250#include <unistd.h>
14251#include <fcntl.h>
14252#include <stdio.h>
14253#include <semaphore.h>
14254#include <sys/stat.h>
14255
14256int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014257 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014258 int count;
14259 int res;
14260 if(a==SEM_FAILED){
14261 perror("sem_open");
14262 return 1;
14263
14264 }
14265 res = sem_getvalue(a, &count);
14266 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014267 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014268 return res==-1 ? 1 : 0;
14269}
14270
Mark Dickinson10683072009-04-18 21:18:19 +000014271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014272if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014274else
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14278 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014279fi
14280
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014282fi
14283
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14285$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014286if test $ac_cv_broken_sem_getvalue = yes
14287then
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014290
14291fi
14292
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014293ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14294"
14295if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14296 ac_have_decl=1
14297else
14298 ac_have_decl=0
14299fi
14300
14301cat >>confdefs.h <<_ACEOF
14302#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14303_ACEOF
14304ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14305"
14306if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14307 ac_have_decl=1
14308else
14309 ac_have_decl=0
14310fi
14311
14312cat >>confdefs.h <<_ACEOF
14313#define HAVE_DECL_RTLD_NOW $ac_have_decl
14314_ACEOF
14315ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14316"
14317if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14318 ac_have_decl=1
14319else
14320 ac_have_decl=0
14321fi
14322
14323cat >>confdefs.h <<_ACEOF
14324#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14325_ACEOF
14326ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14327"
14328if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14329 ac_have_decl=1
14330else
14331 ac_have_decl=0
14332fi
14333
14334cat >>confdefs.h <<_ACEOF
14335#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14336_ACEOF
14337ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14338"
14339if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14340 ac_have_decl=1
14341else
14342 ac_have_decl=0
14343fi
14344
14345cat >>confdefs.h <<_ACEOF
14346#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14347_ACEOF
14348ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14349"
14350if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14351 ac_have_decl=1
14352else
14353 ac_have_decl=0
14354fi
14355
14356cat >>confdefs.h <<_ACEOF
14357#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14358_ACEOF
14359ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14360"
14361if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14362 ac_have_decl=1
14363else
14364 ac_have_decl=0
14365fi
14366
14367cat >>confdefs.h <<_ACEOF
14368#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14369_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014370ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14371"
14372if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14373 ac_have_decl=1
14374else
14375 ac_have_decl=0
14376fi
14377
14378cat >>confdefs.h <<_ACEOF
14379#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14380_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014381
14382
Mark Dickinsonbd792642009-03-18 20:06:12 +000014383# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14385$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014386# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014387if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014388 enableval=$enable_big_digits; case $enable_big_digits in
14389yes)
14390 enable_big_digits=30 ;;
14391no)
14392 enable_big_digits=15 ;;
1439315|30)
14394 ;;
14395*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014396 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 +000014397esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14399$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014400
14401cat >>confdefs.h <<_ACEOF
14402#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14403_ACEOF
14404
14405
14406else
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14408$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014409fi
14410
14411
Guido van Rossumef2255b2000-03-10 22:30:29 +000014412# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014413ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014414if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
14416
Matthias Kloseb9621712010-04-24 17:59:49 +000014417$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014419 wchar_h="yes"
14420
Guido van Rossumef2255b2000-03-10 22:30:29 +000014421else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014423
14424fi
14425
Michael W. Hudson54241132001-12-07 15:38:26 +000014426
Martin v. Löwis11437992002-04-12 09:54:03 +000014427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014428# determine wchar_t size
14429if test "$wchar_h" = yes
14430then
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14433# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14434# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14436$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014437if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14441"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 if test "$ac_cv_type_wchar_t" = yes; then
14445 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014447as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014448See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 else
14450 ac_cv_sizeof_wchar_t=0
14451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014453
Martin v. Löwis11437992002-04-12 09:54:03 +000014454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14456$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457
14458
14459
Martin v. Löwis11437992002-04-12 09:54:03 +000014460cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014461#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014463
Michael W. Hudson54241132001-12-07 15:38:26 +000014464
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014465fi
14466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14468$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014469have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014471/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014472
14473#include <tcl.h>
14474#if TCL_UTF_MAX != 6
14475# error "NOT UCS4_TCL"
14476#endif
14477int
14478main ()
14479{
14480
14481 ;
14482 return 0;
14483}
14484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014486
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014489
14490 have_ucs4_tcl=yes
14491
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14495$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014496
Skip Montanaro6dead952003-09-25 14:50:04 +000014497# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014498if test "$wchar_h" = yes
14499then
14500 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14502$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014503 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014505else
14506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014508 ac_cv_wchar_t_signed=yes
14509else
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014511/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014512
14513 #include <wchar.h>
14514 int main()
14515 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014516 /* Success: exit code 0 */
14517 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014518 }
14519
14520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014521if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014522 ac_cv_wchar_t_signed=yes
14523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014528fi
14529
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014530fi
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14533$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534fi
14535
Michael Osipov3738fad2018-08-24 18:17:19 +020014536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14537$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014538# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014539if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014540 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014541then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014544
Michael Osipov3738fad2018-08-24 18:17:19 +020014545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14546$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014547else
Michael Osipov3738fad2018-08-24 18:17:19 +020014548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14549$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014550fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014551
14552# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14554$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014555if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 ac_cv_c_bigendian=unknown
14559 # See if we're dealing with a universal compiler.
14560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14561/* end confdefs.h. */
14562#ifndef __APPLE_CC__
14563 not a universal capable compiler
14564 #endif
14565 typedef int dummy;
14566
Skip Montanaro6dead952003-09-25 14:50:04 +000014567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014568if ac_fn_c_try_compile "$LINENO"; then :
14569
14570 # Check for potential -arch flags. It is not universal unless
14571 # there are at least two -arch flags with different values.
14572 ac_arch=
14573 ac_prev=
14574 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14575 if test -n "$ac_prev"; then
14576 case $ac_word in
14577 i?86 | x86_64 | ppc | ppc64)
14578 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14579 ac_arch=$ac_word
14580 else
14581 ac_cv_c_bigendian=universal
14582 break
14583 fi
14584 ;;
14585 esac
14586 ac_prev=
14587 elif test "x$ac_word" = "x-arch"; then
14588 ac_prev=arch
14589 fi
14590 done
14591fi
14592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14593 if test $ac_cv_c_bigendian = unknown; then
14594 # See if sys/param.h defines the BYTE_ORDER macro.
14595 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{
Matthias Kloseb9621712010-04-24 17:59:49 +000014603#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14604 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14605 && LITTLE_ENDIAN)
14606 bogus endian macros
14607 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
14609 ;
14610 return 0;
14611}
14612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014613if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014614 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014616/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620int
14621main ()
14622{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014623#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 not big endian
14625 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627 ;
14628 return 0;
14629}
14630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014631if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014632 ac_cv_c_bigendian=yes
14633else
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014637fi
14638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14639 fi
14640 if test $ac_cv_c_bigendian = unknown; then
14641 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014643/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014644#include <limits.h>
14645
Martin v. Löwis11437992002-04-12 09:54:03 +000014646int
14647main ()
14648{
Matthias Kloseb9621712010-04-24 17:59:49 +000014649#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14650 bogus endian macros
14651 #endif
14652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 ;
14654 return 0;
14655}
14656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014657if ac_fn_c_try_compile "$LINENO"; then :
14658 # It does; now see whether it defined to _BIG_ENDIAN or not.
14659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14660/* end confdefs.h. */
14661#include <limits.h>
14662
14663int
14664main ()
14665{
14666#ifndef _BIG_ENDIAN
14667 not big endian
14668 #endif
14669
14670 ;
14671 return 0;
14672}
14673_ACEOF
14674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014676else
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14680fi
14681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14682 fi
14683 if test $ac_cv_c_bigendian = unknown; then
14684 # Compile a test program.
14685 if test "$cross_compiling" = yes; then :
14686 # Try to guess by grepping values from an object file.
14687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14688/* end confdefs.h. */
14689short int ascii_mm[] =
14690 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14691 short int ascii_ii[] =
14692 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14693 int use_ascii (int i) {
14694 return ascii_mm[i] + ascii_ii[i];
14695 }
14696 short int ebcdic_ii[] =
14697 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14698 short int ebcdic_mm[] =
14699 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14700 int use_ebcdic (int i) {
14701 return ebcdic_mm[i] + ebcdic_ii[i];
14702 }
14703 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705int
14706main ()
14707{
14708return use_ascii (foo) == use_ebcdic (foo);
14709 ;
14710 return 0;
14711}
14712_ACEOF
14713if ac_fn_c_try_compile "$LINENO"; then :
14714 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14715 ac_cv_c_bigendian=yes
14716 fi
14717 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14718 if test "$ac_cv_c_bigendian" = unknown; then
14719 ac_cv_c_bigendian=no
14720 else
14721 # finding both strings is unlikely to happen, but who knows?
14722 ac_cv_c_bigendian=unknown
14723 fi
14724 fi
14725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014729/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014731int
14732main ()
14733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 /* Are we little or big endian? From Harbison&Steele. */
14736 union
14737 {
14738 long int l;
14739 char c[sizeof (long int)];
14740 } u;
14741 u.l = 1;
14742 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743
14744 ;
14745 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014746}
Martin v. Löwis11437992002-04-12 09:54:03 +000014747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014748if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014749 ac_cv_c_bigendian=no
14750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14760$as_echo "$ac_cv_c_bigendian" >&6; }
14761 case $ac_cv_c_bigendian in #(
14762 yes)
14763 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14764;; #(
14765 no)
14766 ;; #(
14767 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014768
Matthias Kloseb9621712010-04-24 17:59:49 +000014769$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 ;; #(
14772 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014773 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014774 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014776
Michael W. Hudson54241132001-12-07 15:38:26 +000014777
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014778# ABI version string for Python extension modules. This appears between the
14779# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14780# from the following attributes which affect the ABI of this Python build (in
14781# this order):
14782#
14783# * The Python implementation (always 'cpython-' for us)
14784# * The major and minor version numbers
14785# * --with-pydebug (adds a 'd')
14786# * --with-pymalloc (adds a 'm')
14787# * --with-wide-unicode (adds a 'u')
14788#
14789# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014790# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14791# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014792
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14794$as_echo_n "checking ABIFLAGS... " >&6; }
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14796$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14798$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014799SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14801$as_echo "$SOABI" >&6; }
14802
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014803
14804case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014805 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014806 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14807 *)
14808 EXT_SUFFIX=${SHLIB_SUFFIX};;
14809esac
14810
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14812$as_echo_n "checking LDVERSION... " >&6; }
14813LDVERSION='$(VERSION)$(ABIFLAGS)'
14814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14815$as_echo "$LDVERSION" >&6; }
14816
doko@python.org87421192013-01-26 11:39:31 +010014817
doko@ubuntu.com55532312016-06-14 08:55:19 +020014818if test x$PLATFORM_TRIPLET = x; then
14819 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14820else
14821 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14822fi
doko@python.org87421192013-01-26 11:39:31 +010014823
14824
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014825# Check whether right shifting a negative integer extends the sign bit
14826# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14828$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014829if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014831else
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014834 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014837/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014838
14839int main()
14840{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014841 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014842}
14843
Martin v. Löwis11437992002-04-12 09:54:03 +000014844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014845if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014846 ac_cv_rshift_extends_sign=yes
14847else
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014852fi
14853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854fi
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14857$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014858if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014859then
Martin v. Löwis11437992002-04-12 09:54:03 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014862
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014863fi
14864
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014865# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14867$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014868if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014870else
Martin v. Löwis11437992002-04-12 09:54:03 +000014871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014873/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014874#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014875int
14876main ()
14877{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014878
14879 FILE *f = fopen("/dev/null", "r");
14880 flockfile(f);
14881 getc_unlocked(f);
14882 funlockfile(f);
14883
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 ;
14885 return 0;
14886}
14887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014888if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014889 ac_cv_have_getc_unlocked=yes
14890else
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 ac_cv_have_getc_unlocked=no
14892fi
14893rm -f core conftest.err conftest.$ac_objext \
14894 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896
Matthias Kloseb9621712010-04-24 17:59:49 +000014897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14898$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014899if test "$ac_cv_have_getc_unlocked" = yes
14900then
Martin v. Löwis11437992002-04-12 09:54:03 +000014901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014903
14904fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014905
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014906# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014907# save the value of LIBS so we don't actually link Python with readline
14908LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014909
Gregory P. Smith18820942008-09-07 06:24:49 +000014910# On some systems we need to link readline to a termcap compatible
14911# library. NOTE: Keep the precedence of listed libraries synchronised
14912# with setup.py.
14913py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14915$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014916for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014917 if test -z "$py_libtermcap"; then
14918 READLINE_LIBS="-lreadline"
14919 else
14920 READLINE_LIBS="-lreadline -l$py_libtermcap"
14921 fi
14922 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014924/* end confdefs.h. */
14925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926/* Override any GCC internal prototype to avoid an error.
14927 Use char because int might match the return type of a GCC
14928 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014929#ifdef __cplusplus
14930extern "C"
14931#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014932char readline ();
14933int
14934main ()
14935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014936return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014937 ;
14938 return 0;
14939}
14940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014941if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014942 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014944rm -f core conftest.err conftest.$ac_objext \
14945 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014946 if test $py_cv_lib_readline = yes; then
14947 break
14948 fi
14949done
14950# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14951#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014952if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14954$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014955else
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14957$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014958
Matthias Kloseb9621712010-04-24 17:59:49 +000014959$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014960
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014961fi
14962
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014963# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014965/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014966#include <readline/readline.h>
14967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014968if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014969 have_readline=yes
14970else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014972
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014973fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014974rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014975if test $have_readline = yes
14976then
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014978/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014979#include <readline/readline.h>
14980
14981_ACEOF
14982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014984
Matthias Kloseb9621712010-04-24 17:59:49 +000014985$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014986
14987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014988rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014991/* end confdefs.h. */
14992#include <readline/readline.h>
14993
14994_ACEOF
14995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014997
Matthias Kloseb9621712010-04-24 17:59:49 +000014998$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014999
15000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015001rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015002
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015003fi
15004
Martin v. Löwis0daad592001-09-30 21:09:59 +000015005# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15007$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015008if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015010else
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015012LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015019#ifdef __cplusplus
15020extern "C"
15021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015022char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015023int
15024main ()
15025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ;
15028 return 0;
15029}
15030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015033else
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015038LIBS=$ac_check_lib_save_LIBS
15039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15041$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015042if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015045
Martin v. Löwis0daad592001-09-30 21:09:59 +000015046fi
15047
Michael W. Hudson54241132001-12-07 15:38:26 +000015048
Thomas Wouters89d996e2007-09-08 17:39:28 +000015049# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15051$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015052if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054else
15055 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015056LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015058/* end confdefs.h. */
15059
15060/* Override any GCC internal prototype to avoid an error.
15061 Use char because int might match the return type of a GCC
15062 builtin and then its argument prototype would still apply. */
15063#ifdef __cplusplus
15064extern "C"
15065#endif
15066char rl_completion_display_matches_hook ();
15067int
15068main ()
15069{
15070return rl_completion_display_matches_hook ();
15071 ;
15072 return 0;
15073}
15074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015075if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015080rm -f core conftest.err conftest.$ac_objext \
15081 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015082LIBS=$ac_check_lib_save_LIBS
15083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15085$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015086if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015089
15090fi
15091
15092
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015093# also in 4.0, but not in editline
15094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15095$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15096if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15097 $as_echo_n "(cached) " >&6
15098else
15099 ac_check_lib_save_LIBS=$LIBS
15100LIBS="-lreadline $READLINE_LIBS $LIBS"
15101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102/* end confdefs.h. */
15103
15104/* Override any GCC internal prototype to avoid an error.
15105 Use char because int might match the return type of a GCC
15106 builtin and then its argument prototype would still apply. */
15107#ifdef __cplusplus
15108extern "C"
15109#endif
15110char rl_resize_terminal ();
15111int
15112main ()
15113{
15114return rl_resize_terminal ();
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119if ac_fn_c_try_link "$LINENO"; then :
15120 ac_cv_lib_readline_rl_resize_terminal=yes
15121else
15122 ac_cv_lib_readline_rl_resize_terminal=no
15123fi
15124rm -f core conftest.err conftest.$ac_objext \
15125 conftest$ac_exeext conftest.$ac_ext
15126LIBS=$ac_check_lib_save_LIBS
15127fi
15128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15129$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15130if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15131
15132$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15133
15134fi
15135
15136
Martin v. Löwis0daad592001-09-30 21:09:59 +000015137# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15139$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015140if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015142else
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015144LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148/* Override any GCC internal prototype to avoid an error.
15149 Use char because int might match the return type of a GCC
15150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015151#ifdef __cplusplus
15152extern "C"
15153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015154char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015155int
15156main ()
15157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 ;
15160 return 0;
15161}
15162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015165else
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015168rm -f core conftest.err conftest.$ac_objext \
15169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015170LIBS=$ac_check_lib_save_LIBS
15171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15173$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015174if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015177
Guido van Rossum353ae582001-07-10 16:45:32 +000015178fi
15179
Jack Jansendd19cf82001-12-06 22:36:17 +000015180
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015183/* end confdefs.h. */
15184#include <readline/readline.h>
15185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015186if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187 have_readline=yes
15188else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015190
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015191fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015192rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015193if test $have_readline = yes
15194then
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015196/* end confdefs.h. */
15197#include <readline/readline.h>
15198
15199_ACEOF
15200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015204
15205fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015206rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207
15208fi
15209
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15211$as_echo_n "checking for append_history in -lreadline... " >&6; }
15212if ${ac_cv_lib_readline_append_history+:} false; then :
15213 $as_echo_n "(cached) " >&6
15214else
15215 ac_check_lib_save_LIBS=$LIBS
15216LIBS="-lreadline $READLINE_LIBS $LIBS"
15217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15218/* end confdefs.h. */
15219
15220/* Override any GCC internal prototype to avoid an error.
15221 Use char because int might match the return type of a GCC
15222 builtin and then its argument prototype would still apply. */
15223#ifdef __cplusplus
15224extern "C"
15225#endif
15226char append_history ();
15227int
15228main ()
15229{
15230return append_history ();
15231 ;
15232 return 0;
15233}
15234_ACEOF
15235if ac_fn_c_try_link "$LINENO"; then :
15236 ac_cv_lib_readline_append_history=yes
15237else
15238 ac_cv_lib_readline_append_history=no
15239fi
15240rm -f core conftest.err conftest.$ac_objext \
15241 conftest$ac_exeext conftest.$ac_ext
15242LIBS=$ac_check_lib_save_LIBS
15243fi
15244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15245$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15246if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15247
15248$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15249
15250fi
15251
15252
Martin v. Löwis82bca632006-02-10 20:49:30 +000015253# End of readline checks: restore LIBS
15254LIBS=$LIBS_no_readline
15255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15257$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015258if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015263 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015264else
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015266/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015267
15268int main()
15269{
15270 int val1 = nice(1);
15271 if (val1 != -1 && val1 == nice(2))
15272 exit(0);
15273 exit(1);
15274}
15275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015277if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015278 ac_cv_broken_nice=yes
15279else
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015284fi
15285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286fi
15287
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15289$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015290if test "$ac_cv_broken_nice" = yes
15291then
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015294
15295fi
15296
Matthias Kloseb9621712010-04-24 17:59:49 +000015297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15298$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015299if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301else
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015303 ac_cv_broken_poll=no
15304else
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015306/* end confdefs.h. */
15307
15308#include <poll.h>
15309
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015310int main()
15311{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015313 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015314
15315 close (42);
15316
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015317 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015318 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015321 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015322 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015323 return 1;
15324}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015325
15326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015327if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328 ac_cv_broken_poll=yes
15329else
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15333 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015336fi
15337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15339$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340if test "$ac_cv_broken_poll" = yes
15341then
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015344
15345fi
15346
Brett Cannon43802422005-02-10 20:48:03 +000015347# 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 +000015348# (which is not required by ISO C or UNIX spec) and/or if we support
15349# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015350ac_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 +000015351#include <$ac_cv_struct_tm>
15352
Matthias Kloseb9621712010-04-24 17:59:49 +000015353"
Victor Stinnere0be4232011-10-25 13:06:09 +020015354if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015355
15356cat >>confdefs.h <<_ACEOF
15357#define HAVE_STRUCT_TM_TM_ZONE 1
15358_ACEOF
15359
15360
15361fi
15362
15363if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15364
Matthias Kloseb9621712010-04-24 17:59:49 +000015365$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015366
15367else
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15369"
Victor Stinnere0be4232011-10-25 13:06:09 +020015370if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015374fi
15375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015377#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378_ACEOF
15379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15381$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015382if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384else
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015386/* end confdefs.h. */
15387#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388#if !HAVE_DECL_TZNAME
15389extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015390#endif
15391
15392int
15393main ()
15394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015396 ;
15397 return 0;
15398}
15399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015400if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015401 ac_cv_var_tzname=yes
15402else
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015405rm -f core conftest.err conftest.$ac_objext \
15406 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15409$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015410 if test $ac_cv_var_tzname = yes; then
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015413
15414 fi
15415fi
15416
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015417
Martin v. Löwis1d459062005-03-14 21:23:33 +000015418# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15420$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015421if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015423else
15424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015426 ac_cv_working_tzset=no
15427else
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015430
15431#include <stdlib.h>
15432#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015433#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015434
15435#if HAVE_TZNAME
15436extern char *tzname[];
15437#endif
15438
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015439int main()
15440{
Brett Cannon18367812003-09-19 00:59:16 +000015441 /* Note that we need to ensure that not only does tzset(3)
15442 do 'something' with localtime, but it works as documented
15443 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015444 This includes making sure that tzname is set properly if
15445 tm->tm_zone does not exist since it is the alternative way
15446 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015447
15448 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015449 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015450 */
15451
Martin v. Löwis1d459062005-03-14 21:23:33 +000015452 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015453 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15454
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015455 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015456 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015457 if (localtime(&groundhogday)->tm_hour != 0)
15458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015459#if HAVE_TZNAME
15460 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15461 if (strcmp(tzname[0], "UTC") ||
15462 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15463 exit(1);
15464#endif
Brett Cannon18367812003-09-19 00:59:16 +000015465
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015466 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015467 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015468 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015469 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015470#if HAVE_TZNAME
15471 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15472 exit(1);
15473#endif
Brett Cannon18367812003-09-19 00:59:16 +000015474
15475 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15476 tzset();
15477 if (localtime(&groundhogday)->tm_hour != 11)
15478 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015479#if HAVE_TZNAME
15480 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15481 exit(1);
15482#endif
15483
15484#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015485 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15486 exit(1);
15487 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15488 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015489#endif
Brett Cannon18367812003-09-19 00:59:16 +000015490
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015491 exit(0);
15492}
15493
15494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015496 ac_cv_working_tzset=yes
15497else
Matthias Kloseb9621712010-04-24 17:59:49 +000015498 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015502fi
15503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504fi
15505
Matthias Kloseb9621712010-04-24 17:59:49 +000015506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15507$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015508if test "$ac_cv_working_tzset" = yes
15509then
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015512
15513fi
15514
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015515# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15517$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015518if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015520else
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015522/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015523#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015524int
15525main ()
15526{
15527
15528struct stat st;
15529st.st_mtim.tv_nsec = 1;
15530
15531 ;
15532 return 0;
15533}
15534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015536 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15541fi
15542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15544$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015545if test "$ac_cv_stat_tv_nsec" = yes
15546then
15547
Matthias Kloseb9621712010-04-24 17:59:49 +000015548$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015549
15550fi
15551
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015552# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15554$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015555if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015559/* end confdefs.h. */
15560#include <sys/stat.h>
15561int
15562main ()
15563{
15564
15565struct stat st;
15566st.st_mtimespec.tv_nsec = 1;
15567
15568 ;
15569 return 0;
15570}
15571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015573 ac_cv_stat_tv_nsec2=yes
15574else
Matthias Kloseb9621712010-04-24 17:59:49 +000015575 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15578fi
15579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15581$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015582if test "$ac_cv_stat_tv_nsec2" = yes
15583then
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015586
15587fi
15588
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015589# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015590ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015591if test "$cross_compiling" = no; then
15592 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15593fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015594
15595for ac_header in curses.h ncurses.h
15596do :
15597 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15598ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15599if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15600 cat >>confdefs.h <<_ACEOF
15601#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15602_ACEOF
15603
15604fi
15605
15606done
15607
15608
15609# On Solaris, term.h requires curses.h
15610for ac_header in term.h
15611do :
15612 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15613#ifdef HAVE_CURSES_H
15614#include <curses.h>
15615#endif
15616
15617"
15618if test "x$ac_cv_header_term_h" = xyes; then :
15619 cat >>confdefs.h <<_ACEOF
15620#define HAVE_TERM_H 1
15621_ACEOF
15622
15623fi
15624
15625done
15626
15627
Jack Jansen666b1e72001-10-31 12:11:48 +000015628# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15630$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015631if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015632 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015633else
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015635/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015636#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015637int
15638main ()
15639{
Jack Jansen666b1e72001-10-31 12:11:48 +000015640
15641 int rtn;
15642 rtn = mvwdelch(0,0,0);
15643
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 ;
15645 return 0;
15646}
15647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015648if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015649 ac_cv_mvwdelch_is_expression=yes
15650else
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15654fi
15655
Matthias Kloseb9621712010-04-24 17:59:49 +000015656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15657$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015658
15659if test "$ac_cv_mvwdelch_is_expression" = yes
15660then
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015663
15664fi
15665
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015666# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15667# structs since version 5.7. If the macro is defined as zero before including
15668# [n]curses.h, ncurses will expose fields of the structs regardless of the
15669# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15671$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015672if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015674else
Matthias Kloseb9621712010-04-24 17:59:49 +000015675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015676/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015677
15678 #define NCURSES_OPAQUE 0
15679 #include <curses.h>
15680
Martin v. Löwis11437992002-04-12 09:54:03 +000015681int
15682main ()
15683{
Jack Jansen666b1e72001-10-31 12:11:48 +000015684
15685 WINDOW *w;
15686 w->_flags = 0;
15687
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 ;
15689 return 0;
15690}
15691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015692if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015693 ac_cv_window_has_flags=yes
15694else
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15698fi
15699
Matthias Kloseb9621712010-04-24 17:59:49 +000015700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15701$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015702
Jack Jansen666b1e72001-10-31 12:11:48 +000015703
15704if test "$ac_cv_window_has_flags" = yes
15705then
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
Matthias Kloseb9621712010-04-24 17:59:49 +000015707$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015708
15709fi
15710
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15712$as_echo_n "checking for is_pad... " >&6; }
15713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714/* end confdefs.h. */
15715#include <curses.h>
15716int
15717main ()
15718{
15719
15720#ifndef is_pad
15721void *x=is_pad
15722#endif
15723
15724 ;
15725 return 0;
15726}
15727_ACEOF
15728if ac_fn_c_try_compile "$LINENO"; then :
15729
15730$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15731
15732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15733$as_echo "yes" >&6; }
15734else
15735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15736$as_echo "no" >&6; }
15737
15738fi
15739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15742$as_echo_n "checking for is_term_resized... " >&6; }
15743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015744/* end confdefs.h. */
15745#include <curses.h>
15746int
15747main ()
15748{
15749void *x=is_term_resized
15750 ;
15751 return 0;
15752}
15753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015754if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015757
Matthias Kloseb159a552010-04-25 21:00:44 +000015758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15762$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015763
15764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15766
Matthias Kloseb9621712010-04-24 17:59:49 +000015767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15768$as_echo_n "checking for resize_term... " >&6; }
15769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015770/* end confdefs.h. */
15771#include <curses.h>
15772int
15773main ()
15774{
15775void *x=resize_term
15776 ;
15777 return 0;
15778}
15779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015780if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015781
Matthias Kloseb9621712010-04-24 17:59:49 +000015782$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015783
Matthias Kloseb159a552010-04-25 21:00:44 +000015784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786else
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15788$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015789
15790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15792
Matthias Kloseb9621712010-04-24 17:59:49 +000015793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15794$as_echo_n "checking for resizeterm... " >&6; }
15795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015796/* end confdefs.h. */
15797#include <curses.h>
15798int
15799main ()
15800{
15801void *x=resizeterm
15802 ;
15803 return 0;
15804}
15805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015806if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015807
Matthias Kloseb9621712010-04-24 17:59:49 +000015808$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015809
Matthias Kloseb159a552010-04-25 21:00:44 +000015810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015811$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015812else
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15814$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015815
15816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015818
15819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15820$as_echo_n "checking for immedok... " >&6; }
15821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822/* end confdefs.h. */
15823#include <curses.h>
15824int
15825main ()
15826{
15827
15828#ifndef immedok
15829void *x=immedok
15830#endif
15831
15832 ;
15833 return 0;
15834}
15835_ACEOF
15836if ac_fn_c_try_compile "$LINENO"; then :
15837
15838$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15839
15840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15841$as_echo "yes" >&6; }
15842else
15843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15844$as_echo "no" >&6; }
15845
15846fi
15847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15848
15849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15850$as_echo_n "checking for syncok... " >&6; }
15851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15852/* end confdefs.h. */
15853#include <curses.h>
15854int
15855main ()
15856{
15857
15858#ifndef syncok
15859void *x=syncok
15860#endif
15861
15862 ;
15863 return 0;
15864}
15865_ACEOF
15866if ac_fn_c_try_compile "$LINENO"; then :
15867
15868$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15869
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15871$as_echo "yes" >&6; }
15872else
15873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15874$as_echo "no" >&6; }
15875
15876fi
15877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15878
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15880$as_echo_n "checking for wchgat... " >&6; }
15881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15882/* end confdefs.h. */
15883#include <curses.h>
15884int
15885main ()
15886{
15887
15888#ifndef wchgat
15889void *x=wchgat
15890#endif
15891
15892 ;
15893 return 0;
15894}
15895_ACEOF
15896if ac_fn_c_try_compile "$LINENO"; then :
15897
15898$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15899
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15901$as_echo "yes" >&6; }
15902else
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15904$as_echo "no" >&6; }
15905
15906fi
15907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15908
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15910$as_echo_n "checking for filter... " >&6; }
15911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15912/* end confdefs.h. */
15913#include <curses.h>
15914int
15915main ()
15916{
15917
15918#ifndef filter
15919void *x=filter
15920#endif
15921
15922 ;
15923 return 0;
15924}
15925_ACEOF
15926if ac_fn_c_try_compile "$LINENO"; then :
15927
15928$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15929
15930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15931$as_echo "yes" >&6; }
15932else
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15934$as_echo "no" >&6; }
15935
15936fi
15937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15938
15939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15940$as_echo_n "checking for has_key... " >&6; }
15941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15942/* end confdefs.h. */
15943#include <curses.h>
15944int
15945main ()
15946{
15947
15948#ifndef has_key
15949void *x=has_key
15950#endif
15951
15952 ;
15953 return 0;
15954}
15955_ACEOF
15956if ac_fn_c_try_compile "$LINENO"; then :
15957
15958$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15959
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15961$as_echo "yes" >&6; }
15962else
15963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15964$as_echo "no" >&6; }
15965
15966fi
15967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15968
15969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15970$as_echo_n "checking for typeahead... " >&6; }
15971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972/* end confdefs.h. */
15973#include <curses.h>
15974int
15975main ()
15976{
15977
15978#ifndef typeahead
15979void *x=typeahead
15980#endif
15981
15982 ;
15983 return 0;
15984}
15985_ACEOF
15986if ac_fn_c_try_compile "$LINENO"; then :
15987
15988$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15989
15990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15991$as_echo "yes" >&6; }
15992else
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15994$as_echo "no" >&6; }
15995
15996fi
15997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998
15999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16000$as_echo_n "checking for use_env... " >&6; }
16001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16002/* end confdefs.h. */
16003#include <curses.h>
16004int
16005main ()
16006{
16007
16008#ifndef use_env
16009void *x=use_env
16010#endif
16011
16012 ;
16013 return 0;
16014}
16015_ACEOF
16016if ac_fn_c_try_compile "$LINENO"; then :
16017
16018$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16019
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16021$as_echo "yes" >&6; }
16022else
16023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16024$as_echo "no" >&6; }
16025
16026fi
16027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016028# last curses configure check
16029CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16032$as_echo "$as_me: checking for device files" >&6;}
16033
16034if test "x$cross_compiling" = xyes; then
16035 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16037$as_echo_n "checking for /dev/ptmx... " >&6; }
16038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16039$as_echo "not set" >&6; }
16040 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16041 fi
16042 if test "${ac_cv_file__dev_ptc+set}" != set; then
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16044$as_echo_n "checking for /dev/ptc... " >&6; }
16045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16046$as_echo "not set" >&6; }
16047 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16048 fi
16049fi
16050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16052$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016053if ${ac_cv_file__dev_ptmx+:} false; then :
16054 $as_echo_n "(cached) " >&6
16055else
16056 test "$cross_compiling" = yes &&
16057 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16058if test -r "/dev/ptmx"; then
16059 ac_cv_file__dev_ptmx=yes
16060else
16061 ac_cv_file__dev_ptmx=no
16062fi
16063fi
16064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16065$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16066if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016067
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016068fi
16069
16070if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016073
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16076$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016077if ${ac_cv_file__dev_ptc+:} false; then :
16078 $as_echo_n "(cached) " >&6
16079else
16080 test "$cross_compiling" = yes &&
16081 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16082if test -r "/dev/ptc"; then
16083 ac_cv_file__dev_ptc=yes
16084else
16085 ac_cv_file__dev_ptc=no
16086fi
16087fi
16088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16089$as_echo "$ac_cv_file__dev_ptc" >&6; }
16090if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016091
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016092fi
16093
16094if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016095
Matthias Kloseb9621712010-04-24 17:59:49 +000016096$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016097
Neal Norwitz865400f2003-03-21 01:42:58 +000016098fi
16099
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016100if test $ac_sys_system = Darwin
16101then
16102 LIBS="$LIBS -framework CoreFoundation"
16103fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016104
Matthias Kloseb9621712010-04-24 17:59:49 +000016105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16106$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016107if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016108 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016109else
Matthias Kloseb9621712010-04-24 17:59:49 +000016110 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016111 ac_cv_have_size_t_format="cross -- assuming yes"
16112
Thomas Wouters477c8d52006-05-27 19:21:47 +000016113else
Matthias Kloseb9621712010-04-24 17:59:49 +000016114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016115/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016116
Thomas Wouters477c8d52006-05-27 19:21:47 +000016117#include <stdio.h>
16118#include <stddef.h>
16119#include <string.h>
16120
Christian Heimes2c181612007-12-17 20:04:13 +000016121#ifdef HAVE_SYS_TYPES_H
16122#include <sys/types.h>
16123#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016124
16125#ifdef HAVE_SSIZE_T
16126typedef ssize_t Py_ssize_t;
16127#elif SIZEOF_VOID_P == SIZEOF_LONG
16128typedef long Py_ssize_t;
16129#else
16130typedef int Py_ssize_t;
16131#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016132
Christian Heimes2c181612007-12-17 20:04:13 +000016133int main()
16134{
16135 char buffer[256];
16136
Thomas Wouters477c8d52006-05-27 19:21:47 +000016137 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16138 return 1;
16139
Thomas Wouters89f507f2006-12-13 04:49:30 +000016140 if (strcmp(buffer, "123"))
16141 return 1;
16142
16143 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16144 return 1;
16145
16146 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016147 return 1;
16148
16149 return 0;
16150}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016151
Thomas Wouters477c8d52006-05-27 19:21:47 +000016152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016153if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016154 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016155else
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016160fi
16161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16164$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016165if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016166
Matthias Kloseb9621712010-04-24 17:59:49 +000016167$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016168
16169fi
16170
Matthias Kloseb9621712010-04-24 17:59:49 +000016171ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016172#ifdef HAVE_SYS_TYPES_H
16173#include <sys/types.h>
16174#endif
16175#ifdef HAVE_SYS_SOCKET_H
16176#include <sys/socket.h>
16177#endif
16178
Matthias Kloseb9621712010-04-24 17:59:49 +000016179"
Victor Stinnere0be4232011-10-25 13:06:09 +020016180if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016181
Martin v. Löwis11437992002-04-12 09:54:03 +000016182else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016183
Matthias Kloseb9621712010-04-24 17:59:49 +000016184$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016185
16186fi
16187
Michael W. Hudson54241132001-12-07 15:38:26 +000016188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16190$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016191if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016193else
Matthias Kloseb9621712010-04-24 17:59:49 +000016194 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016195 ac_cv_broken_mbstowcs=no
16196else
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016198/* end confdefs.h. */
16199
Stefan Krah19c21392012-11-22 23:47:32 +010016200#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016201#include<stdlib.h>
16202int main() {
16203 size_t len = -1;
16204 const char *str = "text";
16205 len = mbstowcs(NULL, str, 0);
16206 return (len != 4);
16207}
16208
16209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016210if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016211 ac_cv_broken_mbstowcs=no
16212else
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016217fi
16218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016219fi
16220
Matthias Kloseb9621712010-04-24 17:59:49 +000016221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16222$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016223if test "$ac_cv_broken_mbstowcs" = yes
16224then
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016227
16228fi
16229
Antoine Pitroub52ec782009-01-25 16:34:23 +000016230# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16232$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016233
16234# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016235if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016236 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016237if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016238then
16239
Matthias Kloseb9621712010-04-24 17:59:49 +000016240$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016241
Matthias Kloseb9621712010-04-24 17:59:49 +000016242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16243$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016244fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016245if test "$withval" = no
16246then
16247
16248$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16249
Matthias Kloseb9621712010-04-24 17:59:49 +000016250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16251$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252fi
16253
Antoine Pitrou042b1282010-08-13 21:15:58 +000016254else
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16256$as_echo "no value specified" >&6; }
16257fi
16258
Antoine Pitroub52ec782009-01-25 16:34:23 +000016259
Matthias Kloseb17289e2012-03-15 19:51:34 +010016260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16261$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16262if ${ac_cv_computed_gotos+:} false; then :
16263 $as_echo_n "(cached) " >&6
16264else
16265 if test "$cross_compiling" = yes; then :
16266 if test "${with_computed_gotos+set}" = set; then
16267 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16268 else
16269 ac_cv_computed_gotos=no
16270 fi
16271else
16272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273/* end confdefs.h. */
16274
16275int main(int argc, char **argv)
16276{
16277 static void *targets[1] = { &&LABEL1 };
16278 goto LABEL2;
16279LABEL1:
16280 return 0;
16281LABEL2:
16282 goto *targets[0];
16283 return 1;
16284}
16285
16286_ACEOF
16287if ac_fn_c_try_run "$LINENO"; then :
16288 ac_cv_computed_gotos=yes
16289else
16290 ac_cv_computed_gotos=no
16291fi
16292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16293 conftest.$ac_objext conftest.beam conftest.$ac_ext
16294fi
16295
16296fi
16297
16298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16299$as_echo "$ac_cv_computed_gotos" >&6; }
16300case "$ac_cv_computed_gotos" in yes*)
16301
16302$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16303
16304esac
16305
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016306case $ac_sys_system in
16307AIX*)
16308
16309$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16310 ;;
16311esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016312
Michael W. Hudson54241132001-12-07 15:38:26 +000016313
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016314
16315
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016316for h in `(cd $srcdir;echo Python/thread_*.h)`
16317do
16318 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16319done
16320
Michael W. Hudson54241132001-12-07 15:38:26 +000016321
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016322SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16324$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016325for dir in $SRCDIRS; do
16326 if test ! -d $dir; then
16327 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016328 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016329done
Matthias Kloseb9621712010-04-24 17:59:49 +000016330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16331$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016332
Stefan Krah1919b7e2012-03-21 18:25:23 +010016333# Availability of -O2:
16334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16335$as_echo_n "checking for -O2... " >&6; }
16336saved_cflags="$CFLAGS"
16337CFLAGS="-O2"
16338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h. */
16340
16341int
16342main ()
16343{
16344
16345
16346 ;
16347 return 0;
16348}
16349_ACEOF
16350if ac_fn_c_try_compile "$LINENO"; then :
16351 have_O2=yes
16352else
16353 have_O2=no
16354fi
16355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16357$as_echo "$have_O2" >&6; }
16358CFLAGS="$saved_cflags"
16359
16360# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16361# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16363$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16364saved_cflags="$CFLAGS"
16365CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16366if test "$have_O2" = no; then
16367 CFLAGS=""
16368fi
16369if test "$cross_compiling" = yes; then :
16370 have_glibc_memmove_bug=undefined
16371else
16372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16373/* end confdefs.h. */
16374
16375#include <stdio.h>
16376#include <stdlib.h>
16377#include <string.h>
16378void foo(void *p, void *q) { memmove(p, q, 19); }
16379int main() {
16380 char a[32] = "123456789000000000";
16381 foo(&a[9], a);
16382 if (strcmp(a, "123456789123456789000000000") != 0)
16383 return 1;
16384 foo(a, &a[9]);
16385 if (strcmp(a, "123456789000000000") != 0)
16386 return 1;
16387 return 0;
16388}
16389
16390_ACEOF
16391if ac_fn_c_try_run "$LINENO"; then :
16392 have_glibc_memmove_bug=no
16393else
16394 have_glibc_memmove_bug=yes
16395fi
16396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16397 conftest.$ac_objext conftest.beam conftest.$ac_ext
16398fi
16399
16400CFLAGS="$saved_cflags"
16401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16402$as_echo "$have_glibc_memmove_bug" >&6; }
16403if test "$have_glibc_memmove_bug" = yes; then
16404
16405$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16406
16407fi
16408
16409if test "$have_gcc_asm_for_x87" = yes; then
16410 # Some versions of gcc miscompile inline asm:
16411 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16412 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16413 case $CC in
16414 *gcc*)
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16416$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16417 saved_cflags="$CFLAGS"
16418 CFLAGS="-O2"
16419 if test "$cross_compiling" = yes; then :
16420 have_ipa_pure_const_bug=undefined
16421else
16422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16423/* end confdefs.h. */
16424
16425 __attribute__((noinline)) int
16426 foo(int *p) {
16427 int r;
16428 asm ( "movl \$6, (%1)\n\t"
16429 "xorl %0, %0\n\t"
16430 : "=r" (r) : "r" (p) : "memory"
16431 );
16432 return r;
16433 }
16434 int main() {
16435 int p = 8;
16436 if ((foo(&p) ? : p) != 6)
16437 return 1;
16438 return 0;
16439 }
16440
16441_ACEOF
16442if ac_fn_c_try_run "$LINENO"; then :
16443 have_ipa_pure_const_bug=no
16444else
16445 have_ipa_pure_const_bug=yes
16446fi
16447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16448 conftest.$ac_objext conftest.beam conftest.$ac_ext
16449fi
16450
16451 CFLAGS="$saved_cflags"
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16453$as_echo "$have_ipa_pure_const_bug" >&6; }
16454 if test "$have_ipa_pure_const_bug" = yes; then
16455
16456$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16457
16458 fi
16459 ;;
16460 esac
16461fi
16462
Victor Stinner4f5366e2015-01-09 02:13:19 +010016463# Check for stdatomic.h
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16465$as_echo_n "checking for stdatomic.h... " >&6; }
16466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16467/* end confdefs.h. */
16468
16469
16470 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016471 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016472 int main() {
16473 int loaded_value = atomic_load(&value);
16474 return 0;
16475 }
16476
16477
16478_ACEOF
16479if ac_fn_c_try_link "$LINENO"; then :
16480 have_stdatomic_h=yes
16481else
16482 have_stdatomic_h=no
16483fi
16484rm -f core conftest.err conftest.$ac_objext \
16485 conftest$ac_exeext conftest.$ac_ext
16486
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16488$as_echo "$have_stdatomic_h" >&6; }
16489
16490if test "$have_stdatomic_h" = yes; then
16491
16492$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16493
16494fi
16495
16496# Check for GCC >= 4.7 __atomic builtins
16497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16498$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16500/* end confdefs.h. */
16501
16502
16503 volatile int val = 1;
16504 int main() {
16505 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16506 return 0;
16507 }
16508
16509
16510_ACEOF
16511if ac_fn_c_try_link "$LINENO"; then :
16512 have_builtin_atomic=yes
16513else
16514 have_builtin_atomic=no
16515fi
16516rm -f core conftest.err conftest.$ac_objext \
16517 conftest$ac_exeext conftest.$ac_ext
16518
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16520$as_echo "$have_builtin_atomic" >&6; }
16521
16522if test "$have_builtin_atomic" = yes; then
16523
16524$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16525
16526fi
16527
Ned Deily322f5ba2013-11-21 23:01:59 -080016528# ensurepip option
16529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16530$as_echo_n "checking for ensurepip... " >&6; }
16531
16532# Check whether --with-ensurepip was given.
16533if test "${with_ensurepip+set}" = set; then :
16534 withval=$with_ensurepip;
16535else
16536 with_ensurepip=upgrade
16537fi
16538
16539case $with_ensurepip in #(
16540 yes|upgrade) :
16541 ENSUREPIP=upgrade ;; #(
16542 install) :
16543 ENSUREPIP=install ;; #(
16544 no) :
16545 ENSUREPIP=no ;; #(
16546 *) :
16547 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16548esac
16549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16550$as_echo "$ENSUREPIP" >&6; }
16551
16552
Victor Stinner35a97c02015-03-08 02:59:09 +010016553# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16555$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16557/* end confdefs.h. */
16558
16559
16560 #include <dirent.h>
16561
16562 int main() {
16563 struct dirent entry;
16564 return entry.d_type == DT_UNKNOWN;
16565 }
16566
16567
16568_ACEOF
16569if ac_fn_c_try_link "$LINENO"; then :
16570 have_dirent_d_type=yes
16571else
16572 have_dirent_d_type=no
16573fi
16574rm -f core conftest.err conftest.$ac_objext \
16575 conftest$ac_exeext conftest.$ac_ext
16576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16577$as_echo "$have_dirent_d_type" >&6; }
16578
16579if test "$have_dirent_d_type" = yes; then
16580
16581$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16582
16583fi
16584
Victor Stinner9eb57c52015-03-19 22:21:49 +010016585# check if the Linux getrandom() syscall is available
16586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16587$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16589/* end confdefs.h. */
16590
16591
Victor Stinner1b80b242016-04-12 22:34:58 +020016592 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016593 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016594 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016595
16596 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016597 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016598 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016599 const int flags = GRND_NONBLOCK;
16600 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016601 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016602 return 0;
16603 }
16604
16605
16606_ACEOF
16607if ac_fn_c_try_link "$LINENO"; then :
16608 have_getrandom_syscall=yes
16609else
16610 have_getrandom_syscall=no
16611fi
16612rm -f core conftest.err conftest.$ac_objext \
16613 conftest$ac_exeext conftest.$ac_ext
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16615$as_echo "$have_getrandom_syscall" >&6; }
16616
16617if test "$have_getrandom_syscall" = yes; then
16618
16619$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16620
16621fi
16622
Victor Stinner3abf44e2015-09-18 15:38:37 +020016623# check if the getrandom() function is available
16624# the test was written for the Solaris function of <sys/random.h>
16625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16626$as_echo_n "checking for the getrandom() function... " >&6; }
16627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16628/* end confdefs.h. */
16629
16630
16631 #include <sys/random.h>
16632
16633 int main() {
16634 char buffer[1];
16635 const size_t buflen = sizeof(buffer);
16636 const int flags = 0;
16637 /* ignore the result, Python checks for ENOSYS at runtime */
16638 (void)getrandom(buffer, buflen, flags);
16639 return 0;
16640 }
16641
16642
16643_ACEOF
16644if ac_fn_c_try_link "$LINENO"; then :
16645 have_getrandom=yes
16646else
16647 have_getrandom=no
16648fi
16649rm -f core conftest.err conftest.$ac_objext \
16650 conftest$ac_exeext conftest.$ac_ext
16651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16652$as_echo "$have_getrandom" >&6; }
16653
16654if test "$have_getrandom" = yes; then
16655
16656$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16657
16658fi
16659
Christian Heimesff5be6e2018-01-20 13:19:21 +010016660# Check for usable OpenSSL
16661
16662 found=false
16663
16664# Check whether --with-openssl was given.
16665if test "${with_openssl+set}" = set; then :
16666 withval=$with_openssl;
16667 case "$withval" in
16668 "" | y | ye | yes | n | no)
16669 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16670 ;;
16671 *) ssldirs="$withval"
16672 ;;
16673 esac
16674
16675else
16676
16677 # if pkg-config is installed and openssl has installed a .pc file,
16678 # then use that information and don't search ssldirs
16679 if test -n "$ac_tool_prefix"; then
16680 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16681set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16683$as_echo_n "checking for $ac_word... " >&6; }
16684if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16685 $as_echo_n "(cached) " >&6
16686else
16687 if test -n "$PKG_CONFIG"; then
16688 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16689else
16690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16691for as_dir in $PATH
16692do
16693 IFS=$as_save_IFS
16694 test -z "$as_dir" && as_dir=.
16695 for ac_exec_ext in '' $ac_executable_extensions; do
16696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16697 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16699 break 2
16700 fi
16701done
16702 done
16703IFS=$as_save_IFS
16704
16705fi
16706fi
16707PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16708if test -n "$PKG_CONFIG"; then
16709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16710$as_echo "$PKG_CONFIG" >&6; }
16711else
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16713$as_echo "no" >&6; }
16714fi
16715
16716
16717fi
16718if test -z "$ac_cv_prog_PKG_CONFIG"; then
16719 ac_ct_PKG_CONFIG=$PKG_CONFIG
16720 # Extract the first word of "pkg-config", so it can be a program name with args.
16721set dummy pkg-config; ac_word=$2
16722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16723$as_echo_n "checking for $ac_word... " >&6; }
16724if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16725 $as_echo_n "(cached) " >&6
16726else
16727 if test -n "$ac_ct_PKG_CONFIG"; then
16728 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16729else
16730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16731for as_dir in $PATH
16732do
16733 IFS=$as_save_IFS
16734 test -z "$as_dir" && as_dir=.
16735 for ac_exec_ext in '' $ac_executable_extensions; do
16736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16737 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16739 break 2
16740 fi
16741done
16742 done
16743IFS=$as_save_IFS
16744
16745fi
16746fi
16747ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16748if test -n "$ac_ct_PKG_CONFIG"; then
16749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16750$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16751else
16752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16753$as_echo "no" >&6; }
16754fi
16755
16756 if test "x$ac_ct_PKG_CONFIG" = x; then
16757 PKG_CONFIG=""
16758 else
16759 case $cross_compiling:$ac_tool_warned in
16760yes:)
16761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16763ac_tool_warned=yes ;;
16764esac
16765 PKG_CONFIG=$ac_ct_PKG_CONFIG
16766 fi
16767else
16768 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16769fi
16770
16771 if test x"$PKG_CONFIG" != x""; then
16772 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16773 if test $? = 0; then
16774 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16775 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16776 found=true
16777 fi
16778 fi
16779
16780 # no such luck; use some default ssldirs
16781 if ! $found; then
16782 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16783 fi
16784
16785
16786fi
16787
16788
16789
16790 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16791 # an 'openssl' subdirectory
16792
16793 if ! $found; then
16794 OPENSSL_INCLUDES=
16795 for ssldir in $ssldirs; do
16796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16797$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16798 if test -f "$ssldir/include/openssl/ssl.h"; then
16799 OPENSSL_INCLUDES="-I$ssldir/include"
16800 OPENSSL_LDFLAGS="-L$ssldir/lib"
16801 OPENSSL_LIBS="-lssl -lcrypto"
16802 found=true
16803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16804$as_echo "yes" >&6; }
16805 break
16806 else
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16808$as_echo "no" >&6; }
16809 fi
16810 done
16811
16812 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16813 # it will just work!
16814 fi
16815
16816 # try the preprocessor and linker with our new flags,
16817 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16818
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16820$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16821 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16822 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16823
16824 save_LIBS="$LIBS"
16825 save_LDFLAGS="$LDFLAGS"
16826 save_CPPFLAGS="$CPPFLAGS"
16827 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16828 LIBS="$OPENSSL_LIBS $LIBS"
16829 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16831/* end confdefs.h. */
16832#include <openssl/ssl.h>
16833int
16834main ()
16835{
16836SSL_new(NULL)
16837 ;
16838 return 0;
16839}
16840_ACEOF
16841if ac_fn_c_try_link "$LINENO"; then :
16842
16843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16844$as_echo "yes" >&6; }
16845 have_openssl=yes
16846
16847else
16848
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16850$as_echo "no" >&6; }
16851 have_openssl=no
16852
16853fi
16854rm -f core conftest.err conftest.$ac_objext \
16855 conftest$ac_exeext conftest.$ac_ext
16856 CPPFLAGS="$save_CPPFLAGS"
16857 LDFLAGS="$save_LDFLAGS"
16858 LIBS="$save_LIBS"
16859
16860
16861
16862
16863
16864
16865if test "$have_openssl" = yes; then
16866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16867$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16868
16869 save_LIBS="$LIBS"
16870 save_LDFLAGS="$LDFLAGS"
16871 save_CPPFLAGS="$CPPFLAGS"
16872 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16873 LIBS="$OPENSSL_LIBS $LIBS"
16874 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16875
16876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16877/* end confdefs.h. */
16878
16879 #include <openssl/x509_vfy.h>
16880
16881int
16882main ()
16883{
16884
16885 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16886 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16887 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16888 X509_VERIFY_PARAM_set_hostflags(p, 0);
16889
16890 ;
16891 return 0;
16892}
16893
16894_ACEOF
16895if ac_fn_c_try_link "$LINENO"; then :
16896
16897 ac_cv_has_x509_verify_param_set1_host=yes
16898
16899else
16900
16901 ac_cv_has_x509_verify_param_set1_host=no
16902
16903fi
16904rm -f core conftest.err conftest.$ac_objext \
16905 conftest$ac_exeext conftest.$ac_ext
16906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16907$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16908 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16909
16910$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16911
16912 fi
16913
16914 CPPFLAGS="$save_CPPFLAGS"
16915 LDFLAGS="$save_LDFLAGS"
16916 LIBS="$save_LIBS"
16917fi
16918
Christian Heimes892d66e2018-01-29 14:10:18 +010016919# ssl module default cipher suite string
16920
16921
16922
16923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16924$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16925
16926# Check whether --with-ssl-default-suites was given.
16927if test "${with_ssl_default_suites+set}" = set; then :
16928 withval=$with_ssl_default_suites;
16929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16930$as_echo "$withval" >&6; }
16931case "$withval" in
16932 python)
16933 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16934
16935 ;;
16936 openssl)
16937 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16938
16939 ;;
16940 *)
16941 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16942
16943 cat >>confdefs.h <<_ACEOF
16944#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16945_ACEOF
16946
16947 ;;
16948esac
16949
16950else
16951
16952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16953$as_echo "python" >&6; }
16954$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16955
16956
16957fi
16958
16959
16960
Guido van Rossum627b2d71993-12-24 10:39:16 +000016961# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016962ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016963
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016964ac_config_files="$ac_config_files Modules/ld_so_aix"
16965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016967# This file is a shell script that caches the results of configure
16968# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016969# scripts and configure runs, see configure's option --config-cache.
16970# It is not useful on other systems. If it contains results you don't
16971# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016972#
Martin v. Löwis11437992002-04-12 09:54:03 +000016973# config.status only pays attention to the cache file if you give it
16974# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016975#
Skip Montanaro6dead952003-09-25 14:50:04 +000016976# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016977# loading this file, other *unset* `ac_cv_foo' will be assigned the
16978# following values.
16979
16980_ACEOF
16981
Guido van Rossumf78abae1997-01-21 22:02:36 +000016982# The following way of writing the cache mishandles newlines in values,
16983# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016985# Ultrix sh set writes to stderr and can't be redirected directly,
16986# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987(
16988 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16989 eval ac_val=\$$ac_var
16990 case $ac_val in #(
16991 *${as_nl}*)
16992 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016993 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16994$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995 esac
16996 case $ac_var in #(
16997 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016998 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16999 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000 esac ;;
17001 esac
17002 done
17003
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17006 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017007 # `set' does not quote correctly, so add quotes: double-quote
17008 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017010 "s/'/'\\\\''/g;
17011 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 *)
17014 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 esac |
17018 sort
17019) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017020 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017024 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17025 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17027 :end' >>confcache
17028if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17029 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017030 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017031 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17032$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017033 if test ! -f "$cache_file" || test -h "$cache_file"; then
17034 cat confcache >"$cache_file"
17035 else
17036 case $cache_file in #(
17037 */* | ?:*)
17038 mv -f confcache "$cache_file"$$ &&
17039 mv -f "$cache_file"$$ "$cache_file" ;; #(
17040 *)
17041 mv -f confcache "$cache_file" ;;
17042 esac
17043 fi
17044 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017045 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017046 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17047$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017048 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017049fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017050rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017052test "x$prefix" = xNONE && prefix=$ac_default_prefix
17053# Let make expand exec_prefix.
17054test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017055
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017056DEFS=-DHAVE_CONFIG_H
17057
Skip Montanaro6dead952003-09-25 14:50:04 +000017058ac_libobjs=
17059ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017060U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017061for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17062 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17066 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017067 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17068 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017069done
17070LIBOBJS=$ac_libobjs
17071
17072LTLIBOBJS=$ac_ltlibobjs
17073
17074
Martin v. Löwis11437992002-04-12 09:54:03 +000017075
Matthias Kloseb9621712010-04-24 17:59:49 +000017076
Victor Stinnere0be4232011-10-25 13:06:09 +020017077: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017078ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017079ac_clean_files_save=$ac_clean_files
17080ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017081{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17082$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17083as_write_fail=0
17084cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017085#! $SHELL
17086# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017087# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017088# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017089# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017090
Martin v. Löwis11437992002-04-12 09:54:03 +000017091debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017092ac_cs_recheck=false
17093ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017094
Matthias Kloseb9621712010-04-24 17:59:49 +000017095SHELL=\${CONFIG_SHELL-$SHELL}
17096export SHELL
17097_ASEOF
17098cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17099## -------------------- ##
17100## M4sh Initialization. ##
17101## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103# Be more Bourne compatible
17104DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017105if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017106 emulate sh
17107 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017108 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017109 # is contrary to our usage. Disable this feature.
17110 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017112else
Matthias Kloseb9621712010-04-24 17:59:49 +000017113 case `(set -o) 2>/dev/null` in #(
17114 *posix*) :
17115 set -o posix ;; #(
17116 *) :
17117 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017118esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017119fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017120
17121
Matthias Kloseb9621712010-04-24 17:59:49 +000017122as_nl='
17123'
17124export as_nl
17125# Printing a long string crashes Solaris 7 /usr/bin/printf.
17126as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17127as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17128as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17129# Prefer a ksh shell builtin over an external printf program on Solaris,
17130# but without wasting forks for bash or zsh.
17131if test -z "$BASH_VERSION$ZSH_VERSION" \
17132 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17133 as_echo='print -r --'
17134 as_echo_n='print -rn --'
17135elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17136 as_echo='printf %s\n'
17137 as_echo_n='printf %s'
17138else
17139 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17140 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17141 as_echo_n='/usr/ucb/echo -n'
17142 else
17143 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17144 as_echo_n_body='eval
17145 arg=$1;
17146 case $arg in #(
17147 *"$as_nl"*)
17148 expr "X$arg" : "X\\(.*\\)$as_nl";
17149 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17150 esac;
17151 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17152 '
17153 export as_echo_n_body
17154 as_echo_n='sh -c $as_echo_n_body as_echo'
17155 fi
17156 export as_echo_body
17157 as_echo='sh -c $as_echo_body as_echo'
17158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017159
17160# The user is always right.
17161if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017162 PATH_SEPARATOR=:
17163 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17164 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17165 PATH_SEPARATOR=';'
17166 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169
17170# IFS
17171# We need space, tab and new line, in precisely that order. Quoting is
17172# there to prevent editors from complaining about space-tab.
17173# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17174# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175IFS=" "" $as_nl"
17176
17177# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017178as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017179case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180 *[\\/]* ) as_myself=$0 ;;
17181 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017182for as_dir in $PATH
17183do
17184 IFS=$as_save_IFS
17185 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017186 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17187 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190 ;;
17191esac
17192# We did not find ourselves, most probably we were run as `sh COMMAND'
17193# in which case we are not to be found in the path.
17194if test "x$as_myself" = x; then
17195 as_myself=$0
17196fi
17197if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017198 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17199 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200fi
17201
Matthias Kloseb9621712010-04-24 17:59:49 +000017202# Unset variables that we do not need and which cause bugs (e.g. in
17203# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17204# suppresses any "Segmentation fault" message there. '((' could
17205# trigger a bug in pdksh 5.2.14.
17206for as_var in BASH_ENV ENV MAIL MAILPATH
17207do eval test x\${$as_var+set} = xset \
17208 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209done
17210PS1='$ '
17211PS2='> '
17212PS4='+ '
17213
17214# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017215LC_ALL=C
17216export LC_ALL
17217LANGUAGE=C
17218export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017219
Matthias Kloseb9621712010-04-24 17:59:49 +000017220# CDPATH.
17221(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17222
17223
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017224# as_fn_error STATUS ERROR [LINENO LOG_FD]
17225# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017226# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17227# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017228# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017229as_fn_error ()
17230{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017231 as_status=$1; test $as_status -eq 0 && as_status=1
17232 if test "$4"; then
17233 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17234 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017235 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017236 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017237 as_fn_exit $as_status
17238} # as_fn_error
17239
17240
17241# as_fn_set_status STATUS
17242# -----------------------
17243# Set $? to STATUS, without forking.
17244as_fn_set_status ()
17245{
17246 return $1
17247} # as_fn_set_status
17248
17249# as_fn_exit STATUS
17250# -----------------
17251# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17252as_fn_exit ()
17253{
17254 set +e
17255 as_fn_set_status $1
17256 exit $1
17257} # as_fn_exit
17258
17259# as_fn_unset VAR
17260# ---------------
17261# Portably unset VAR.
17262as_fn_unset ()
17263{
17264 { eval $1=; unset $1;}
17265}
17266as_unset=as_fn_unset
17267# as_fn_append VAR VALUE
17268# ----------------------
17269# Append the text in VALUE to the end of the definition contained in VAR. Take
17270# advantage of any shell optimizations that allow amortized linear growth over
17271# repeated appends, instead of the typical quadratic growth present in naive
17272# implementations.
17273if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17274 eval 'as_fn_append ()
17275 {
17276 eval $1+=\$2
17277 }'
17278else
17279 as_fn_append ()
17280 {
17281 eval $1=\$$1\$2
17282 }
17283fi # as_fn_append
17284
17285# as_fn_arith ARG...
17286# ------------------
17287# Perform arithmetic evaluation on the ARGs, and store the result in the
17288# global $as_val. Take advantage of shells that can avoid forks. The arguments
17289# must be portable across $(()) and expr.
17290if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17291 eval 'as_fn_arith ()
17292 {
17293 as_val=$(( $* ))
17294 }'
17295else
17296 as_fn_arith ()
17297 {
17298 as_val=`expr "$@" || test $? -eq 1`
17299 }
17300fi # as_fn_arith
17301
17302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303if expr a : '\(a\)' >/dev/null 2>&1 &&
17304 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17305 as_expr=expr
17306else
17307 as_expr=false
17308fi
17309
17310if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17311 as_basename=basename
17312else
17313 as_basename=false
17314fi
17315
Matthias Kloseb9621712010-04-24 17:59:49 +000017316if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17317 as_dirname=dirname
17318else
17319 as_dirname=false
17320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322as_me=`$as_basename -- "$0" ||
17323$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17324 X"$0" : 'X\(//\)$' \| \
17325 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017326$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 sed '/^.*\/\([^/][^/]*\)\/*$/{
17328 s//\1/
17329 q
17330 }
17331 /^X\/\(\/\/\)$/{
17332 s//\1/
17333 q
17334 }
17335 /^X\/\(\/\).*/{
17336 s//\1/
17337 q
17338 }
17339 s/.*/./; q'`
17340
Matthias Kloseb9621712010-04-24 17:59:49 +000017341# Avoid depending upon Character Ranges.
17342as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17343as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17344as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17345as_cr_digits='0123456789'
17346as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347
17348ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017349case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017351 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017353 xy) ECHO_C='\c';;
17354 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17355 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 esac;;
17357*)
17358 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017360
Martin v. Löwis11437992002-04-12 09:54:03 +000017361rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362if test -d conf$$.dir; then
17363 rm -f conf$$.dir/conf$$.file
17364else
17365 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017366 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017368if (echo >conf$$.file) 2>/dev/null; then
17369 if ln -s conf$$.file conf$$ 2>/dev/null; then
17370 as_ln_s='ln -s'
17371 # ... but there are two gotchas:
17372 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17373 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017374 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017375 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017376 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 elif ln conf$$.file conf$$ 2>/dev/null; then
17378 as_ln_s=ln
17379 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017380 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017382else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017383 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17386rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017387
Matthias Kloseb9621712010-04-24 17:59:49 +000017388
17389# as_fn_mkdir_p
17390# -------------
17391# Create "$as_dir" as a directory, including parents if necessary.
17392as_fn_mkdir_p ()
17393{
17394
17395 case $as_dir in #(
17396 -*) as_dir=./$as_dir;;
17397 esac
17398 test -d "$as_dir" || eval $as_mkdir_p || {
17399 as_dirs=
17400 while :; do
17401 case $as_dir in #(
17402 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17403 *) as_qdir=$as_dir;;
17404 esac
17405 as_dirs="'$as_qdir' $as_dirs"
17406 as_dir=`$as_dirname -- "$as_dir" ||
17407$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17408 X"$as_dir" : 'X\(//\)[^/]' \| \
17409 X"$as_dir" : 'X\(//\)$' \| \
17410 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17411$as_echo X"$as_dir" |
17412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17413 s//\1/
17414 q
17415 }
17416 /^X\(\/\/\)[^/].*/{
17417 s//\1/
17418 q
17419 }
17420 /^X\(\/\/\)$/{
17421 s//\1/
17422 q
17423 }
17424 /^X\(\/\).*/{
17425 s//\1/
17426 q
17427 }
17428 s/.*/./; q'`
17429 test -d "$as_dir" && break
17430 done
17431 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017432 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017433
17434
17435} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017436if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017437 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017438else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017439 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017440 as_mkdir_p=false
17441fi
17442
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017443
17444# as_fn_executable_p FILE
17445# -----------------------
17446# Test if FILE is an executable regular file.
17447as_fn_executable_p ()
17448{
17449 test -f "$1" && test -x "$1"
17450} # as_fn_executable_p
17451as_test_x='test -x'
17452as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017453
17454# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017455as_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 +000017456
17457# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017458as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017459
17460
Martin v. Löwis11437992002-04-12 09:54:03 +000017461exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017462## ----------------------------------- ##
17463## Main body of $CONFIG_STATUS script. ##
17464## ----------------------------------- ##
17465_ASEOF
17466test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017467
Matthias Kloseb9621712010-04-24 17:59:49 +000017468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17469# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017470# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471# values after options handling.
17472ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017473This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017474generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017475
17476 CONFIG_FILES = $CONFIG_FILES
17477 CONFIG_HEADERS = $CONFIG_HEADERS
17478 CONFIG_LINKS = $CONFIG_LINKS
17479 CONFIG_COMMANDS = $CONFIG_COMMANDS
17480 $ $0 $@
17481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482on `(hostname || uname -n) 2>/dev/null | sed 1q`
17483"
17484
Martin v. Löwis11437992002-04-12 09:54:03 +000017485_ACEOF
17486
Matthias Kloseb9621712010-04-24 17:59:49 +000017487case $ac_config_files in *"
17488"*) set x $ac_config_files; shift; ac_config_files=$*;;
17489esac
17490
17491case $ac_config_headers in *"
17492"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17493esac
17494
17495
17496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017497# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017498config_files="$ac_config_files"
17499config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017502
Matthias Kloseb9621712010-04-24 17:59:49 +000017503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017504ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017505\`$as_me' instantiates files and other configuration actions
17506from templates according to the current configuration. Unless the files
17507and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017508
Matthias Kloseb9621712010-04-24 17:59:49 +000017509Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017510
17511 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017513 --config print configuration, then exit
17514 -q, --quiet, --silent
17515 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 -d, --debug don't remove temporary files
17517 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017518 --file=FILE[:TEMPLATE]
17519 instantiate the configuration file FILE
17520 --header=FILE[:TEMPLATE]
17521 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017522
17523Configuration files:
17524$config_files
17525
17526Configuration headers:
17527$config_headers
17528
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017529Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17533ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017534ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017535python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017536configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017537 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017538
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017539Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017540This config.status script is free software; the Free Software Foundation
17541gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542
17543ac_pwd='$ac_pwd'
17544srcdir='$srcdir'
17545INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017546MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017547test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017548_ACEOF
17549
Matthias Kloseb9621712010-04-24 17:59:49 +000017550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17551# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017552ac_need_defaults=:
17553while test $# != 0
17554do
17555 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017556 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17558 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017559 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017561 --*=)
17562 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17563 ac_optarg=
17564 ac_shift=:
17565 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017567 ac_option=$1
17568 ac_optarg=$2
17569 ac_shift=shift
17570 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 esac
17572
Skip Montanaro6dead952003-09-25 14:50:04 +000017573 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017574 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017575 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17576 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 $as_echo "$ac_cs_version"; exit ;;
17579 --config | --confi | --conf | --con | --co | --c )
17580 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 debug=: ;;
17583 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017584 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017585 case $ac_optarg in
17586 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017587 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017588 esac
17589 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 ac_need_defaults=false;;
17591 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017592 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017593 case $ac_optarg in
17594 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17595 esac
17596 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598 --he | --h)
17599 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017600 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017601Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017603 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017604 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17605 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17606 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
17608 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017609 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017610Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017611
Matthias Kloseb9621712010-04-24 17:59:49 +000017612 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
17615 esac
17616 shift
17617done
17618
Skip Montanaro6dead952003-09-25 14:50:04 +000017619ac_configure_extra_args=
17620
17621if $ac_cs_silent; then
17622 exec 6>/dev/null
17623 ac_configure_extra_args="$ac_configure_extra_args --silent"
17624fi
17625
17626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017627cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017628if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017629 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017630 shift
17631 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17632 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017635fi
17636
Martin v. Löwis11437992002-04-12 09:54:03 +000017637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017639exec 5>>config.log
17640{
17641 echo
17642 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17643## Running $as_me. ##
17644_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017645 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017649cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017651
Matthias Kloseb9621712010-04-24 17:59:49 +000017652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653
17654# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017655for ac_config_target in $ac_config_targets
17656do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 case $ac_config_target in
17658 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17659 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17660 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017661 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17662 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017664 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017665 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017666 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667
Victor Stinnere0be4232011-10-25 13:06:09 +020017668 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 esac
17670done
17671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672
Martin v. Löwis11437992002-04-12 09:54:03 +000017673# If the user did not use the arguments to specify the items to instantiate,
17674# then the envvar interface is used. Set only those that are not.
17675# We use the long form for the default assignment because of an extremely
17676# bizarre bug on SunOS 4.1.3.
17677if $ac_need_defaults; then
17678 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17679 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17680fi
17681
Skip Montanaro6dead952003-09-25 14:50:04 +000017682# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017684# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685# Hook for its removal unless debugging.
17686# Note that there is a small window in which the directory will not be cleaned:
17687# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017688$debug ||
17689{
Victor Stinnere0be4232011-10-25 13:06:09 +020017690 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017692 : "${ac_tmp:=$tmp}"
17693 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017695 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017696}
Martin v. Löwis11437992002-04-12 09:54:03 +000017697# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017698
Martin v. Löwis11437992002-04-12 09:54:03 +000017699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017701 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017702} ||
17703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704 tmp=./conf$$-$RANDOM
17705 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017706} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017707ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017708
Matthias Kloseb9621712010-04-24 17:59:49 +000017709# Set up the scripts for CONFIG_FILES section.
17710# No need to generate them if there are no CONFIG_FILES.
17711# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
Matthias Kloseb9621712010-04-24 17:59:49 +000017714
17715ac_cr=`echo X | tr X '\015'`
17716# On cygwin, bash can eat \r inside `` if the user requested igncr.
17717# But we know of no other shell where ac_cr would be empty at this
17718# point, so we can use a bashism as a fallback.
17719if test "x$ac_cr" = x; then
17720 eval ac_cr=\$\'\\r\'
17721fi
17722ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17723if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017724 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017725else
17726 ac_cs_awk_cr=$ac_cr
17727fi
17728
Victor Stinnere0be4232011-10-25 13:06:09 +020017729echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017730_ACEOF
17731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732
Matthias Kloseb9621712010-04-24 17:59:49 +000017733{
17734 echo "cat >conf$$subs.awk <<_ACEOF" &&
17735 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17736 echo "_ACEOF"
17737} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017738 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17739ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740ac_delim='%!_!# '
17741for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017743 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17746 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 break
17748 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017749 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 else
17751 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753done
Matthias Kloseb9621712010-04-24 17:59:49 +000017754rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755
Matthias Kloseb9621712010-04-24 17:59:49 +000017756cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017757cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017759sed -n '
17760h
17761s/^/S["/; s/!.*/"]=/
17762p
17763g
17764s/^[^!]*!//
17765:repl
17766t repl
17767s/'"$ac_delim"'$//
17768t delim
17769:nl
17770h
17771s/\(.\{148\}\)..*/\1/
17772t more1
17773s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17774p
17775n
17776b repl
17777:more1
17778s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17779p
17780g
17781s/.\{148\}//
17782t nl
17783:delim
17784h
17785s/\(.\{148\}\)..*/\1/
17786t more2
17787s/["\\]/\\&/g; s/^/"/; s/$/"/
17788p
17789b
17790:more2
17791s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17792p
17793g
17794s/.\{148\}//
17795t delim
17796' <conf$$subs.awk | sed '
17797/^[^""]/{
17798 N
17799 s/\n//
17800}
17801' >>$CONFIG_STATUS || ac_write_fail=1
17802rm -f conf$$subs.awk
17803cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17804_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017805cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017806 for (key in S) S_is_set[key] = 1
17807 FS = ""
17808
17809}
17810{
17811 line = $ 0
17812 nfields = split(line, field, "@")
17813 substed = 0
17814 len = length(field[1])
17815 for (i = 2; i < nfields; i++) {
17816 key = field[i]
17817 keylen = length(key)
17818 if (S_is_set[key]) {
17819 value = S[key]
17820 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17821 len += length(value) + length(field[++i])
17822 substed = 1
17823 } else
17824 len += 1 + keylen
17825 }
17826
17827 print line
17828}
17829
17830_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17833if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17834 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17835else
17836 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017837fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017838 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017839_ACEOF
17840
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017841# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17842# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843# trailing colons and then remove the whole line if VPATH becomes empty
17844# (actually we leave an empty line to preserve line numbers).
17845if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017846 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17847h
17848s///
17849s/^/:/
17850s/[ ]*$/:/
17851s/:\$(srcdir):/:/g
17852s/:\${srcdir}:/:/g
17853s/:@srcdir@:/:/g
17854s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017856x
17857s/\(=[ ]*\).*/\1/
17858G
17859s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860s/^[^=]*=[ ]*$//
17861}'
17862fi
17863
Matthias Kloseb9621712010-04-24 17:59:49 +000017864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017865fi # test -n "$CONFIG_FILES"
17866
Matthias Kloseb9621712010-04-24 17:59:49 +000017867# Set up the scripts for CONFIG_HEADERS section.
17868# No need to generate them if there are no CONFIG_HEADERS.
17869# This happens for instance with `./config.status Makefile'.
17870if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017871cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017872BEGIN {
17873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874
Matthias Kloseb9621712010-04-24 17:59:49 +000017875# Transform confdefs.h into an awk script `defines.awk', embedded as
17876# here-document in config.status, that substitutes the proper values into
17877# config.h.in to produce config.h.
17878
17879# Create a delimiter string that does not exist in confdefs.h, to ease
17880# handling of long lines.
17881ac_delim='%!_!# '
17882for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017883 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17884 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 break
17886 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017887 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017888 else
17889 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17890 fi
17891done
17892
17893# For the awk script, D is an array of macro values keyed by name,
17894# likewise P contains macro parameters if any. Preserve backslash
17895# newline sequences.
17896
17897ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17898sed -n '
17899s/.\{148\}/&'"$ac_delim"'/g
17900t rset
17901:rset
17902s/^[ ]*#[ ]*define[ ][ ]*/ /
17903t def
17904d
17905:def
17906s/\\$//
17907t bsnl
17908s/["\\]/\\&/g
17909s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17910D["\1"]=" \3"/p
17911s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17912d
17913:bsnl
17914s/["\\]/\\&/g
17915s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17916D["\1"]=" \3\\\\\\n"\\/p
17917t cont
17918s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17919t cont
17920d
17921:cont
17922n
17923s/.\{148\}/&'"$ac_delim"'/g
17924t clear
17925:clear
17926s/\\$//
17927t bsnlc
17928s/["\\]/\\&/g; s/^/"/; s/$/"/p
17929d
17930:bsnlc
17931s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17932b cont
17933' <confdefs.h | sed '
17934s/'"$ac_delim"'/"\\\
17935"/g' >>$CONFIG_STATUS || ac_write_fail=1
17936
17937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17938 for (key in D) D_is_set[key] = 1
17939 FS = ""
17940}
17941/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17942 line = \$ 0
17943 split(line, arg, " ")
17944 if (arg[1] == "#") {
17945 defundef = arg[2]
17946 mac1 = arg[3]
17947 } else {
17948 defundef = substr(arg[1], 2)
17949 mac1 = arg[2]
17950 }
17951 split(mac1, mac2, "(") #)
17952 macro = mac2[1]
17953 prefix = substr(line, 1, index(line, defundef) - 1)
17954 if (D_is_set[macro]) {
17955 # Preserve the white space surrounding the "#".
17956 print prefix "define", macro P[macro] D[macro]
17957 next
17958 } else {
17959 # Replace #undef with comments. This is necessary, for example,
17960 # in the case of _POSIX_SOURCE, which is predefined and required
17961 # on some systems where configure will not decide to define it.
17962 if (defundef == "undef") {
17963 print "/*", prefix defundef, macro, "*/"
17964 next
17965 }
17966 }
17967}
17968{ print }
17969_ACAWK
17970_ACEOF
17971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017972 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017973fi # test -n "$CONFIG_HEADERS"
17974
17975
17976eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17977shift
17978for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979do
17980 case $ac_tag in
17981 :[FHLC]) ac_mode=$ac_tag; continue;;
17982 esac
17983 case $ac_mode$ac_tag in
17984 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017985 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017986 :[FH]-) ac_tag=-:-;;
17987 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17988 esac
17989 ac_save_IFS=$IFS
17990 IFS=:
17991 set x $ac_tag
17992 IFS=$ac_save_IFS
17993 shift
17994 ac_file=$1
17995 shift
17996
17997 case $ac_mode in
17998 :L) ac_source=$1;;
17999 :[FH])
18000 ac_file_inputs=
18001 for ac_f
18002 do
18003 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018004 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005 *) # Look for the file first in the build tree, then in the source tree
18006 # (if the path is not absolute). The absolute path cannot be DOS-style,
18007 # because $ac_f cannot contain `:'.
18008 test -f "$ac_f" ||
18009 case $ac_f in
18010 [\\/$]*) false;;
18011 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18012 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018013 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018015 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18016 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017 done
18018
18019 # Let's still pretend it is `configure' which instantiates (i.e., don't
18020 # use $as_me), people would be surprised to read:
18021 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018022 configure_input='Generated from '`
18023 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18024 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025 if test x"$ac_file" != x-; then
18026 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018027 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18028$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018030 # Neutralize special characters interpreted by sed in replacement strings.
18031 case $configure_input in #(
18032 *\&* | *\|* | *\\* )
18033 ac_sed_conf_input=`$as_echo "$configure_input" |
18034 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18035 *) ac_sed_conf_input=$configure_input;;
18036 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018037
18038 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018039 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18040 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018041 esac
18042 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018043 esac
18044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018046$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018047 X"$ac_file" : 'X\(//\)[^/]' \| \
18048 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018050$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18052 s//\1/
18053 q
18054 }
18055 /^X\(\/\/\)[^/].*/{
18056 s//\1/
18057 q
18058 }
18059 /^X\(\/\/\)$/{
18060 s//\1/
18061 q
18062 }
18063 /^X\(\/\).*/{
18064 s//\1/
18065 q
18066 }
18067 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018068 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018069 ac_builddir=.
18070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071case "$ac_dir" in
18072.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18073*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018074 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018076 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 case $ac_top_builddir_sub in
18078 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18079 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18080 esac ;;
18081esac
18082ac_abs_top_builddir=$ac_pwd
18083ac_abs_builddir=$ac_pwd$ac_dir_suffix
18084# for backward compatibility:
18085ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018086
18087case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018090 ac_top_srcdir=$ac_top_builddir_sub
18091 ac_abs_top_srcdir=$ac_pwd ;;
18092 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018094 ac_top_srcdir=$srcdir
18095 ac_abs_top_srcdir=$srcdir ;;
18096 *) # Relative name.
18097 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18098 ac_top_srcdir=$ac_top_build_prefix$srcdir
18099 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018100esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018102
Martin v. Löwis11437992002-04-12 09:54:03 +000018103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 case $ac_mode in
18105 :F)
18106 #
18107 # CONFIG_FILE
18108 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018109
18110 case $INSTALL in
18111 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018113 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018114 ac_MKDIR_P=$MKDIR_P
18115 case $MKDIR_P in
18116 [\\/$]* | ?:[\\/]* ) ;;
18117 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18118 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018119_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120
Matthias Kloseb9621712010-04-24 17:59:49 +000018121cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122# If the template does not know about datarootdir, expand it.
18123# FIXME: This hack should be removed a few years after 2.60.
18124ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018125ac_sed_dataroot='
18126/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127 p
18128 q
18129}
18130/@datadir@/p
18131/@docdir@/p
18132/@infodir@/p
18133/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018134/@mandir@/p'
18135case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136*datarootdir*) ac_datarootdir_seen=yes;;
18137*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18139$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018141cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142 ac_datarootdir_hack='
18143 s&@datadir@&$datadir&g
18144 s&@docdir@&$docdir&g
18145 s&@infodir@&$infodir&g
18146 s&@localedir@&$localedir&g
18147 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018148 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149esac
18150_ACEOF
18151
18152# Neutralize VPATH when `$srcdir' = `.'.
18153# Shell code in configure.ac might set extrasub.
18154# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018155cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18156ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018157$extrasub
18158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018160:t
18161/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018162s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018164s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165s&@srcdir@&$ac_srcdir&;t t
18166s&@abs_srcdir@&$ac_abs_srcdir&;t t
18167s&@top_srcdir@&$ac_top_srcdir&;t t
18168s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18169s&@builddir@&$ac_builddir&;t t
18170s&@abs_builddir@&$ac_abs_builddir&;t t
18171s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18172s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018173s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018175"
Victor Stinnere0be4232011-10-25 13:06:09 +020018176eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18177 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018180 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18181 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18182 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018183 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018184which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018185$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018186which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018187
Victor Stinnere0be4232011-10-25 13:06:09 +020018188 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018189 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018190 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18191 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018192 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018193 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194 ;;
18195 :H)
18196 #
18197 # CONFIG_HEADER
18198 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018199 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018200 {
18201 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018202 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18203 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018204 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018205 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018206 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18207$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018209 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018210 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018211 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018212 fi
18213 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018214 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018215 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018216 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018217 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018218 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220
18221 esac
18222
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018223
18224 case $ac_file$ac_mode in
18225 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18226
18227 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018228done # for ac_tag
18229
Guido van Rossum627b2d71993-12-24 10:39:16 +000018230
Matthias Kloseb9621712010-04-24 17:59:49 +000018231as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018232_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018233ac_clean_files=$ac_clean_files_save
18234
Matthias Kloseb9621712010-04-24 17:59:49 +000018235test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018236 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018237
Martin v. Löwis11437992002-04-12 09:54:03 +000018238
18239# configure is writing to config.log, and then calls config.status.
18240# config.status does its own redirection, appending to config.log.
18241# Unfortunately, on DOS this fails, as config.log is still kept open
18242# by configure, so config.status won't be able to write to it; its
18243# output is simply discarded. So we exec the FD to /dev/null,
18244# effectively closing config.log, so it can be properly (re)opened and
18245# appended to by config.status. When coming back to configure, we
18246# need to make the FD available again.
18247if test "$no_create" != yes; then
18248 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018249 ac_config_status_args=
18250 test "$silent" = yes &&
18251 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018252 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018253 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018254 exec 5>>config.log
18255 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18256 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018257 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018258fi
18259if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18261$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018262fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018263
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018264
Christian Heimes75ed8902013-11-20 01:11:18 +010018265echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018266if test ! -f Modules/Setup.local
18267then
18268 echo "# Edit this file for local setup changes" >Modules/Setup.local
18269fi
18270
Christian Heimes75ed8902013-11-20 01:11:18 +010018271echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018272$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018273 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018274 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018275mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018276
18277if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18278 echo "" >&6
18279 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018280 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 +000018281 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018282 echo "" >&6
18283 echo "" >&6
18284fi
18285