blob: 7afd48966f61284f705d580022bf03d6c78bd58d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
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
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_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
Victor Stinner0198f522018-12-20 16:03:01 +0100670LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700671CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000672BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200673CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000674OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700675LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
Miss Islington (bot)69a3f152018-10-24 17:32:04 -0700682LLVM_AR_FOUND
683target_os
684target_vendor
685target_cpu
686target
687LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700688DEF_MAKE_RULE
689DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000690ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000691LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100692MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000693INSTALL_DATA
694INSTALL_SCRIPT
695INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200696ac_ct_READELF
697READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000698ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200699ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701GNULD
702LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000703LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000704RUNSHARED
705INSTSONAME
706LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000707PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000708BLDLIBRARY
709DLLLIBRARY
710LDLIBRARY
711LIBRARY
712BUILDEXEEXT
713EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200714NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200715MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716PLATFORM_TRIPLET
717MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200718ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MAINCC
720CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700721SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200722GREP
723CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731EXPORT_MACOSX_DEPLOYMENT_TARGET
732CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000734MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000735FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800737FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKALTINSTALLLAST
739FRAMEWORKALTINSTALLFIRST
740FRAMEWORKINSTALLLAST
741FRAMEWORKINSTALLFIRST
742PYTHONFRAMEWORKINSTALLDIR
743PYTHONFRAMEWORKPREFIX
744PYTHONFRAMEWORKDIR
745PYTHONFRAMEWORKIDENTIFIER
746PYTHONFRAMEWORK
747LIPO_32BIT_FLAGS
748ARCH_RUN_32BIT
749UNIVERSALSDK
750CONFIG_ARGS
751SOVERSION
752VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200754PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
813with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600814with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_cxx_main
816with_suffix
817enable_shared
818enable_profiling
819with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Gregory P. Smith5f4d05d2018-11-12 13:48:24 -0800825with_memory_sanitizer
826with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_libs
828with_system_expat
829with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100830with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000831enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700832with_tcltk_includes
833with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000838with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100858CPP
859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153 ac_prev=sbindir ;;
1154 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
1158 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160 | --sharedst | --shareds | --shared | --share | --shar \
1161 | --sha | --sh)
1162 ac_prev=sharedstatedir ;;
1163 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 -site | --site | --sit)
1170 ac_prev=site ;;
1171 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175 ac_prev=srcdir ;;
1176 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180 | --syscon | --sysco | --sysc | --sys | --sy)
1181 ac_prev=sysconfdir ;;
1182 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192 verbose=yes ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 -version | --version | --versio | --versi | --vers | -V)
1195 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 --x)
1230 # Obsolete; use --with-x.
1231 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1234 | --x-incl | --x-inc | --x-in | --x-i)
1235 ac_prev=x_includes ;;
1236 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1237 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1241 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1242 ac_prev=x_libraries ;;
1243 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1244 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1248Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ;;
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 *=*)
1252 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_envvar in #(
1255 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 export $ac_envvar ;;
1260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001266 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
1269 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270done
1271
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275fi
1276
Matthias Kloseb9621712010-04-24 17:59:49 +00001277if test -n "$ac_unrecognized_opts"; then
1278 case $enable_option_checking in
1279 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282 esac
1283fi
1284
1285# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287 datadir sysconfdir sharedstatedir localstatedir includedir \
1288 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04001289 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 # Remove trailing slashes.
1293 case $ac_val in
1294 */ )
1295 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296 eval $ac_var=\$ac_val;;
1297 esac
1298 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 [\\/$]* | ?:[\\/]* ) continue;;
1301 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# There might be people who depend on the old broken behavior: `$host'
1307# used to hold the argument of --host etc.
1308# FIXME: To remove some day.
1309build=$build_alias
1310host=$host_alias
1311target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# FIXME: To remove some day.
1314if test "x$host_alias" != x; then
1315 if test "x$build_alias" = x; then
1316 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
1321
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365 srcdir=..
1366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367else
1368 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001402\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001416 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
Martin v. Löwis11437992002-04-12 09:54:03 +00001422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001462 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001468 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001477 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-framework[=INSTALLDIR]
1479 Build (MacOSX|Darwin) framework
1480 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001481 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001482 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1483 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001484 --enable-loadable-sqlite-extensions
1485 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-ipv6 Enable ipv6 (with ipv4) support
1487 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001488 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491Optional Packages:
1492 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1493 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001494 --with-universal-archs=ARCH
1495 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001496 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1497 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001498 --with-framework-name=FRAMEWORK
1499 specify an alternate name of the framework built
1500 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001502 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001503 --with-cxx-main=<compiler>
1504 compile main() and link python executable with C++
1505 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-suffix=.exe set executable suffix
1507 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001508 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001509 --with-lto Enable Link Time Optimization in any build. Disabled
1510 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001511 --with-hash-algorithm=[fnv|siphash24]
1512 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001513 --with-address-sanitizer
Gregory P. Smith5f4d05d2018-11-12 13:48:24 -08001514 enable AddressSanitizer (asan)
1515 --with-memory-sanitizer enable MemorySanitizer (msan)
1516 --with-undefined-behavior-sanitizer
1517 enable UndefinedBehaviorSanitizer (ubsan)
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
Victor Stinner8291b5e2015-03-20 16:03:14 +01001563 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 Deily4829bc62016-09-12 17:29:04 -04001635python configure 3.7
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 Deily4829bc62016-09-12 17:29:04 -04002344It was created by python $as_me 3.7, 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
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04002760 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 Deily4829bc62016-09-12 17:29:04 -04002964VERSION=3.7
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)
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003011 # 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
3449# XXX shouldn't some/most/all of this code be merged with the stuff later
3450# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3452$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003455if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003457 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003458 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459 without_gcc=yes;;
3460 yes) CC=gcc
3461 without_gcc=no;;
3462 *) CC=$withval
3463 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003464 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003467 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003468 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003469 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003470 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003471 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472fi
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3475$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003476
Zachary Ware5af85642015-12-21 12:09:17 -06003477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3478$as_echo_n "checking for --with-icc... " >&6; }
3479
3480# Check whether --with-icc was given.
3481if test "${with_icc+set}" = set; then :
3482 withval=$with_icc;
3483 case $withval in
3484 no) CC=${CC:-cc}
3485 with_icc=no;;
3486 yes) CC=icc
3487 CXX=icpc
3488 with_icc=yes;;
3489 *) CC=$withval
3490 with_icc=$withval;;
3491 esac
3492else
3493
3494 with_icc=no
3495fi
3496
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3498$as_echo "$with_icc" >&6; }
3499
Guido van Rossum8b131c51995-03-09 14:10:13 +00003500# If the user switches compilers, we can't believe the cache
3501if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3502then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003503 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003504(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003505fi
3506
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003507# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3508# when the compiler supports them, but we don't always want -O2, and
3509# we set -g later.
3510if test -z "$CFLAGS"; then
3511 CFLAGS=
3512fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513
3514if test "$ac_sys_system" = "Darwin"
3515then
3516 # Compiler selection on MacOSX is more complicated than
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003517 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003518 # information
3519 if test -z "${CC}"
3520 then
3521 found_gcc=
3522 found_clang=
3523 as_save_IFS=$IFS; IFS=:
3524 for as_dir in $PATH
3525 do
3526 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003527 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003529 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 fi
3531 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003532 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003534 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535 fi
3536 fi
3537 done
3538 IFS=$as_save_IFS
3539
3540 if test -n "$found_gcc" -a -n "$found_clang"
3541 then
3542 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3543 then
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3545$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3546 CC="$found_clang"
3547 CXX="$found_clang++"
3548 fi
3549
3550
3551 elif test -z "$found_gcc" -a -n "$found_clang"
3552 then
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3554$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3555 CC="$found_clang"
3556 CXX="$found_clang++"
3557
3558 elif test -z "$found_gcc" -a -z "$found_clang"
3559 then
3560 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3561 if test -n "${found_clang}"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3564$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3565 CC="${found_clang}"
3566 CXX="`/usr/bin/xcrun -find clang++`"
3567
3568 # else: use default behaviour
3569 fi
3570 fi
3571 fi
3572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003573ac_ext=c
3574ac_cpp='$CPP $CPPFLAGS'
3575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578if test -n "$ac_tool_prefix"; then
3579 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3580set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003583if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003585else
3586 if test -n "$CC"; then
3587 ac_cv_prog_CC="$CC" # Let the user override the test.
3588else
Martin v. Löwis11437992002-04-12 09:54:03 +00003589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $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 +00003598 break 2
3599 fi
3600done
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
Jack Jansendd19cf82001-12-06 22:36:17 +00003604fi
3605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003606CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003607if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3609$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003610else
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616fi
3617if test -z "$ac_cv_prog_CC"; then
3618 ac_ct_CC=$CC
3619 # Extract the first word of "gcc", so it can be a program name with args.
3620set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003623if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003625else
3626 if test -n "$ac_ct_CC"; then
3627 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3628else
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
3644fi
3645fi
3646ac_ct_CC=$ac_cv_prog_ac_ct_CC
3647if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3649$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 if test "x$ac_ct_CC" = x; then
3656 CC=""
3657 else
3658 case $cross_compiling:$ac_tool_warned in
3659yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662ac_tool_warned=yes ;;
3663esac
3664 CC=$ac_ct_CC
3665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
3667 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003668fi
3669
Jack Jansendd19cf82001-12-06 22:36:17 +00003670if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 if test -n "$ac_tool_prefix"; then
3672 # 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 +00003673set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003676if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH
3684do
3685 IFS=$as_save_IFS
3686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $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 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
3697fi
3698fi
3699CC=$ac_cv_prog_CC
3700if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3702$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3705$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711if test -z "$CC"; then
3712 # Extract the first word of "cc", so it can be a program name with args.
3713set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003716if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003722 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726 IFS=$as_save_IFS
3727 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3731 ac_prog_rejected=yes
3732 continue
3733 fi
3734 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 $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 +00003736 break 2
3737 fi
3738done
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003741
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742if test $ac_prog_rejected = yes; then
3743 # We found a bogon in the path, so make sure we never use it.
3744 set dummy $ac_cv_prog_CC
3745 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747 # We chose a different compiler from the bogus one.
3748 # However, it has the same basename, so the bogon will be chosen
3749 # first if we set CC to just the basename; use the full file name.
3750 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003751 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 fi
3753fi
3754fi
3755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
3767if test -z "$CC"; then
3768 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 do
3771 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003775if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003777else
3778 if test -n "$CC"; then
3779 ac_cv_prog_CC="$CC" # Let the user override the test.
3780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $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 +00003790 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792done
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003795
3796fi
3797fi
3798CC=$ac_cv_prog_CC
3799if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3801$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805fi
3806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$CC" && break
3809 done
3810fi
3811if test -z "$CC"; then
3812 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814do
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003819if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
3822 if test -n "$ac_ct_CC"; then
3823 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3824else
3825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $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 +00003834 break 2
3835 fi
3836done
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
3841fi
3842ac_ct_CC=$ac_cv_prog_ac_ct_CC
3843if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3845$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$ac_ct_CC" && break
3853done
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855 if test "x$ac_ct_CC" = x; then
3856 CC=""
3857 else
3858 case $cross_compiling:$ac_tool_warned in
3859yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862ac_tool_warned=yes ;;
3863esac
3864 CC=$ac_ct_CC
3865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
3867
3868fi
3869
3870
Matthias Kloseb9621712010-04-24 17:59:49 +00003871test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003873as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003874See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003875
3876# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003877$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3878set X $ac_compile
3879ac_compiler=$2
3880for ac_option in --version -v -V -qversion; do
3881 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882case "(($ac_try" in
3883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884 *) ac_try_echo=$ac_try;;
3885esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3887$as_echo "$ac_try_echo"; } >&5
3888 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 if test -s conftest.err; then
3891 sed '10a\
3892... rest of stderr output deleted ...
3893 10q' conftest.err >conftest.er1
3894 cat conftest.er1 >&5
3895 fi
3896 rm -f conftest.er1 conftest.err
3897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3898 test $ac_status = 0; }
3899done
Martin v. Löwis11437992002-04-12 09:54:03 +00003900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003902/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904int
3905main ()
3906{
3907
3908 ;
3909 return 0;
3910}
3911_ACEOF
3912ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003913ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003914# Try to create an executable without -o first, disregard a.out.
3915# It will help us diagnose broken compilers, and finding out an intuition
3916# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3918$as_echo_n "checking whether the C compiler works... " >&6; }
3919ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3920
3921# The possible output files:
3922ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924ac_rmfiles=
3925for ac_file in $ac_files
3926do
3927 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3930 esac
3931done
3932rm -f $ac_rmfiles
3933
Matthias Kloseb9621712010-04-24 17:59:49 +00003934if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935case "(($ac_try" in
3936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937 *) ac_try_echo=$ac_try;;
3938esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3946# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3947# in a Makefile. We should not override ac_cv_exeext if it was cached,
3948# so that the user can short-circuit this test for compilers unknown to
3949# Autoconf.
3950for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003951do
3952 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003955 ;;
3956 [ab].out )
3957 # We found the default executable, but exeext='' is most
3958 # certainly right.
3959 break;;
3960 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 then :; else
3963 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964 fi
3965 # We set ac_cv_exeext here because the later test for it is not
3966 # safe: cross compilers may not add the suffix if given an `-o'
3967 # argument, so we may need to know it at that point already.
3968 # Even if this section looks crufty: it has the advantage of
3969 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 break;;
3971 * )
3972 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 esac
3974done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975test "$ac_cv_exeext" = no && ac_cv_exeext=
3976
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003977else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 ac_file=''
3979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if test -z "$ac_file"; then :
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982$as_echo "no" >&6; }
3983$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003984sed 's/^/| /' conftest.$ac_ext >&5
3985
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003988as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003989See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003990else
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3992$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3995$as_echo_n "checking for C compiler default output file name... " >&6; }
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3997$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999
Matthias Kloseb9621712010-04-24 17:59:49 +00004000rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4003$as_echo_n "checking for suffix of executables... " >&6; }
4004if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005case "(($ac_try" in
4006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007 *) ac_try_echo=$ac_try;;
4008esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4016# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4017# work properly (i.e., refer to `conftest.exe'), while it won't with
4018# `rm'.
4019for ac_file in conftest.exe conftest conftest.*; do
4020 test -f "$ac_file" || continue
4021 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4024 break;;
4025 * ) break;;
4026 esac
4027done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004031as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004032See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004034rm -f conftest conftest$ac_cv_exeext
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4036$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037
4038rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004039EXEEXT=$ac_cv_exeext
4040ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042/* end confdefs.h. */
4043#include <stdio.h>
4044int
4045main ()
4046{
4047FILE *f = fopen ("conftest.out", "w");
4048 return ferror (f) || fclose (f) != 0;
4049
4050 ;
4051 return 0;
4052}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004054ac_clean_files="$ac_clean_files conftest.out"
4055# Check that the compiler produces executables we can run. If not, either
4056# the compiler is broken, or we cross compile.
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4058$as_echo_n "checking whether we are cross compiling... " >&6; }
4059if test "$cross_compiling" != yes; then
4060 { { ac_try="$ac_link"
4061case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_link") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }
4071 if { ac_try='./conftest$ac_cv_exeext'
4072 { { case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_try") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }; }; then
4082 cross_compiling=no
4083 else
4084 if test "$cross_compiling" = maybe; then
4085 cross_compiling=yes
4086 else
4087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004089as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004090If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004091See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 fi
4093 fi
4094fi
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4096$as_echo "$cross_compiling" >&6; }
4097
4098rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4099ac_clean_files=$ac_clean_files_save
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4101$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
4104else
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106/* end confdefs.h. */
4107
4108int
4109main ()
4110{
4111
4112 ;
4113 return 0;
4114}
4115_ACEOF
4116rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004117if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 for ac_file in conftest.o conftest.obj conftest.*; do
4129 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4133 break;;
4134 esac
4135done
4136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004138sed 's/^/| /' conftest.$ac_ext >&5
4139
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004142as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004143See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4148$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149OBJEXT=$ac_cv_objext
4150ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4152$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004153if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159int
4160main ()
4161{
4162#ifndef __GNUC__
4163 choke me
4164#endif
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_compiler_gnu=yes
4172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176ac_cv_c_compiler_gnu=$ac_compiler_gnu
4177
4178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4180$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4181if test $ac_compiler_gnu = yes; then
4182 GCC=yes
4183else
4184 GCC=
4185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_test_CFLAGS=${CFLAGS+set}
4187ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4189$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004190if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193 ac_save_c_werror_flag=$ac_c_werror_flag
4194 ac_c_werror_flag=yes
4195 ac_cv_prog_cc_g=no
4196 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199
Martin v. Löwis11437992002-04-12 09:54:03 +00004200int
4201main ()
4202{
4203
4204 ;
4205 return 0;
4206}
4207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004209 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 CFLAGS=""
4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213/* end confdefs.h. */
4214
4215int
4216main ()
4217{
4218
4219 ;
4220 return 0;
4221}
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224
Matthias Kloseb9621712010-04-24 17:59:49 +00004225else
4226 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 ac_c_werror_flag=$ac_save_c_werror_flag
4248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4250$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253elif test $ac_cv_prog_cc_g = yes; then
4254 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 CFLAGS="-g -O2"
4256 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258 fi
4259else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260 if test "$GCC" = yes; then
4261 CFLAGS="-O2"
4262 else
4263 CFLAGS=
4264 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4267$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004268if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004270else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004272ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* end confdefs.h. */
4275#include <stdarg.h>
4276#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004277struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4279struct buf { int x; };
4280FILE * (*rcsopen) (struct buf *, struct stat *, int);
4281static char *e (p, i)
4282 char **p;
4283 int i;
4284{
4285 return p[i];
4286}
4287static char *f (char * (*g) (char **, int), char **p, ...)
4288{
4289 char *s;
4290 va_list v;
4291 va_start (v,p);
4292 s = g (p, va_arg (v,int));
4293 va_end (v);
4294 return s;
4295}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296
4297/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4298 function prototypes and stuff, but not '\xHH' hex character constants.
4299 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4302 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4307 inside strings and character constants. */
4308#define FOO(x) 'x'
4309int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4310
Skip Montanaro6dead952003-09-25 14:50:04 +00004311int test (int i, double x);
4312struct s1 {int (*f) (int a);};
4313struct s2 {int (*f) (double a);};
4314int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4315int argc;
4316char **argv;
4317int
4318main ()
4319{
4320return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4321 ;
4322 return 0;
4323}
4324_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4326 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004327do
4328 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f core conftest.err conftest.$ac_objext
4333 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004334done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004336CC=$ac_save_CC
4337
4338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339# AC_CACHE_VAL
4340case "x$ac_cv_prog_cc_c89" in
4341 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4343$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4346$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4350$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004352if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004355
Martin v. Löwis11437992002-04-12 09:54:03 +00004356ac_ext=c
4357ac_cpp='$CPP $CPPFLAGS'
4358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4360ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004362ac_ext=c
4363ac_cpp='$CPP $CPPFLAGS'
4364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4366ac_compiler_gnu=$ac_cv_c_compiler_gnu
4367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4368$as_echo_n "checking how to run the C preprocessor... " >&6; }
4369# On Suns, sometimes $CPP names a directory.
4370if test -n "$CPP" && test -d "$CPP"; then
4371 CPP=
4372fi
4373if test -z "$CPP"; then
4374 if ${ac_cv_prog_CPP+:} false; then :
4375 $as_echo_n "(cached) " >&6
4376else
4377 # Double quotes because CPP needs to be expanded
4378 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4379 do
4380 ac_preproc_ok=false
4381for ac_c_preproc_warn_flag in '' yes
4382do
4383 # Use a header file that comes with gcc, so configuring glibc
4384 # with a fresh cross-compiler works.
4385 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4386 # <limits.h> exists even on freestanding compilers.
4387 # On the NeXT, cc -E runs the code through the compiler's parser,
4388 # not just through cpp. "Syntax error" is here to catch this case.
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390/* end confdefs.h. */
4391#ifdef __STDC__
4392# include <limits.h>
4393#else
4394# include <assert.h>
4395#endif
4396 Syntax error
4397_ACEOF
4398if ac_fn_c_try_cpp "$LINENO"; then :
4399
4400else
4401 # Broken: fails on valid input.
4402continue
4403fi
4404rm -f conftest.err conftest.i conftest.$ac_ext
4405
4406 # OK, works on sane cases. Now check whether nonexistent headers
4407 # can be detected and how.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#include <ac_nonexistent.h>
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413 # Broken: success on invalid input.
4414continue
4415else
4416 # Passes both tests.
4417ac_preproc_ok=:
4418break
4419fi
4420rm -f conftest.err conftest.i conftest.$ac_ext
4421
4422done
4423# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4424rm -f conftest.i conftest.err conftest.$ac_ext
4425if $ac_preproc_ok; then :
4426 break
4427fi
4428
4429 done
4430 ac_cv_prog_CPP=$CPP
4431
4432fi
4433 CPP=$ac_cv_prog_CPP
4434else
4435 ac_cv_prog_CPP=$CPP
4436fi
4437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4438$as_echo "$CPP" >&6; }
4439ac_preproc_ok=false
4440for ac_c_preproc_warn_flag in '' yes
4441do
4442 # Use a header file that comes with gcc, so configuring glibc
4443 # with a fresh cross-compiler works.
4444 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4445 # <limits.h> exists even on freestanding compilers.
4446 # On the NeXT, cc -E runs the code through the compiler's parser,
4447 # not just through cpp. "Syntax error" is here to catch this case.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#ifdef __STDC__
4451# include <limits.h>
4452#else
4453# include <assert.h>
4454#endif
4455 Syntax error
4456_ACEOF
4457if ac_fn_c_try_cpp "$LINENO"; then :
4458
4459else
4460 # Broken: fails on valid input.
4461continue
4462fi
4463rm -f conftest.err conftest.i conftest.$ac_ext
4464
4465 # OK, works on sane cases. Now check whether nonexistent headers
4466 # can be detected and how.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#include <ac_nonexistent.h>
4470_ACEOF
4471if ac_fn_c_try_cpp "$LINENO"; then :
4472 # Broken: success on invalid input.
4473continue
4474else
4475 # Passes both tests.
4476ac_preproc_ok=:
4477break
4478fi
4479rm -f conftest.err conftest.i conftest.$ac_ext
4480
4481done
4482# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4483rm -f conftest.i conftest.err conftest.$ac_ext
4484if $ac_preproc_ok; then :
4485
4486else
4487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4489as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4490See \`config.log' for more details" "$LINENO" 5; }
4491fi
4492
4493ac_ext=c
4494ac_cpp='$CPP $CPPFLAGS'
4495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4497ac_compiler_gnu=$ac_cv_c_compiler_gnu
4498
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4500$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4501if ${ac_cv_path_GREP+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 if test -z "$GREP"; then
4505 ac_path_GREP_found=false
4506 # Loop through the user's path and test for each of PROGNAME-LIST
4507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4509do
4510 IFS=$as_save_IFS
4511 test -z "$as_dir" && as_dir=.
4512 for ac_prog in grep ggrep; do
4513 for ac_exec_ext in '' $ac_executable_extensions; do
4514 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4515 as_fn_executable_p "$ac_path_GREP" || continue
4516# Check for GNU ac_path_GREP and select it if it is found.
4517 # Check for GNU $ac_path_GREP
4518case `"$ac_path_GREP" --version 2>&1` in
4519*GNU*)
4520 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4521*)
4522 ac_count=0
4523 $as_echo_n 0123456789 >"conftest.in"
4524 while :
4525 do
4526 cat "conftest.in" "conftest.in" >"conftest.tmp"
4527 mv "conftest.tmp" "conftest.in"
4528 cp "conftest.in" "conftest.nl"
4529 $as_echo 'GREP' >> "conftest.nl"
4530 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4531 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4532 as_fn_arith $ac_count + 1 && ac_count=$as_val
4533 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4534 # Best one so far, save it but keep looking for a better one
4535 ac_cv_path_GREP="$ac_path_GREP"
4536 ac_path_GREP_max=$ac_count
4537 fi
4538 # 10*(2^10) chars as input seems more than enough
4539 test $ac_count -gt 10 && break
4540 done
4541 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4542esac
4543
4544 $ac_path_GREP_found && break 3
4545 done
4546 done
4547 done
4548IFS=$as_save_IFS
4549 if test -z "$ac_cv_path_GREP"; then
4550 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4551 fi
4552else
4553 ac_cv_path_GREP=$GREP
4554fi
4555
4556fi
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4558$as_echo "$ac_cv_path_GREP" >&6; }
4559 GREP="$ac_cv_path_GREP"
4560
4561
Łukasz Langaa785c872016-09-09 17:37:37 -07004562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4563$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4564if ${ac_cv_path_SED+:} false; then :
4565 $as_echo_n "(cached) " >&6
4566else
4567 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4568 for ac_i in 1 2 3 4 5 6 7; do
4569 ac_script="$ac_script$as_nl$ac_script"
4570 done
4571 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4572 { ac_script=; unset ac_script;}
4573 if test -z "$SED"; then
4574 ac_path_SED_found=false
4575 # Loop through the user's path and test for each of PROGNAME-LIST
4576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579 IFS=$as_save_IFS
4580 test -z "$as_dir" && as_dir=.
4581 for ac_prog in sed gsed; do
4582 for ac_exec_ext in '' $ac_executable_extensions; do
4583 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4584 as_fn_executable_p "$ac_path_SED" || continue
4585# Check for GNU ac_path_SED and select it if it is found.
4586 # Check for GNU $ac_path_SED
4587case `"$ac_path_SED" --version 2>&1` in
4588*GNU*)
4589 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4590*)
4591 ac_count=0
4592 $as_echo_n 0123456789 >"conftest.in"
4593 while :
4594 do
4595 cat "conftest.in" "conftest.in" >"conftest.tmp"
4596 mv "conftest.tmp" "conftest.in"
4597 cp "conftest.in" "conftest.nl"
4598 $as_echo '' >> "conftest.nl"
4599 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4600 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4601 as_fn_arith $ac_count + 1 && ac_count=$as_val
4602 if test $ac_count -gt ${ac_path_SED_max-0}; then
4603 # Best one so far, save it but keep looking for a better one
4604 ac_cv_path_SED="$ac_path_SED"
4605 ac_path_SED_max=$ac_count
4606 fi
4607 # 10*(2^10) chars as input seems more than enough
4608 test $ac_count -gt 10 && break
4609 done
4610 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4611esac
4612
4613 $ac_path_SED_found && break 3
4614 done
4615 done
4616 done
4617IFS=$as_save_IFS
4618 if test -z "$ac_cv_path_SED"; then
4619 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4620 fi
4621else
4622 ac_cv_path_SED=$SED
4623fi
4624
4625fi
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4627$as_echo "$ac_cv_path_SED" >&6; }
4628 SED="$ac_cv_path_SED"
4629 rm -f conftest.sed
4630
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004631
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004632
4633
Matthias Kloseb9621712010-04-24 17:59:49 +00004634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4635$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004637# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004638if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
4641 case $withval in
4642 no) with_cxx_main=no
4643 MAINCC='$(CC)';;
4644 yes) with_cxx_main=yes
4645 MAINCC='$(CXX)';;
4646 *) with_cxx_main=yes
4647 MAINCC=$withval
4648 if test -z "$CXX"
4649 then
4650 CXX=$withval
4651 fi;;
4652 esac
4653else
4654
4655 with_cxx_main=no
4656 MAINCC='$(CC)'
4657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658fi
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4661$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663preset_cxx="$CXX"
4664if test -z "$CXX"
4665then
4666 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004667 gcc) if test -n "$ac_tool_prefix"; then
4668 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4669set dummy ${ac_tool_prefix}g++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698CXX=$ac_cv_path_CXX
4699if test -n "$CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4701$as_echo "$CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708fi
4709if test -z "$ac_cv_path_CXX"; then
4710 ac_pt_CXX=$CXX
4711 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004712set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4714$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715if ${ac_cv_path_ac_pt_CXX+:} false; then :
4716 $as_echo_n "(cached) " >&6
4717else
4718 case $ac_pt_CXX in
4719 [\\/]* | ?:[\\/]*)
4720 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4721 ;;
4722 *)
4723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724for as_dir in notfound
4725do
4726 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2
4733 fi
4734done
4735 done
4736IFS=$as_save_IFS
4737
4738 ;;
4739esac
4740fi
4741ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4742if test -n "$ac_pt_CXX"; then
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4744$as_echo "$ac_pt_CXX" >&6; }
4745else
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747$as_echo "no" >&6; }
4748fi
4749
4750 if test "x$ac_pt_CXX" = x; then
4751 CXX="g++"
4752 else
4753 case $cross_compiling:$ac_tool_warned in
4754yes:)
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4757ac_tool_warned=yes ;;
4758esac
4759 CXX=$ac_pt_CXX
4760 fi
4761else
4762 CXX="$ac_cv_path_CXX"
4763fi
4764 ;;
4765 cc) if test -n "$ac_tool_prefix"; then
4766 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4767set dummy ${ac_tool_prefix}c++; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004770if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772else
4773 case $CXX in
4774 [\\/]* | ?:[\\/]*)
4775 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4776 ;;
4777 *)
4778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in notfound
4780do
4781 IFS=$as_save_IFS
4782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787 break 2
4788 fi
4789done
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004791IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 ;;
4794esac
4795fi
4796CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004797if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4799$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004800else
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004804
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805
4806fi
4807if test -z "$ac_cv_path_CXX"; then
4808 ac_pt_CXX=$CXX
4809 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818 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 +00004819 ;;
4820 *)
4821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in notfound
4823do
4824 IFS=$as_save_IFS
4825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 break 2
4831 fi
4832done
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 ;;
4837esac
4838fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4840if test -n "$ac_pt_CXX"; then
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4842$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004847
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 if test "x$ac_pt_CXX" = x; then
4849 CXX="c++"
4850 else
4851 case $cross_compiling:$ac_tool_warned in
4852yes:)
4853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4855ac_tool_warned=yes ;;
4856esac
4857 CXX=$ac_pt_CXX
4858 fi
4859else
4860 CXX="$ac_cv_path_CXX"
4861fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863 clang|*/clang) if test -n "$ac_tool_prefix"; then
4864 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4865set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4867$as_echo_n "checking for $ac_word... " >&6; }
4868if ${ac_cv_path_CXX+:} false; then :
4869 $as_echo_n "(cached) " >&6
4870else
4871 case $CXX in
4872 [\\/]* | ?:[\\/]*)
4873 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4874 ;;
4875 *)
4876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in notfound
4878do
4879 IFS=$as_save_IFS
4880 test -z "$as_dir" && as_dir=.
4881 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004883 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885 break 2
4886 fi
4887done
4888 done
4889IFS=$as_save_IFS
4890
Ned Deilycbfb9a52012-06-23 16:02:19 -07004891 ;;
4892esac
4893fi
4894CXX=$ac_cv_path_CXX
4895if test -n "$CXX"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4897$as_echo "$CXX" >&6; }
4898else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903
4904fi
4905if test -z "$ac_cv_path_CXX"; then
4906 ac_pt_CXX=$CXX
4907 # Extract the first word of "clang++", so it can be a program name with args.
4908set dummy clang++; ac_word=$2
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if ${ac_cv_path_ac_pt_CXX+:} false; then :
4912 $as_echo_n "(cached) " >&6
4913else
4914 case $ac_pt_CXX in
4915 [\\/]* | ?:[\\/]*)
4916 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4917 ;;
4918 *)
4919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in notfound
4921do
4922 IFS=$as_save_IFS
4923 test -z "$as_dir" && as_dir=.
4924 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928 break 2
4929 fi
4930done
4931 done
4932IFS=$as_save_IFS
4933
4934 ;;
4935esac
4936fi
4937ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4938if test -n "$ac_pt_CXX"; then
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4940$as_echo "$ac_pt_CXX" >&6; }
4941else
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946 if test "x$ac_pt_CXX" = x; then
4947 CXX="clang++"
4948 else
4949 case $cross_compiling:$ac_tool_warned in
4950yes:)
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4953ac_tool_warned=yes ;;
4954esac
4955 CXX=$ac_pt_CXX
4956 fi
4957else
4958 CXX="$ac_cv_path_CXX"
4959fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004960 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004961 icc|*/icc) if test -n "$ac_tool_prefix"; then
4962 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4963set dummy ${ac_tool_prefix}icpc; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if ${ac_cv_path_CXX+:} false; then :
4967 $as_echo_n "(cached) " >&6
4968else
4969 case $CXX in
4970 [\\/]* | ?:[\\/]*)
4971 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4972 ;;
4973 *)
4974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975for as_dir in notfound
4976do
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
4980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983 break 2
4984 fi
4985done
4986 done
4987IFS=$as_save_IFS
4988
4989 ;;
4990esac
4991fi
4992CXX=$ac_cv_path_CXX
4993if test -n "$CXX"; then
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4995$as_echo "$CXX" >&6; }
4996else
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999fi
5000
5001
5002fi
5003if test -z "$ac_cv_path_CXX"; then
5004 ac_pt_CXX=$CXX
5005 # Extract the first word of "icpc", so it can be a program name with args.
5006set dummy icpc; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if ${ac_cv_path_ac_pt_CXX+:} false; then :
5010 $as_echo_n "(cached) " >&6
5011else
5012 case $ac_pt_CXX in
5013 [\\/]* | ?:[\\/]*)
5014 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5015 ;;
5016 *)
5017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in notfound
5019do
5020 IFS=$as_save_IFS
5021 test -z "$as_dir" && as_dir=.
5022 for ac_exec_ext in '' $ac_executable_extensions; do
5023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026 break 2
5027 fi
5028done
5029 done
5030IFS=$as_save_IFS
5031
5032 ;;
5033esac
5034fi
5035ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5036if test -n "$ac_pt_CXX"; then
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5038$as_echo "$ac_pt_CXX" >&6; }
5039else
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044 if test "x$ac_pt_CXX" = x; then
5045 CXX="icpc"
5046 else
5047 case $cross_compiling:$ac_tool_warned in
5048yes:)
5049{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5050$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5051ac_tool_warned=yes ;;
5052esac
5053 CXX=$ac_pt_CXX
5054 fi
5055else
5056 CXX="$ac_cv_path_CXX"
5057fi
5058 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059 esac
5060 if test "$CXX" = "notfound"
5061 then
5062 CXX=""
5063 fi
5064fi
5065if test -z "$CXX"
5066then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 if test -n "$ac_tool_prefix"; then
5068 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5069 do
5070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005074if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076else
5077 if test -n "$CXX"; then
5078 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 break 2
5090 fi
5091done
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094
5095fi
5096fi
5097CXX=$ac_cv_prog_CXX
5098if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5100$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101else
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104fi
5105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005107 test -n "$CXX" && break
5108 done
5109fi
5110if test -z "$CXX"; then
5111 ac_ct_CXX=$CXX
5112 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5113do
5114 # Extract the first word of "$ac_prog", so it can be a program name with args.
5115set dummy $ac_prog; ac_word=$2
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
5118if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5119 $as_echo_n "(cached) " >&6
5120else
5121 if test -n "$ac_ct_CXX"; then
5122 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5123else
5124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127 IFS=$as_save_IFS
5128 test -z "$as_dir" && as_dir=.
5129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005131 ac_cv_prog_ac_ct_CXX="$ac_prog"
5132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5133 break 2
5134 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005136 done
5137IFS=$as_save_IFS
5138
5139fi
5140fi
5141ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5142if test -n "$ac_ct_CXX"; then
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5144$as_echo "$ac_ct_CXX" >&6; }
5145else
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
5148fi
5149
5150
5151 test -n "$ac_ct_CXX" && break
5152done
5153
5154 if test "x$ac_ct_CXX" = x; then
5155 CXX="notfound"
5156 else
5157 case $cross_compiling:$ac_tool_warned in
5158yes:)
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5161ac_tool_warned=yes ;;
5162esac
5163 CXX=$ac_ct_CXX
5164 fi
5165fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166
5167 if test "$CXX" = "notfound"
5168 then
5169 CXX=""
5170 fi
5171fi
5172if test "$preset_cxx" != "$CXX"
5173then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005174 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 By default, distutils will build C++ extension modules with \"$CXX\".
5177 If this is not intended, then set CXX on the configure command line.
5178 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 By default, distutils will build C++ extension modules with \"$CXX\".
5182 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005183 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005184fi
5185
5186
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005187MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5188
5189
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5191$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5192cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005193#undef bfin
5194#undef cris
5195#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef hppa
5198#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005201#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005204#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005205 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005206#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207# if defined(__x86_64__) && defined(__LP64__)
5208 x86_64-linux-gnu
5209# elif defined(__x86_64__) && defined(__ILP32__)
5210 x86_64-linux-gnux32
5211# elif defined(__i386__)
5212 i386-linux-gnu
5213# elif defined(__aarch64__) && defined(__AARCH64EL__)
5214# if defined(__ILP32__)
5215 aarch64_ilp32-linux-gnu
5216# else
5217 aarch64-linux-gnu
5218# endif
5219# elif defined(__aarch64__) && defined(__AARCH64EB__)
5220# if defined(__ILP32__)
5221 aarch64_be_ilp32-linux-gnu
5222# else
5223 aarch64_be-linux-gnu
5224# endif
5225# elif defined(__alpha__)
5226 alpha-linux-gnu
5227# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5228# if defined(__ARMEL__)
5229 arm-linux-gnueabihf
5230# else
5231 armeb-linux-gnueabihf
5232# endif
5233# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5234# if defined(__ARMEL__)
5235 arm-linux-gnueabi
5236# else
5237 armeb-linux-gnueabi
5238# endif
5239# elif defined(__hppa__)
5240 hppa-linux-gnu
5241# elif defined(__ia64__)
5242 ia64-linux-gnu
5243# elif defined(__m68k__) && !defined(__mcoldfire__)
5244 m68k-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005245# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5246# if _MIPS_SIM == _ABIO32
5247 mipsisa32r6el-linux-gnu
5248# elif _MIPS_SIM == _ABIN32
5249 mipsisa64r6el-linux-gnuabin32
5250# elif _MIPS_SIM == _ABI64
5251 mipsisa64r6el-linux-gnuabi64
5252# else
5253# error unknown platform triplet
5254# endif
5255# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5256# if _MIPS_SIM == _ABIO32
5257 mipsisa32r6-linux-gnu
5258# elif _MIPS_SIM == _ABIN32
5259 mipsisa64r6-linux-gnuabin32
5260# elif _MIPS_SIM == _ABI64
5261 mipsisa64r6-linux-gnuabi64
5262# else
5263# error unknown platform triplet
5264# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265# elif defined(__mips_hard_float) && defined(_MIPSEL)
5266# if _MIPS_SIM == _ABIO32
5267 mipsel-linux-gnu
5268# elif _MIPS_SIM == _ABIN32
5269 mips64el-linux-gnuabin32
5270# elif _MIPS_SIM == _ABI64
5271 mips64el-linux-gnuabi64
5272# else
5273# error unknown platform triplet
5274# endif
5275# elif defined(__mips_hard_float)
5276# if _MIPS_SIM == _ABIO32
5277 mips-linux-gnu
5278# elif _MIPS_SIM == _ABIN32
5279 mips64-linux-gnuabin32
5280# elif _MIPS_SIM == _ABI64
5281 mips64-linux-gnuabi64
5282# else
5283# error unknown platform triplet
5284# endif
5285# elif defined(__or1k__)
5286 or1k-linux-gnu
5287# elif defined(__powerpc__) && defined(__SPE__)
5288 powerpc-linux-gnuspe
5289# elif defined(__powerpc64__)
5290# if defined(__LITTLE_ENDIAN__)
5291 powerpc64le-linux-gnu
5292# else
5293 powerpc64-linux-gnu
5294# endif
5295# elif defined(__powerpc__)
5296 powerpc-linux-gnu
5297# elif defined(__s390x__)
5298 s390x-linux-gnu
5299# elif defined(__s390__)
5300 s390-linux-gnu
5301# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5302 sh4-linux-gnu
5303# elif defined(__sparc__) && defined(__arch64__)
5304 sparc64-linux-gnu
5305# elif defined(__sparc__)
5306 sparc-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005307# elif defined(__riscv)
5308# if __riscv_xlen == 32
5309 riscv32-linux-gnu
5310# elif __riscv_xlen == 64
5311 riscv64-linux-gnu
5312# else
5313# error unknown platform triplet
5314# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315# else
5316# error unknown platform triplet
5317# endif
5318#elif defined(__FreeBSD_kernel__)
5319# if defined(__LP64__)
5320 x86_64-kfreebsd-gnu
5321# elif defined(__i386__)
5322 i386-kfreebsd-gnu
5323# else
5324# error unknown platform triplet
5325# endif
5326#elif defined(__gnu_hurd__)
5327 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005328#elif defined(__APPLE__)
5329 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005330#else
5331# error unknown platform triplet
5332#endif
5333
5334EOF
5335
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005336if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005337 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5339$as_echo "$PLATFORM_TRIPLET" >&6; }
5340else
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5342$as_echo "none" >&6; }
5343fi
5344rm -f conftest.c conftest.out
5345
5346if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5347 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5348 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5349 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005350elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5351 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005352fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005353
doko@ubuntu.com55532312016-06-14 08:55:19 +02005354if test x$MULTIARCH != x; then
5355 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5356fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005357
5358
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5360$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5361save_LDFLAGS="$LDFLAGS"
5362LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005363
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5365/* end confdefs.h. */
5366
5367int
5368main ()
5369{
5370
5371 ;
5372 return 0;
5373}
5374_ACEOF
5375if ac_fn_c_try_link "$LINENO"; then :
5376 NO_AS_NEEDED="-Wl,--no-as-needed"
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5378$as_echo "yes" >&6; }
5379else
5380 NO_AS_NEEDED=""
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
5383fi
5384rm -f core conftest.err conftest.$ac_objext \
5385 conftest$ac_exeext conftest.$ac_ext
5386LDFLAGS="$save_LDFLAGS"
5387
5388
5389
5390# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391
Matthias Kloseb9621712010-04-24 17:59:49 +00005392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5393$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005394if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396else
5397 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5398 then ac_cv_path_EGREP="$GREP -E"
5399 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 # Loop through the user's path and test for each of PROGNAME-LIST
5403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5405do
5406 IFS=$as_save_IFS
5407 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 for ac_prog in egrep; do
5409 for ac_exec_ext in '' $ac_executable_extensions; do
5410 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005411 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005412# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 # Check for GNU $ac_path_EGREP
5414case `"$ac_path_EGREP" --version 2>&1` in
5415*GNU*)
5416 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5417*)
5418 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 while :
5421 do
5422 cat "conftest.in" "conftest.in" >"conftest.tmp"
5423 mv "conftest.tmp" "conftest.in"
5424 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005426 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5427 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5430 # Best one so far, save it but keep looking for a better one
5431 ac_cv_path_EGREP="$ac_path_EGREP"
5432 ac_path_EGREP_max=$ac_count
5433 fi
5434 # 10*(2^10) chars as input seems more than enough
5435 test $ac_count -gt 10 && break
5436 done
5437 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5438esac
5439
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 $ac_path_EGREP_found && break 3
5441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005446 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 +00005447 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448else
5449 ac_cv_path_EGREP=$EGREP
5450fi
5451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452 fi
5453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5455$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005457
5458
Matthias Kloseb9621712010-04-24 17:59:49 +00005459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5460$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005461if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 $as_echo_n "(cached) " >&6
5463else
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005465/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005466#include <stdlib.h>
5467#include <stdarg.h>
5468#include <string.h>
5469#include <float.h>
5470
5471int
5472main ()
5473{
5474
5475 ;
5476 return 0;
5477}
5478_ACEOF
5479if ac_fn_c_try_compile "$LINENO"; then :
5480 ac_cv_header_stdc=yes
5481else
5482 ac_cv_header_stdc=no
5483fi
5484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5485
5486if test $ac_cv_header_stdc = yes; then
5487 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5489/* end confdefs.h. */
5490#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005491
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005492_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005494 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005496else
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005498fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005499rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
Matthias Kloseb9621712010-04-24 17:59:49 +00005501fi
5502
5503if test $ac_cv_header_stdc = yes; then
5504 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506/* end confdefs.h. */
5507#include <stdlib.h>
5508
5509_ACEOF
5510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5511 $EGREP "free" >/dev/null 2>&1; then :
5512
5513else
5514 ac_cv_header_stdc=no
5515fi
5516rm -f conftest*
5517
5518fi
5519
5520if test $ac_cv_header_stdc = yes; then
5521 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5522 if test "$cross_compiling" = yes; then :
5523 :
5524else
5525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5526/* end confdefs.h. */
5527#include <ctype.h>
5528#include <stdlib.h>
5529#if ((' ' & 0x0FF) == 0x020)
5530# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5531# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5532#else
5533# define ISLOWER(c) \
5534 (('a' <= (c) && (c) <= 'i') \
5535 || ('j' <= (c) && (c) <= 'r') \
5536 || ('s' <= (c) && (c) <= 'z'))
5537# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5538#endif
5539
5540#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5541int
5542main ()
5543{
5544 int i;
5545 for (i = 0; i < 256; i++)
5546 if (XOR (islower (i), ISLOWER (i))
5547 || toupper (i) != TOUPPER (i))
5548 return 2;
5549 return 0;
5550}
5551_ACEOF
5552if ac_fn_c_try_run "$LINENO"; then :
5553
5554else
5555 ac_cv_header_stdc=no
5556fi
5557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5558 conftest.$ac_objext conftest.beam conftest.$ac_ext
5559fi
5560
5561fi
5562fi
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5564$as_echo "$ac_cv_header_stdc" >&6; }
5565if test $ac_cv_header_stdc = yes; then
5566
5567$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5568
5569fi
5570
5571# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5572for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5573 inttypes.h stdint.h unistd.h
5574do :
5575 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5576ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5577"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005578if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005579 cat >>confdefs.h <<_ACEOF
5580#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5581_ACEOF
5582
5583fi
5584
5585done
5586
5587
5588
5589 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 +02005590if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 MINIX=yes
5592else
5593 MINIX=
5594fi
5595
5596
5597 if test "$MINIX" = yes; then
5598
5599$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5600
5601
5602$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5603
5604
5605$as_echo "#define _MINIX 1" >>confdefs.h
5606
5607 fi
5608
5609
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5611$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005612if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005613 $as_echo_n "(cached) " >&6
5614else
5615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5616/* end confdefs.h. */
5617
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005618# define __EXTENSIONS__ 1
5619 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005620int
5621main ()
5622{
5623
5624 ;
5625 return 0;
5626}
5627_ACEOF
5628if ac_fn_c_try_compile "$LINENO"; then :
5629 ac_cv_safe_to_define___extensions__=yes
5630else
5631 ac_cv_safe_to_define___extensions__=no
5632fi
5633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634fi
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5636$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5637 test $ac_cv_safe_to_define___extensions__ = yes &&
5638 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5639
5640 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5641
5642 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5643
5644 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5645
5646 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5647
5648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649
Xavier de Gaye95750b12016-07-09 11:05:42 +02005650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5651$as_echo_n "checking for the Android API level... " >&6; }
5652cat >> conftest.c <<EOF
5653#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654android_api = __ANDROID_API__
5655arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656#else
5657#error not Android
5658#endif
5659EOF
5660
5661if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005662 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5663 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5665$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005666 if test -z "$ANDROID_API_LEVEL"; then
5667 echo 'Fatal: you must define __ANDROID_API__'
5668 exit 1
5669 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005670
5671cat >>confdefs.h <<_ACEOF
5672#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5673_ACEOF
5674
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5677$as_echo_n "checking for the Android arm ABI... " >&6; }
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5679$as_echo "$_arm_arch" >&6; }
5680 if test "$_arm_arch" = 7; then
5681 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5682 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5683 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005684else
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5686$as_echo "not Android" >&6; }
5687fi
5688rm -f conftest.c conftest.out
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690# Check for unsupported systems
5691case $ac_sys_system/$ac_sys_release in
5692atheos*|Linux*/1*)
5693 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5694 echo See README for details.
5695 exit 1;;
5696esac
5697
5698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5700$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005703if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 withval=$with_suffix;
5705 case $withval in
5706 no) EXEEXT=;;
5707 yes) EXEEXT=.exe;;
5708 *) EXEEXT=$withval;;
5709 esac
5710fi
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5713$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# Test whether we're running on a non-case-sensitive system, in which
5716# case we give a warning if no ext is given
5717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5719$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720if test ! -d CaseSensitiveTestDir; then
5721mkdir CaseSensitiveTestDir
5722fi
5723
5724if test -d casesensitivetestdir
5725then
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5727$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 BUILDEXEEXT=.exe
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 BUILDEXEEXT=$EXEEXT
5733fi
5734rmdir CaseSensitiveTestDir
5735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736case $ac_sys_system in
5737hp*|HP*)
5738 case $CC in
5739 cc|*/cc) CC="$CC -Ae";;
5740 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741esac
5742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5745$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746if test -z "$LIBRARY"
5747then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005748 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5751$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LDLIBRARY is the name of the library to link against (as opposed to the
5754# name of the library into which to insert object files). BLDLIBRARY is also
5755# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5756# is blank as the main program is not linked directly against LDLIBRARY.
5757# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5758# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5759# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5760# DLLLIBRARY is the shared (i.e., DLL) library.
5761#
5762# RUNSHARED is used to run shared python without installed libraries
5763#
5764# INSTSONAME is the name of the shared library that will be use to install
5765# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005766#
5767# LDVERSION is the shared library version number, normally the Python version
5768# with the ABI build flags appended.
5769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771
5772
5773
5774
5775
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777LDLIBRARY="$LIBRARY"
5778BLDLIBRARY='$(LDLIBRARY)'
5779INSTSONAME='$(LDLIBRARY)'
5780DLLLIBRARY=''
5781LDLIBRARYDIR=''
5782RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005783LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784
5785# LINKCC is the command that links the python executable -- default is $(CC).
5786# If CXX is set, and if it is needed to link a main function that was
5787# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5788# python might then depend on the C++ runtime
5789# This is altered for AIX in order to build the export list before
5790# linking.
5791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5793$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794if test -z "$LINKCC"
5795then
5796 LINKCC='$(PURIFY) $(MAINCC)'
5797 case $ac_sys_system in
5798 AIX*)
5799 exp_extra="\"\""
5800 if test $ac_sys_release -ge 5 -o \
5801 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5802 exp_extra="."
5803 fi
5804 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 QNX*)
5806 # qcc must be used because the other compilers do not
5807 # support -N.
5808 LINKCC=qcc;;
5809 esac
5810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5812$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813
5814# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5815# make sure we default having it set to "no": this is used by
5816# distutils.unixccompiler to know if it should add --enable-new-dtags
5817# to linker command lines, and failing to detect GNU ld simply results
5818# in the same bahaviour as before.
5819
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5821$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822ac_prog=ld
5823if test "$GCC" = yes; then
5824 ac_prog=`$CC -print-prog-name=ld`
5825fi
5826case `"$ac_prog" -V 2>&1 < /dev/null` in
5827 *GNU*)
5828 GNULD=yes;;
5829 *)
5830 GNULD=no;;
5831esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5833$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5836$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005838if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 enableval=$enable_shared;
5840fi
5841
5842
5843if test -z "$enable_shared"
5844then
5845 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005846 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847 enable_shared="yes";;
5848 *)
5849 enable_shared="no";;
5850 esac
5851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5853$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854
Matthias Kloseb9621712010-04-24 17:59:49 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5856$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005858if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005859 enableval=$enable_profiling;
5860fi
5861
5862if test "x$enable_profiling" = xyes; then
5863 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005864 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866/* end confdefs.h. */
5867int main() { return 0; }
5868_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005869if ac_fn_c_try_link "$LINENO"; then :
5870
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005874rm -f core conftest.err conftest.$ac_objext \
5875 conftest$ac_exeext conftest.$ac_ext
5876 CC="$ac_save_cc"
5877else
5878 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5881$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882
doko@ubuntu.comba015832012-06-30 16:52:05 +02005883if test "x$enable_profiling" = xyes; then
5884 BASECFLAGS="-pg $BASECFLAGS"
5885 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
5887
Matthias Kloseb9621712010-04-24 17:59:49 +00005888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5889$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890
5891# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5892# library that we build, but we do not want to link against it (we
5893# will find it with a -framework option). For this reason there is an
5894# extra variable BLDLIBRARY against which Python and the extension
5895# modules are linked, BLDLIBRARY. This is normally the same as
5896# LDLIBRARY, but empty for MacOSX framework builds.
5897if test "$enable_framework"
5898then
5899 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005900 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 BLDLIBRARY=''
5902else
5903 BLDLIBRARY='$(LDLIBRARY)'
5904fi
5905
5906# Other platforms follow
5907if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005908 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909
Matthias Kloseb9621712010-04-24 17:59:49 +00005910$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911
5912 case $ac_sys_system in
5913 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).dll.a'
5915 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 LDLIBRARY='libpython$(LDVERSION).so'
5919 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005920 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005922 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005923 then
5924 PY3LIBRARY=libpython3.so
5925 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005927 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005928 LDLIBRARY='libpython$(LDVERSION).so'
5929 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005930 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005932 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005933 then
5934 PY3LIBRARY=libpython3.so
5935 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
5937 hp*|HP*)
5938 case `uname -m` in
5939 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
5942 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
5945 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005947 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).dylib'
5951 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005954 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005955 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005956 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005957 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958
5959 esac
5960else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005961 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 case $ac_sys_system in
5963 CYGWIN*)
5964 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005965 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
5967 esac
5968fi
5969
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005970if test "$cross_compiling" = yes; then
5971 RUNSHARED=
5972fi
5973
Matthias Kloseb9621712010-04-24 17:59:49 +00005974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5975$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005978if test -n "$ac_tool_prefix"; then
5979 for ac_prog in ar aal
5980 do
5981 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5982set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005985if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987else
5988 if test -n "$AR"; then
5989 ac_cv_prog_AR="$AR" # Let the user override the test.
5990else
5991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994 IFS=$as_save_IFS
5995 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005998 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000 break 2
6001 fi
6002done
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004IFS=$as_save_IFS
6005
6006fi
6007fi
6008AR=$ac_cv_prog_AR
6009if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6011$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012else
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015fi
6016
6017
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006018 test -n "$AR" && break
6019 done
6020fi
6021if test -z "$AR"; then
6022 ac_ct_AR=$AR
6023 for ac_prog in ar aal
6024do
6025 # Extract the first word of "$ac_prog", so it can be a program name with args.
6026set dummy $ac_prog; ac_word=$2
6027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6028$as_echo_n "checking for $ac_word... " >&6; }
6029if ${ac_cv_prog_ac_ct_AR+:} false; then :
6030 $as_echo_n "(cached) " >&6
6031else
6032 if test -n "$ac_ct_AR"; then
6033 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6034else
6035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038 IFS=$as_save_IFS
6039 test -z "$as_dir" && as_dir=.
6040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006042 ac_cv_prog_ac_ct_AR="$ac_prog"
6043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044 break 2
6045 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006047 done
6048IFS=$as_save_IFS
6049
6050fi
6051fi
6052ac_ct_AR=$ac_cv_prog_ac_ct_AR
6053if test -n "$ac_ct_AR"; then
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6055$as_echo "$ac_ct_AR" >&6; }
6056else
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6058$as_echo "no" >&6; }
6059fi
6060
6061
6062 test -n "$ac_ct_AR" && break
6063done
6064
6065 if test "x$ac_ct_AR" = x; then
6066 AR="ar"
6067 else
6068 case $cross_compiling:$ac_tool_warned in
6069yes:)
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6072ac_tool_warned=yes ;;
6073esac
6074 AR=$ac_ct_AR
6075 fi
6076fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077
6078
6079# tweak ARFLAGS only if the user didn't set it on the command line
6080
6081if test -z "$ARFLAGS"
6082then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006083 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084fi
6085
doko@ubuntu.com58844492012-06-30 18:25:32 +02006086if test -n "$ac_tool_prefix"; then
6087 for ac_prog in readelf
6088 do
6089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092$as_echo_n "checking for $ac_word... " >&6; }
6093if ${ac_cv_prog_READELF+:} false; then :
6094 $as_echo_n "(cached) " >&6
6095else
6096 if test -n "$READELF"; then
6097 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6098else
6099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102 IFS=$as_save_IFS
6103 test -z "$as_dir" && as_dir=.
6104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006106 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108 break 2
6109 fi
6110done
6111 done
6112IFS=$as_save_IFS
6113
6114fi
6115fi
6116READELF=$ac_cv_prog_READELF
6117if test -n "$READELF"; then
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6119$as_echo "$READELF" >&6; }
6120else
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126 test -n "$READELF" && break
6127 done
6128fi
6129if test -z "$READELF"; then
6130 ac_ct_READELF=$READELF
6131 for ac_prog in readelf
6132do
6133 # Extract the first word of "$ac_prog", so it can be a program name with args.
6134set dummy $ac_prog; ac_word=$2
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
6137if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6138 $as_echo_n "(cached) " >&6
6139else
6140 if test -n "$ac_ct_READELF"; then
6141 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6142else
6143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146 IFS=$as_save_IFS
6147 test -z "$as_dir" && as_dir=.
6148 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006150 ac_cv_prog_ac_ct_READELF="$ac_prog"
6151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152 break 2
6153 fi
6154done
6155 done
6156IFS=$as_save_IFS
6157
6158fi
6159fi
6160ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6161if test -n "$ac_ct_READELF"; then
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6163$as_echo "$ac_ct_READELF" >&6; }
6164else
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166$as_echo "no" >&6; }
6167fi
6168
6169
6170 test -n "$ac_ct_READELF" && break
6171done
6172
6173 if test "x$ac_ct_READELF" = x; then
6174 READELF=":"
6175 else
6176 case $cross_compiling:$ac_tool_warned in
6177yes:)
6178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6180ac_tool_warned=yes ;;
6181esac
6182 READELF=$ac_ct_READELF
6183 fi
6184fi
6185
6186if test "$cross_compiling" = yes; then
6187 case "$READELF" in
6188 readelf|:)
6189 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6190 ;;
6191 esac
6192fi
6193
6194
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006197hp*|HP*)
6198 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199 if test -z "$INSTALL"
6200 then
6201 INSTALL="${srcdir}/install-sh -c"
6202 fi
6203esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204# Find a good install program. We prefer a C program (faster),
6205# so one script is as good as another. But avoid the broken or
6206# incompatible versions:
6207# SysV /etc/install, /usr/sbin/install
6208# SunOS /usr/etc/install
6209# IRIX /sbin/install
6210# AIX /bin/install
6211# AmigaOS /C/install, which installs bootblocks on floppy discs
6212# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6213# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6214# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6215# OS/2's system install, which has a completely different semantic
6216# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006217# Reject install programs that cannot install multiple files.
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6219$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006221if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006222 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223else
6224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225for as_dir in $PATH
6226do
6227 IFS=$as_save_IFS
6228 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 # Account for people who put trailing slashes in PATH elements.
6230case $as_dir/ in #((
6231 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006233 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234 /usr/ucb/* ) ;;
6235 *)
6236 # OSF1 and SCO ODT 3.0 have their own names for install.
6237 # Don't use installbsd from OSF since it installs stuff as root
6238 # by default.
6239 for ac_prog in ginstall scoinst install; do
6240 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006241 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242 if test $ac_prog = install &&
6243 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6244 # AIX install. It has an incompatible calling convention.
6245 :
6246 elif test $ac_prog = install &&
6247 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6248 # program-specific install script used by HP pwplus--don't use.
6249 :
6250 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 rm -rf conftest.one conftest.two conftest.dir
6252 echo one > conftest.one
6253 echo two > conftest.two
6254 mkdir conftest.dir
6255 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6256 test -s conftest.one && test -s conftest.two &&
6257 test -s conftest.dir/conftest.one &&
6258 test -s conftest.dir/conftest.two
6259 then
6260 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6261 break 3
6262 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263 fi
6264 fi
6265 done
6266 done
6267 ;;
6268esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006269
6270 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271IFS=$as_save_IFS
6272
Matthias Kloseb9621712010-04-24 17:59:49 +00006273rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274
6275fi
6276 if test "${ac_cv_path_install+set}" = set; then
6277 INSTALL=$ac_cv_path_install
6278 else
6279 # As a last resort, use the slow shell script. Don't cache a
6280 # value for INSTALL within a source directory, because that will
6281 # break other packages using the cache if that directory is
6282 # removed, or if the value is a relative name.
6283 INSTALL=$ac_install_sh
6284 fi
6285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6287$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288
6289# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6290# It thinks the first close brace ends the variable substitution.
6291test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6292
6293test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6294
6295test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6296
Matthias Klose93a0ef12012-03-15 18:08:34 +01006297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6298$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6299if test -z "$MKDIR_P"; then
6300 if ${ac_cv_path_mkdir+:} false; then :
6301 $as_echo_n "(cached) " >&6
6302else
6303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6305do
6306 IFS=$as_save_IFS
6307 test -z "$as_dir" && as_dir=.
6308 for ac_prog in mkdir gmkdir; do
6309 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006310 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006311 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6312 'mkdir (GNU coreutils) '* | \
6313 'mkdir (coreutils) '* | \
6314 'mkdir (fileutils) '4.1*)
6315 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6316 break 3;;
6317 esac
6318 done
6319 done
6320 done
6321IFS=$as_save_IFS
6322
6323fi
6324
6325 test -d ./--version && rmdir ./--version
6326 if test "${ac_cv_path_mkdir+set}" = set; then
6327 MKDIR_P="$ac_cv_path_mkdir -p"
6328 else
6329 # As a last resort, use the slow shell script. Don't cache a
6330 # value for MKDIR_P within a source directory, because that will
6331 # break other packages using the cache if that directory is
6332 # removed, or if the value is a relative name.
6333 MKDIR_P="$ac_install_sh -d"
6334 fi
6335fi
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6337$as_echo "$MKDIR_P" >&6; }
6338
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339
6340# Not every filesystem supports hard links
6341
6342if test -z "$LN" ; then
6343 case $ac_sys_system in
6344 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345 *) LN=ln;;
6346 esac
6347fi
6348
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006349# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006350
6351ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006352
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6355$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356
6357# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006358if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359 withval=$with_pydebug;
6360if test "$withval" != no
6361then
6362
Matthias Kloseb9621712010-04-24 17:59:49 +00006363$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364
Matthias Kloseb9621712010-04-24 17:59:49 +00006365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6366$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006368 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006369else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371fi
6372else
Matthias Kloseb9621712010-04-24 17:59:49 +00006373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375fi
6376
6377
T. Woutersddbfa2c2017-05-23 01:30:49 +02006378# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6379# the ABI. This allows enabling assertions without changing the ABI.
6380assertions='false'
6381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6382$as_echo_n "checking for --with-assertions... " >&6; }
6383
6384# Check whether --with-assertions was given.
6385if test "${with_assertions+set}" = set; then :
6386 withval=$with_assertions;
6387if test "$withval" != no
6388then
6389 assertions='true'
6390fi
6391fi
6392
6393if test "$assertions" = 'true'; then
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6395$as_echo "yes" >&6; }
6396elif test "$Py_DEBUG" = 'true'; then
6397 assertions='true'
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6399$as_echo "implied by --with-pydebug" >&6; }
6400else
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402$as_echo "no" >&6; }
6403fi
6404
Brett Cannon63d98bc2016-09-06 17:12:40 -07006405# Enable optimization flags
6406
6407
6408Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6410$as_echo_n "checking for --enable-optimizations... " >&6; }
6411# Check whether --enable-optimizations was given.
6412if test "${enable_optimizations+set}" = set; then :
6413 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006414if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006415then
6416 Py_OPT='true'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6418$as_echo "yes" >&6; };
6419else
6420 Py_OPT='false'
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; };
6423fi
6424else
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; }
6427fi
6428
6429if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006430 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6431 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006432 # 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 +00006433 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006434 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006435 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006436 DEF_MAKE_RULE="build_all"
6437else
6438 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006439 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006440 DEF_MAKE_RULE="all"
6441fi
6442
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006443# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6444# normal names in the default $PATH (ie: Ubuntu). They exist under the
6445# non-suffixed name in their versioned llvm directory.
6446
6447llvm_bin_dir=''
6448llvm_path="${PATH}"
6449if test "${CC}" = "clang"
6450then
6451 clang_bin=`which clang`
6452 # Some systems install clang elsewhere as a symlink to the real path
6453 # which is where the related llvm tools are located.
6454 if test -L "${clang_bin}"
6455 then
6456 clang_dir=`dirname "${clang_bin}"`
6457 clang_bin=`readlink "${clang_bin}"`
6458 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6459 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6460 fi
6461fi
6462
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006463# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6465$as_echo_n "checking for --with-lto... " >&6; }
6466
6467# Check whether --with-lto was given.
6468if test "${with_lto+set}" = set; then :
6469 withval=$with_lto;
6470if test "$withval" != no
6471then
6472 Py_LTO='true'
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6474$as_echo "yes" >&6; };
6475else
6476 Py_LTO='false'
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6478$as_echo "no" >&6; };
6479fi
6480else
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485if test "$Py_LTO" = 'true' ; then
6486 case $CC in
6487 *clang*)
Miss Islington (bot)1bb9dd32018-06-22 00:10:20 -07006488
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006490$as_echo_n "checking target system type... " >&6; }
6491if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006492 $as_echo_n "(cached) " >&6
6493else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006494 if test "x$target_alias" = x; then
6495 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006496else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6498 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6499fi
6500
6501fi
6502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6503$as_echo "$ac_cv_target" >&6; }
6504case $ac_cv_target in
6505*-*-*) ;;
6506*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6507esac
6508target=$ac_cv_target
6509ac_save_IFS=$IFS; IFS='-'
6510set x $ac_cv_target
6511shift
6512target_cpu=$1
6513target_vendor=$2
6514shift; shift
6515# Remember, the first character of IFS is used to create $*,
6516# except with old shells:
6517target_os=$*
6518IFS=$ac_save_IFS
6519case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6520
6521
6522# The aliases save the names the user supplied, while $host etc.
6523# will get canonicalized.
6524test -n "$target_alias" &&
6525 test "$program_prefix$program_suffix$program_transform_name" = \
6526 NONENONEs,x,x, &&
6527 program_prefix=${target_alias}-
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006528# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6529set dummy $target_alias-llvm-ar; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_LLVM_AR+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534else
6535 case $LLVM_AR in
6536 [\\/]* | ?:[\\/]*)
6537 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6538 ;;
6539 *)
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in ${llvm_path}
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551done
6552 done
6553IFS=$as_save_IFS
6554
6555 ;;
6556esac
6557fi
6558LLVM_AR=$ac_cv_path_LLVM_AR
6559if test -n "$LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6561$as_echo "$LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567
6568if test -z "$ac_cv_path_LLVM_AR"; then
6569 if test "$build" = "$target"; then
6570 ac_pt_LLVM_AR=$LLVM_AR
6571 # Extract the first word of "llvm-ar", so it can be a program name with args.
6572set dummy llvm-ar; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6576 $as_echo_n "(cached) " >&6
6577else
6578 case $ac_pt_LLVM_AR in
6579 [\\/]* | ?:[\\/]*)
6580 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6581 ;;
6582 *)
6583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in ${llvm_path}
6585do
6586 IFS=$as_save_IFS
6587 test -z "$as_dir" && as_dir=.
6588 for ac_exec_ext in '' $ac_executable_extensions; do
6589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592 break 2
6593 fi
6594done
6595 done
6596IFS=$as_save_IFS
6597
6598 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6599 ;;
6600esac
6601fi
6602ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6603if test -n "$ac_pt_LLVM_AR"; then
6604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6605$as_echo "$ac_pt_LLVM_AR" >&6; }
6606else
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608$as_echo "no" >&6; }
6609fi
6610
6611 LLVM_AR=$ac_pt_LLVM_AR
6612 else
6613 LLVM_AR="''"
6614 fi
6615else
6616 LLVM_AR="$ac_cv_path_LLVM_AR"
6617fi
6618
6619
6620 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6621 then
6622 LLVM_AR_FOUND="found"
6623 else
6624 LLVM_AR_FOUND="not-found"
6625 fi
6626 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6627 then
6628 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6629 if test -n "${found_llvm_ar}"
6630 then
6631 LLVM_AR='/usr/bin/xcrun llvm-ar'
6632 LLVM_AR_FOUND=found
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6634$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6635 fi
6636 fi
6637 if test $LLVM_AR_FOUND = not-found
6638 then
6639 LLVM_PROFR_ERR=yes
6640 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6641 else
6642 LLVM_AR_ERR=no
6643 fi
6644 AR="${LLVM_AR}"
6645 case $ac_sys_system in
6646 Darwin*)
6647 # Any changes made here should be reflected in the GCC+Darwin case below
6648 LTOFLAGS="-flto -Wl,-export_dynamic"
6649 ;;
6650 *)
6651 LTOFLAGS="-flto"
6652 ;;
6653 esac
6654 ;;
6655 *gcc*)
6656 case $ac_sys_system in
6657 Darwin*)
6658 LTOFLAGS="-flto -Wl,-export_dynamic"
6659 ;;
6660 *)
6661 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6662 ;;
6663 esac
6664 ;;
6665 esac
6666
6667 if test "$ac_cv_prog_cc_g" = "yes"
6668 then
6669 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6670 # to get debug symbols.
6671 LTOFLAGS="$LTOFLAGS -g"
6672 fi
6673
Miss Islington (bot)17514232018-12-04 07:06:16 -08006674 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
Victor Stinner0198f522018-12-20 16:03:01 +01006675 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006676fi
6677
6678# Enable PGO flags.
6679
6680
6681
6682
6683
6684
Gregory P. Smith799520c2016-09-07 16:10:00 -07006685# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6686set dummy $target_alias-llvm-profdata; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6690 $as_echo_n "(cached) " >&6
6691else
6692 case $LLVM_PROFDATA in
6693 [\\/]* | ?:[\\/]*)
6694 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6695 ;;
6696 *)
6697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699do
6700 IFS=$as_save_IFS
6701 test -z "$as_dir" && as_dir=.
6702 for ac_exec_ext in '' $ac_executable_extensions; do
6703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006704 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706 break 2
6707 fi
6708done
6709 done
6710IFS=$as_save_IFS
6711
Gregory P. Smith799520c2016-09-07 16:10:00 -07006712 ;;
6713esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006714fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006715LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6716if test -n "$LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6718$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
Gregory P. Smith799520c2016-09-07 16:10:00 -07006725if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6726 if test "$build" = "$target"; then
6727 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6728 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6729set dummy llvm-profdata; ac_word=$2
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731$as_echo_n "checking for $ac_word... " >&6; }
6732if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6733 $as_echo_n "(cached) " >&6
6734else
6735 case $ac_pt_LLVM_PROFDATA in
6736 [\\/]* | ?:[\\/]*)
6737 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6738 ;;
6739 *)
6740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in ${llvm_path}
6742do
6743 IFS=$as_save_IFS
6744 test -z "$as_dir" && as_dir=.
6745 for ac_exec_ext in '' $ac_executable_extensions; do
6746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749 break 2
6750 fi
6751done
6752 done
6753IFS=$as_save_IFS
6754
6755 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6756 ;;
6757esac
6758fi
6759ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6760if test -n "$ac_pt_LLVM_PROFDATA"; then
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6762$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6763else
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6765$as_echo "no" >&6; }
6766fi
6767
6768 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6769 else
6770 LLVM_PROFDATA="''"
6771 fi
6772else
6773 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6774fi
6775
6776
6777if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6778then
6779 LLVM_PROF_FOUND="found"
6780else
6781 LLVM_PROF_FOUND="not-found"
6782fi
6783if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6784then
6785 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6786 if test -n "${found_llvm_profdata}"
6787 then
6788 # llvm-profdata isn't directly in $PATH in some cases.
6789 # https://apple.stackexchange.com/questions/197053/
6790 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6791 LLVM_PROF_FOUND=found
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6793$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6794 fi
6795fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796LLVM_PROF_ERR=no
6797case $CC in
6798 *clang*)
6799 # Any changes made here should be reflected in the GCC+Darwin case below
6800 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6804 if test $LLVM_PROF_FOUND = not-found
6805 then
6806 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 if test "${REQUIRE_PGO}" = "yes"
6808 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006809 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 -07006810 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 fi
6812 ;;
6813 *gcc*)
6814 case $ac_sys_system in
6815 Darwin*)
6816 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6817 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006818 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006819 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006820 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 then
6822 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006823 if test "${REQUIRE_PGO}" = "yes"
6824 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006825 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 -07006826 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827 fi
6828 ;;
6829 *)
6830 PGO_PROF_GEN_FLAG="-fprofile-generate"
6831 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6832 LLVM_PROF_MERGER="true"
6833 LLVM_PROF_FILE=""
6834 ;;
6835 esac
6836 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006837 *icc*)
6838 PGO_PROF_GEN_FLAG="-prof-gen"
6839 PGO_PROF_USE_FLAG="-prof-use"
6840 LLVM_PROF_MERGER="true"
6841 LLVM_PROF_FILE=""
6842 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006843esac
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6846# merged with this chunk of code?
6847
6848# Optimizer/debugger flags
6849# ------------------------
6850# (The following bit of code is complicated enough - please keep things
6851# indented properly. Just pretend you're editing Python code. ;-)
6852
6853# There are two parallel sets of case statements below, one that checks to
6854# see if OPT was set and one that does BASECFLAGS setting based upon
6855# compiler and platform. BASECFLAGS tweaks need to be made even if the
6856# user set OPT.
6857
6858# tweak OPT based on compiler and platform, only if the user didn't set
6859# it on the command line
6860
Victor Stinner9ed34a82017-05-02 22:35:58 +02006861
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006862if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863then
6864 case $GCC in
6865 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6867 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6868 WRAP="-fwrapv"
6869 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006870
Stefan Krahaf04ff22011-12-08 22:20:31 +01006871 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006872 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006873 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006874 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006875 *)
6876 if $CC --version 2>&1 | grep -q clang
6877 then
6878 cc_is_clang=1
6879 else
6880 cc_is_clang=
6881 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006882 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006883
Victor Stinner35f3d242017-04-21 12:35:24 +02006884 if test -n "${cc_is_clang}"
6885 then
6886 # Clang also needs -fwrapv
6887 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006888 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6889 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006890 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006891 fi
6892
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 case $ac_cv_prog_cc_g in
6894 yes)
6895 if test "$Py_DEBUG" = 'true' ; then
6896 # Optimization messes up debuggers, so turn it off for
6897 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006898 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006899 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006900 else
Victor Stinner28205b22017-04-21 11:24:34 +02006901 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006902 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 else
Victor Stinner28205b22017-04-21 11:24:34 +02006904 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905 fi
6906 ;;
6907 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006908 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909 ;;
6910 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912 case $ac_sys_system in
6913 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6914 ;;
6915 esac
6916 ;;
6917
6918 *)
6919 OPT="-O"
6920 ;;
6921 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
6923
6924
6925
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006926
Victor Stinner0198f522018-12-20 16:03:01 +01006927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928# The -arch flags for universal builds on OSX
6929UNIVERSAL_ARCH_FLAGS=
6930
6931
6932# tweak BASECFLAGS based on compiler and platform
6933case $GCC in
6934yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006935 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006936
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6938$as_echo_n "checking for -Wextra... " >&6; }
6939 ac_save_cc="$CC"
6940 CC="$CC -Wextra -Werror"
6941 if ${ac_cv_extra_warnings+:} false; then :
6942 $as_echo_n "(cached) " >&6
6943else
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h. */
6946
6947
6948int
6949main ()
6950{
6951
6952 ;
6953 return 0;
6954}
6955
6956_ACEOF
6957if ac_fn_c_try_compile "$LINENO"; then :
6958
6959 ac_cv_extra_warnings=yes
6960
6961else
6962
6963 ac_cv_extra_warnings=no
6964
6965fi
6966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967fi
6968
6969 CC="$ac_save_cc"
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6971$as_echo "$ac_cv_extra_warnings" >&6; }
6972
6973 if test $ac_cv_extra_warnings = yes
6974 then
6975 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6976 fi
6977
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978 # Python doesn't violate C99 aliasing rules, but older versions of
6979 # GCC produce warnings for legal Python code. Enable
6980 # -fno-strict-aliasing on versions of GCC that support but produce
6981 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6983$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 ac_save_cc="$CC"
6985 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006987 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006992
Matthias Kloseb159a552010-04-25 21:00:44 +00006993
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006994int
6995main ()
6996{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006997
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006998 ;
6999 return 0;
7000}
Matthias Kloseb159a552010-04-25 21:00:44 +00007001
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007003if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
7005 CC="$ac_save_cc -fstrict-aliasing"
7006 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008/* end confdefs.h. */
7009
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007010 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011int
7012main ()
7013{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007014double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015 ;
7016 return 0;
7017}
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007020if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007021
7022 ac_cv_no_strict_aliasing=no
7023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024else
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=yes
7027
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007028fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031else
Matthias Kloseb159a552010-04-25 21:00:44 +00007032
7033 ac_cv_no_strict_aliasing=no
7034
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007037fi
7038
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007039 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007040 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7042$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007043 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007044 then
7045 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7046 fi
7047
Zachary Ware5af85642015-12-21 12:09:17 -06007048 # ICC doesn't recognize the option, but only emits a warning
7049 ## XXX does it emit an unused result warning and can it be disabled?
7050 case "$CC" in
7051 *icc*)
7052 ac_cv_disable_unused_result_warning=no
7053 ;;
7054 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7056$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7057 ac_save_cc="$CC"
7058 CC="$CC -Wunused-result -Werror"
7059 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007060 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007061 $as_echo_n "(cached) " >&6
7062else
7063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7064/* end confdefs.h. */
7065
7066
7067int
7068main ()
7069{
7070
7071 ;
7072 return 0;
7073}
7074
7075_ACEOF
7076if ac_fn_c_try_compile "$LINENO"; then :
7077
7078 ac_cv_disable_unused_result_warning=yes
7079
7080else
7081
7082 ac_cv_disable_unused_result_warning=no
7083
7084fi
7085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7086fi
7087
7088 CFLAGS="$save_CFLAGS"
7089 CC="$ac_save_cc"
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7091$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007092 ;;
7093 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007094
7095 if test $ac_cv_disable_unused_result_warning = yes
7096 then
7097 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007098 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7099 fi
7100
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7102$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7103 ac_save_cc="$CC"
7104 CC="$CC -Wunused-parameter -Werror"
7105 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7106 $as_echo_n "(cached) " >&6
7107else
7108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7109/* end confdefs.h. */
7110
7111
7112int
7113main ()
7114{
7115
7116 ;
7117 return 0;
7118}
7119
7120_ACEOF
7121if ac_fn_c_try_compile "$LINENO"; then :
7122
7123 ac_cv_disable_unused_parameter_warning=yes
7124
7125else
7126
7127 ac_cv_disable_unused_parameter_warning=no
7128
7129fi
7130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7131fi
7132
7133 CC="$ac_save_cc"
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7135$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7136
7137 if test $ac_cv_disable_unused_parameter_warning = yes
7138 then
7139 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7140 fi
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7143$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7144 ac_save_cc="$CC"
7145 CC="$CC -Wmissing-field-initializers -Werror"
7146 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7147 $as_echo_n "(cached) " >&6
7148else
7149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7150/* end confdefs.h. */
7151
7152
7153int
7154main ()
7155{
7156
7157 ;
7158 return 0;
7159}
7160
7161_ACEOF
7162if ac_fn_c_try_compile "$LINENO"; then :
7163
7164 ac_cv_disable_missing_field_initializers=yes
7165
7166else
7167
7168 ac_cv_disable_missing_field_initializers=no
7169
7170fi
7171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7172fi
7173
7174 CC="$ac_save_cc"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7176$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7177
7178 if test $ac_cv_disable_missing_field_initializers = yes
7179 then
7180 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007181 fi
7182
Serhiy Storchakaef91dde2018-05-25 13:16:51 +03007183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
7184$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
7185 ac_save_cc="$CC"
7186 CC="$CC -Wcast-function-type -Werror"
7187 if ${ac_cv_disable_cast_function_type+:} false; then :
7188 $as_echo_n "(cached) " >&6
7189else
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192
7193
7194int
7195main ()
7196{
7197
7198 ;
7199 return 0;
7200}
7201
7202_ACEOF
7203if ac_fn_c_try_compile "$LINENO"; then :
7204
7205 ac_cv_disable_cast_function_type=yes
7206
7207else
7208
7209 ac_cv_disable_cast_function_type=no
7210
7211fi
7212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7213fi
7214
7215 CC="$ac_save_cc"
7216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
7217$as_echo "$ac_cv_disable_cast_function_type" >&6; }
7218
7219 if test $ac_cv_disable_cast_function_type = yes
7220 then
7221 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
7222 fi
7223
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7225$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7226 ac_save_cc="$CC"
7227 CC="$CC -Wsign-compare"
7228 save_CFLAGS="$CFLAGS"
7229 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7230 $as_echo_n "(cached) " >&6
7231else
7232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7233/* end confdefs.h. */
7234
7235
7236int
7237main ()
7238{
7239
7240 ;
7241 return 0;
7242}
7243
7244_ACEOF
7245if ac_fn_c_try_compile "$LINENO"; then :
7246
7247 ac_cv_enable_sign_compare_warning=yes
7248
7249else
7250
7251 ac_cv_enable_sign_compare_warning=no
7252
7253fi
7254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7255fi
7256
7257 CFLAGS="$save_CFLAGS"
7258 CC="$ac_save_cc"
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7260$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7261
7262 if test $ac_cv_enable_sign_compare_warning = yes
7263 then
7264 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7265 fi
7266
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7268$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7269 ac_save_cc="$CC"
7270 CC="$CC -Wunreachable-code"
7271 save_CFLAGS="$CFLAGS"
7272 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7273 $as_echo_n "(cached) " >&6
7274else
7275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7276/* end confdefs.h. */
7277
7278
7279int
7280main ()
7281{
7282
7283 ;
7284 return 0;
7285}
7286
7287_ACEOF
7288if ac_fn_c_try_compile "$LINENO"; then :
7289
7290 ac_cv_enable_unreachable_code_warning=yes
7291
7292else
7293
7294 ac_cv_enable_unreachable_code_warning=no
7295
7296fi
7297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7298fi
7299
7300 CFLAGS="$save_CFLAGS"
7301 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007302
7303 # Don't enable unreachable code warning in debug mode, since it usually
7304 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007305 # Issue #24324: Unfortunately, the unreachable code warning does not work
7306 # correctly on gcc and has been silently removed from the compiler.
7307 # It is supported on clang but on OS X systems gcc may be an alias
7308 # for clang. Try to determine if the compiler is not really gcc and,
7309 # if so, only then enable the warning.
7310 if test $ac_cv_enable_unreachable_code_warning = yes && \
7311 test "$Py_DEBUG" != "true" && \
7312 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007313 then
7314 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007315 else
7316 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007317 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7319$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007320
Miss Islington (bot)d6e789c2018-06-05 17:12:06 -07007321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7322$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7323 ac_save_cc="$CC"
7324 CC="$CC -Werror -Wstrict-prototypes"
7325 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7326 $as_echo_n "(cached) " >&6
7327else
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329/* end confdefs.h. */
7330
7331
7332int
7333main ()
7334{
7335
7336 ;
7337 return 0;
7338}
7339
7340_ACEOF
7341if ac_fn_c_try_compile "$LINENO"; then :
7342
7343 ac_cv_enable_strict_prototypes_warning=yes
7344
7345else
7346
7347 ac_cv_enable_strict_prototypes_warning=no
7348
7349fi
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351fi
7352
7353 CC="$ac_save_cc"
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7355$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7356
7357 if test $ac_cv_enable_strict_prototypes_warning = yes
7358 then
7359 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7360 fi
7361
Victor Stinner193ee0a2017-02-06 14:24:00 +01007362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7363$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7364 ac_save_cc="$CC"
7365 CC="$CC -Werror=implicit-function-declaration"
7366 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7367 $as_echo_n "(cached) " >&6
7368else
7369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7370/* end confdefs.h. */
7371
7372
7373int
7374main ()
7375{
7376
7377 ;
7378 return 0;
7379}
7380
7381_ACEOF
7382if ac_fn_c_try_compile "$LINENO"; then :
7383
7384 ac_cv_enable_implicit_function_declaration_error=yes
7385
7386else
7387
7388 ac_cv_enable_implicit_function_declaration_error=no
7389
7390fi
7391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7392fi
7393
7394 CC="$ac_save_cc"
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7396$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7397
7398 if test $ac_cv_enable_implicit_function_declaration_error = yes
7399 then
7400 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7401 fi
7402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7404 # support. Without this, treatment of subnormals doesn't follow
7405 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007406 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407 alpha*)
7408 BASECFLAGS="$BASECFLAGS -mieee"
7409 ;;
7410 esac
7411
7412 case $ac_sys_system in
7413 SCO_SV*)
7414 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7415 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007416
7417 # is there any other compiler on Darwin besides gcc?
7418 Darwin*)
7419 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7420 # used to be here, but non-Apple gcc doesn't accept them.
7421 if test "${CC}" = gcc
7422 then
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007424$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007425 case "${UNIVERSALSDK}" in
7426 */MacOSX10.4u.sdk)
7427 # Build using 10.4 SDK, force usage of gcc when the
7428 # compiler is gcc, otherwise the user will get very
7429 # confusing error messages when building on OSX 10.6
7430 CC=gcc-4.0
7431 CPP=cpp-4.0
7432 ;;
7433 esac
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437
Ned Deily87adb6e2013-10-18 21:09:56 -07007438 if test "${enable_universalsdk}"
7439 then
7440 case "$UNIVERSAL_ARCHS" in
7441 32-bit)
7442 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7443 LIPO_32BIT_FLAGS=""
7444 ARCH_RUN_32BIT=""
7445 ;;
7446 64-bit)
7447 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7448 LIPO_32BIT_FLAGS=""
7449 ARCH_RUN_32BIT="true"
7450 ;;
7451 all)
7452 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7453 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7454 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7455 ;;
7456 intel)
7457 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7458 LIPO_32BIT_FLAGS="-extract i386"
7459 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7460 ;;
7461 intel-32)
7462 UNIVERSAL_ARCH_FLAGS="-arch i386"
7463 LIPO_32BIT_FLAGS=""
7464 ARCH_RUN_32BIT=""
7465 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007466 intel-64)
7467 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7468 LIPO_32BIT_FLAGS=""
7469 ARCH_RUN_32BIT="true"
7470 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007471 3-way)
7472 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7473 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7474 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7475 ;;
7476 *)
7477 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7478 ;;
7479 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480
Ned Deily87adb6e2013-10-18 21:09:56 -07007481 if test "${UNIVERSALSDK}" != "/"
7482 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007483 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7484 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007485 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007486 else
7487 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7488 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007489 fi
7490 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491
Ned Deily87adb6e2013-10-18 21:09:56 -07007492 # Calculate an appropriate deployment target for this build:
7493 # The deployment target value is used explicitly to enable certain
7494 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007495 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 # component of the string returned by distutils.get_platform().
7497 #
7498 # Use the value from:
7499 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7500 # 2. the operating system version of the build machine if >= 10.6
7501 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7502 # below to pick either 10.3, 10.4, or 10.5 as the target.
7503 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
Ned Deily87adb6e2013-10-18 21:09:56 -07007505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7506$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007507 cur_target_major=`sw_vers -productVersion | \
7508 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7509 cur_target_minor=`sw_vers -productVersion | \
7510 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7511 cur_target="${cur_target_major}.${cur_target_minor}"
7512 if test ${cur_target_major} -eq 10 && \
7513 test ${cur_target_minor} -ge 3 && \
7514 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007515 then
Ned Deily36820b62014-06-25 13:44:22 -07007516 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007517 cur_target=10.3
7518 if test ${enable_universalsdk}
7519 then
7520 case "$UNIVERSAL_ARCHS" in
7521 all|3-way|intel|64-bit)
7522 # These configurations were first supported in 10.5
7523 cur_target='10.5'
7524 ;;
7525 esac
7526 else
7527 if test `/usr/bin/arch` = "i386"
7528 then
7529 # 10.4 was the first release to support Intel archs
7530 cur_target="10.4"
7531 fi
7532 fi
7533 fi
7534 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007535
Ned Deily87adb6e2013-10-18 21:09:56 -07007536 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7537 # environment with a value that is the same as what we'll use
7538 # in the Makefile to ensure that we'll get the same compiler
7539 # environment during configure and build time.
7540 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7541 export MACOSX_DEPLOYMENT_TARGET
7542 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7544$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007545
Ned Deily87adb6e2013-10-18 21:09:56 -07007546 # end of Darwin* tests
7547 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548 esac
7549 ;;
7550
7551*)
7552 case $ac_sys_system in
7553 OpenUNIX*|UnixWare*)
7554 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7555 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556 SCO_SV*)
7557 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7558 ;;
7559 esac
7560 ;;
7561esac
7562
Zachary Ware5af85642015-12-21 12:09:17 -06007563# ICC needs -fp-model strict or floats behave badly
7564case "$CC" in
7565*icc*)
7566 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7567 ;;
7568esac
7569
T. Woutersddbfa2c2017-05-23 01:30:49 +02007570if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571 :
7572else
7573 OPT="-DNDEBUG $OPT"
7574fi
7575
7576if test "$ac_arch_flags"
7577then
7578 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7579fi
7580
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581# On some compilers, pthreads are available without further options
7582# (e.g. MacOS X). On some of these systems, the compiler will not
7583# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7584# So we have to see first whether pthreads are available without
7585# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7587$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007588if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590else
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592 ac_cv_pthread_is_default=no
7593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595/* end confdefs.h. */
7596
Stefan Krah7dba5942012-11-22 22:49:11 +01007597#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598#include <pthread.h>
7599
7600void* routine(void* p){return NULL;}
7601
7602int main(){
7603 pthread_t p;
7604 if(pthread_create(&p,NULL,routine,NULL)!=0)
7605 return 1;
7606 (void)pthread_detach(p);
7607 return 0;
7608}
7609
7610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007611if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612
7613 ac_cv_pthread_is_default=yes
7614 ac_cv_kthread=no
7615 ac_cv_pthread=no
7616
7617else
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622fi
7623
7624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
7626
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7628$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629
7630
7631if test $ac_cv_pthread_is_default = yes
7632then
7633 ac_cv_kpthread=no
7634else
7635# -Kpthread, if available, provides the right #defines
7636# and linker options to make pthread_create available
7637# Some compilers won't report that they do not support -Kpthread,
7638# so we need to run a program to see whether it really made the
7639# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7641$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007642if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644else
7645 ac_save_cc="$CC"
7646CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007647if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648 ac_cv_kpthread=no
7649else
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651/* end confdefs.h. */
7652
Stefan Krah7dba5942012-11-22 22:49:11 +01007653#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654#include <pthread.h>
7655
7656void* routine(void* p){return NULL;}
7657
7658int main(){
7659 pthread_t p;
7660 if(pthread_create(&p,NULL,routine,NULL)!=0)
7661 return 1;
7662 (void)pthread_detach(p);
7663 return 0;
7664}
7665
7666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007667if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668 ac_cv_kpthread=yes
7669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674fi
7675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676CC="$ac_save_cc"
7677fi
7678
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7680$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
7682
7683if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7684then
7685# -Kthread, if available, provides the right #defines
7686# and linker options to make pthread_create available
7687# Some compilers won't report that they do not support -Kthread,
7688# so we need to run a program to see whether it really made the
7689# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7691$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007692if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694else
7695 ac_save_cc="$CC"
7696CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007697if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698 ac_cv_kthread=no
7699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701/* end confdefs.h. */
7702
Stefan Krah7dba5942012-11-22 22:49:11 +01007703#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704#include <pthread.h>
7705
7706void* routine(void* p){return NULL;}
7707
7708int main(){
7709 pthread_t p;
7710 if(pthread_create(&p,NULL,routine,NULL)!=0)
7711 return 1;
7712 (void)pthread_detach(p);
7713 return 0;
7714}
7715
7716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007717if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718 ac_cv_kthread=yes
7719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724fi
7725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726CC="$ac_save_cc"
7727fi
7728
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7730$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731fi
7732
7733if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7734then
7735# -pthread, if available, provides the right #defines
7736# and linker options to make pthread_create available
7737# Some compilers won't report that they do not support -pthread,
7738# so we need to run a program to see whether it really made the
7739# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7741$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007742if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744else
7745 ac_save_cc="$CC"
7746CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007747if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748 ac_cv_pthread=no
7749else
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751/* end confdefs.h. */
7752
Stefan Krah7dba5942012-11-22 22:49:11 +01007753#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754#include <pthread.h>
7755
7756void* routine(void* p){return NULL;}
7757
7758int main(){
7759 pthread_t p;
7760 if(pthread_create(&p,NULL,routine,NULL)!=0)
7761 return 1;
7762 (void)pthread_detach(p);
7763 return 0;
7764}
7765
7766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768 ac_cv_pthread=yes
7769else
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
7775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776CC="$ac_save_cc"
7777fi
7778
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7780$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781fi
7782
7783# If we have set a CC compiler flag for thread support then
7784# check if it works for CXX, too.
7785ac_cv_cxx_thread=no
7786if test ! -z "$CXX"
7787then
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7789$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790ac_save_cxx="$CXX"
7791
7792if test "$ac_cv_kpthread" = "yes"
7793then
7794 CXX="$CXX -Kpthread"
7795 ac_cv_cxx_thread=yes
7796elif test "$ac_cv_kthread" = "yes"
7797then
7798 CXX="$CXX -Kthread"
7799 ac_cv_cxx_thread=yes
7800elif test "$ac_cv_pthread" = "yes"
7801then
7802 CXX="$CXX -pthread"
7803 ac_cv_cxx_thread=yes
7804fi
7805
7806if test $ac_cv_cxx_thread = yes
7807then
7808 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7809 $CXX -c conftest.$ac_ext 2>&5
7810 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7811 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7812 then
7813 ac_cv_cxx_thread=yes
7814 else
7815 ac_cv_cxx_thread=no
7816 fi
7817 rm -fr conftest*
7818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7820$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821fi
7822CXX="$ac_save_cxx"
7823
7824
7825# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7827$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007828if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830else
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007832/* end confdefs.h. */
7833#include <stdlib.h>
7834#include <stdarg.h>
7835#include <string.h>
7836#include <float.h>
7837
7838int
7839main ()
7840{
7841
7842 ;
7843 return 0;
7844}
7845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007846if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847 ac_cv_header_stdc=yes
7848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7852
7853if test $ac_cv_header_stdc = yes; then
7854 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856/* end confdefs.h. */
7857#include <string.h>
7858
7859_ACEOF
7860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 $EGREP "memchr" >/dev/null 2>&1; then :
7862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863else
7864 ac_cv_header_stdc=no
7865fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007866rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007867
7868fi
7869
7870if test $ac_cv_header_stdc = yes; then
7871 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873/* end confdefs.h. */
7874#include <stdlib.h>
7875
7876_ACEOF
7877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 $EGREP "free" >/dev/null 2>&1; then :
7879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007880else
7881 ac_cv_header_stdc=no
7882fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007883rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884
7885fi
7886
7887if test $ac_cv_header_stdc = yes; then
7888 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890 :
7891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893/* end confdefs.h. */
7894#include <ctype.h>
7895#include <stdlib.h>
7896#if ((' ' & 0x0FF) == 0x020)
7897# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7898# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7899#else
7900# define ISLOWER(c) \
7901 (('a' <= (c) && (c) <= 'i') \
7902 || ('j' <= (c) && (c) <= 'r') \
7903 || ('s' <= (c) && (c) <= 'z'))
7904# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7905#endif
7906
7907#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7908int
7909main ()
7910{
7911 int i;
7912 for (i = 0; i < 256; i++)
7913 if (XOR (islower (i), ISLOWER (i))
7914 || toupper (i) != TOUPPER (i))
7915 return 2;
7916 return 0;
7917}
7918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007919if ac_fn_c_try_run "$LINENO"; then :
7920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007926fi
7927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928fi
7929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7931$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007932if test $ac_cv_header_stdc = yes; then
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007935
7936fi
7937
stratakise768c862018-01-23 16:11:24 +01007938for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007939fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007940ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007941sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007942unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007943poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007944sys/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 +01007945sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007946sys/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 +01007947sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007948sys/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 -07007949libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007950linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007951sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007952do :
7953 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7954ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007955if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007957#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007958_ACEOF
7959
7960fi
7961
Guido van Rossum627b2d71993-12-24 10:39:16 +00007962done
7963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007965for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7968$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007969if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007971else
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007973/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974#include <sys/types.h>
7975#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Martin v. Löwis11437992002-04-12 09:54:03 +00007977int
7978main ()
7979{
7980if ((DIR *) 0)
7981return 0;
7982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007993eval ac_res=\$$as_ac_Header
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7995$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007996if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
8000
8001ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00008002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008004done
8005# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8006if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8008$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008009if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008011else
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016/* Override any GCC internal prototype to avoid an error.
8017 Use char because int might match the return type of a GCC
8018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008019#ifdef __cplusplus
8020extern "C"
8021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008022char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008023int
8024main ()
8025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ;
8028 return 0;
8029}
8030_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031for ac_lib in '' dir; do
8032 if test -z "$ac_lib"; then
8033 ac_res="none required"
8034 else
8035 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008036 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041rm -f core conftest.err conftest.$ac_objext \
8042 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008043 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046done
Victor Stinnere0be4232011-10-25 13:06:09 +02008047if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049else
8050 ac_cv_search_opendir=no
8051fi
8052rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008053LIBS=$ac_func_search_save_LIBS
8054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8056$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008058if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008059 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008062
Michael W. Hudson54241132001-12-07 15:38:26 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8065$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008068else
8069 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073/* Override any GCC internal prototype to avoid an error.
8074 Use char because int might match the return type of a GCC
8075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008076#ifdef __cplusplus
8077extern "C"
8078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008079char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
8082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ;
8085 return 0;
8086}
8087_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008088for ac_lib in '' x; do
8089 if test -z "$ac_lib"; then
8090 ac_res="none required"
8091 else
8092 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098rm -f core conftest.err conftest.$ac_objext \
8099 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008100 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103done
Victor Stinnere0be4232011-10-25 13:06:09 +02008104if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106else
8107 ac_cv_search_opendir=no
8108fi
8109rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008110LIBS=$ac_func_search_save_LIBS
8111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8113$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008115if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008118fi
8119
8120fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8123$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008124if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008126else
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008128/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008129#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008130int
8131main ()
8132{
8133return makedev(0, 0);
8134 ;
8135 return 0;
8136}
8137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008139 ac_cv_header_sys_types_h_makedev=yes
8140else
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008143rm -f core conftest.err conftest.$ac_objext \
8144 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008145
8146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8148$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008149
8150if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008151ac_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 +02008152if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008155
8156fi
8157
8158
8159
8160 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 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 +02008162if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008165
8166fi
8167
8168
8169 fi
8170fi
8171
Michael W. Hudson54241132001-12-07 15:38:26 +00008172
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008173# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8174# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8175SAVE_CFLAGS=$CFLAGS
8176CFLAGS="-std=c99 $CFLAGS"
8177for ac_header in bluetooth/bluetooth.h
8178do :
8179 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8180if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8181 cat >>confdefs.h <<_ACEOF
8182#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8183_ACEOF
8184
8185fi
8186
8187done
8188
8189CFLAGS=$SAVE_CFLAGS
8190
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008191# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8192for ac_header in net/if.h
8193do :
8194 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8195#ifdef STDC_HEADERS
8196# include <stdlib.h>
8197# include <stddef.h>
8198#else
8199# ifdef HAVE_STDLIB_H
8200# include <stdlib.h>
8201# endif
8202#endif
8203#ifdef HAVE_SYS_SOCKET_H
8204# include <sys/socket.h>
8205#endif
8206
8207"
Victor Stinnere0be4232011-10-25 13:06:09 +02008208if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008209 cat >>confdefs.h <<_ACEOF
8210#define HAVE_NET_IF_H 1
8211_ACEOF
8212
8213fi
8214
8215done
8216
8217
Martin v. Löwis11017b12006-01-14 18:12:57 +00008218# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008219for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008220do :
8221 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 +00008222#ifdef HAVE_ASM_TYPES_H
8223#include <asm/types.h>
8224#endif
8225#ifdef HAVE_SYS_SOCKET_H
8226#include <sys/socket.h>
8227#endif
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229"
Victor Stinnere0be4232011-10-25 13:06:09 +02008230if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008231 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008232#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008233_ACEOF
8234
8235fi
8236
8237done
8238
8239
caaveryeffc12f2017-09-06 18:18:10 -04008240for ac_header in linux/vm_sockets.h
8241do :
8242 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8243#ifdef HAVE_SYS_SOCKET_H
8244#include <sys/socket.h>
8245#endif
8246
8247"
8248if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8249 cat >>confdefs.h <<_ACEOF
8250#define HAVE_LINUX_VM_SOCKETS_H 1
8251_ACEOF
8252
8253fi
8254
8255done
8256
8257
Charles-François Natali47413c12011-10-06 19:47:44 +02008258# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008259for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008260do :
8261 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8262ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8263#ifdef HAVE_SYS_SOCKET_H
8264#include <sys/socket.h>
8265#endif
8266
8267"
8268if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8269 cat >>confdefs.h <<_ACEOF
8270#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8271_ACEOF
8272
8273fi
8274
8275done
8276
8277
Guido van Rossum627b2d71993-12-24 10:39:16 +00008278# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008279was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8281$as_echo_n "checking for clock_t in time.h... " >&6; }
8282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008283/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008284#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008285
8286_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008289 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008290else
Martin v. Löwis11437992002-04-12 09:54:03 +00008291
8292
Matthias Kloseb9621712010-04-24 17:59:49 +00008293$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008294
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008295
Guido van Rossum627b2d71993-12-24 10:39:16 +00008296fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008297rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8300$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8303$as_echo_n "checking for makedev... " >&6; }
8304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008305/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008306
Jesus Cea740f53a2010-04-28 11:35:30 +00008307#if defined(MAJOR_IN_MKDEV)
8308#include <sys/mkdev.h>
8309#elif defined(MAJOR_IN_SYSMACROS)
8310#include <sys/sysmacros.h>
8311#else
8312#include <sys/types.h>
8313#endif
8314
Neal Norwitz11690112002-07-30 01:08:28 +00008315int
8316main ()
8317{
Jesus Cea740f53a2010-04-28 11:35:30 +00008318
8319 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008320 ;
8321 return 0;
8322}
Matthias Kloseb159a552010-04-25 21:00:44 +00008323
Neal Norwitz11690112002-07-30 01:08:28 +00008324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008325if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008326 ac_cv_has_makedev=yes
8327else
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330rm -f core conftest.err conftest.$ac_objext \
8331 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8333$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008334if test "$ac_cv_has_makedev" = "yes"; then
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008337
8338fi
8339
Christian Heimes985ecdc2013-11-20 11:46:18 +01008340# byte swapping
8341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8342$as_echo_n "checking for le64toh... " >&6; }
8343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8344/* end confdefs.h. */
8345
8346#ifdef HAVE_ENDIAN_H
8347#include <endian.h>
8348#elif defined(HAVE_SYS_ENDIAN_H)
8349#include <sys/endian.h>
8350#endif
8351
8352int
8353main ()
8354{
8355
8356 le64toh(1)
8357 ;
8358 return 0;
8359}
8360
8361_ACEOF
8362if ac_fn_c_try_link "$LINENO"; then :
8363 ac_cv_has_le64toh=yes
8364else
8365 ac_cv_has_le64toh=no
8366fi
8367rm -f core conftest.err conftest.$ac_objext \
8368 conftest$ac_exeext conftest.$ac_ext
8369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8370$as_echo "$ac_cv_has_le64toh" >&6; }
8371if test "$ac_cv_has_le64toh" = "yes"; then
8372
8373$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8374
8375fi
8376
Martin v. Löwis399a6892002-10-04 10:22:02 +00008377use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008378# Don't use largefile support for GNU/Hurd
8379case $ac_sys_system in GNU*)
8380 use_lfs=no
8381esac
8382
Martin v. Löwis399a6892002-10-04 10:22:02 +00008383if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008384# Two defines needed to enable largefile support on various platforms
8385# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008386case $ac_sys_system/$ac_sys_release in
8387AIX*)
8388
8389$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8390
8391 ;;
8392esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
8396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008398
Martin v. Löwis399a6892002-10-04 10:22:02 +00008399fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008400
Guido van Rossum84e7b241996-08-19 21:59:00 +00008401# Add some code to confdefs.h so that the test for off_t works on SCO
8402cat >> confdefs.h <<\EOF
8403#if defined(SCO_DS)
8404#undef _OFF_T
8405#endif
8406EOF
8407
Guido van Rossumef2255b2000-03-10 22:30:29 +00008408# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008409ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008410if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413
8414cat >>confdefs.h <<_ACEOF
8415#define mode_t int
8416_ACEOF
8417
8418fi
8419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008421if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008422
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008423else
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
8425cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008427_ACEOF
8428
8429fi
8430
Matthias Kloseb9621712010-04-24 17:59:49 +00008431ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008432if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434else
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
8436cat >>confdefs.h <<_ACEOF
8437#define pid_t int
8438_ACEOF
8439
8440fi
8441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008442
Martin v. Löwis11437992002-04-12 09:54:03 +00008443cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008444#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008445_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451
8452cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008453#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
8455
8456fi
8457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8459$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008460if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008462else
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008464/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008466
8467_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008470 ac_cv_type_uid_t=yes
8471else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008472 ac_cv_type_uid_t=no
8473fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008474rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008475
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8478$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008479if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008480
Matthias Kloseb9621712010-04-24 17:59:49 +00008481$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
8483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008485
8486fi
8487
Mark Dickinson983bc162012-12-02 12:11:38 +00008488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008490if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491
Matthias Kloseb9621712010-04-24 17:59:49 +00008492$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008493
8494fi
8495
Stefan Krah1919b7e2012-03-21 18:25:23 +01008496ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8497if test "x$ac_cv_type___uint128_t" = xyes; then :
8498
8499$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8500
8501fi
8502
Jack Jansendd19cf82001-12-06 22:36:17 +00008503
Michael W. Hudson54241132001-12-07 15:38:26 +00008504# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008505# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506# The cast to long int works around a bug in the HP C Compiler
8507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8509# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8511$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008512if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008513 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 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 +00008516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 if test "$ac_cv_type_int" = yes; then
8519 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008521as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008522See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523 else
8524 ac_cv_sizeof_int=0
8525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527
Martin v. Löwis11437992002-04-12 09:54:03 +00008528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8530$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531
8532
8533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008535#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008536_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008537
8538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539# The cast to long int works around a bug in the HP C Compiler
8540# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8541# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8542# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8544$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008545if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 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 +00008549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 if test "$ac_cv_type_long" = yes; then
8552 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008554as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008555See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556 else
8557 ac_cv_sizeof_long=0
8558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8563$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564
8565
8566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008568#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008569_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008570
8571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572# The cast to long int works around a bug in the HP C Compiler
8573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8575# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8577$as_echo_n "checking size of long long... " >&6; }
8578if ${ac_cv_sizeof_long_long+:} false; then :
8579 $as_echo_n "(cached) " >&6
8580else
8581 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8582
8583else
8584 if test "$ac_cv_type_long_long" = yes; then
8585 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8586$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8587as_fn_error 77 "cannot compute sizeof (long long)
8588See \`config.log' for more details" "$LINENO" 5; }
8589 else
8590 ac_cv_sizeof_long_long=0
8591 fi
8592fi
8593
8594fi
8595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8596$as_echo "$ac_cv_sizeof_long_long" >&6; }
8597
8598
8599
8600cat >>confdefs.h <<_ACEOF
8601#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8602_ACEOF
8603
8604
8605# The cast to long int works around a bug in the HP C Compiler
8606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8608# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8610$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008611if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 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 +00008615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 if test "$ac_cv_type_void_p" = yes; then
8618 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008620as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008621See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 else
8623 ac_cv_sizeof_void_p=0
8624 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8629$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630
8631
8632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008634#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008635_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008636
8637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638# The cast to long int works around a bug in the HP C Compiler
8639# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8640# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8641# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8643$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008644if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 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 +00008648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 if test "$ac_cv_type_short" = yes; then
8651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008653as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008654See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655 else
8656 ac_cv_sizeof_short=0
8657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8662$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663
8664
8665
Martin v. Löwis11437992002-04-12 09:54:03 +00008666cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008667#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008668_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008669
8670
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671# The cast to long int works around a bug in the HP C Compiler
8672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8674# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8676$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008677if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 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 +00008681
Martin v. Löwis11437992002-04-12 09:54:03 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 if test "$ac_cv_type_float" = yes; then
8684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008686as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008687See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688 else
8689 ac_cv_sizeof_float=0
8690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692
Martin v. Löwis11437992002-04-12 09:54:03 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8695$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696
8697
8698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008700#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008701_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008702
8703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704# The cast to long int works around a bug in the HP C Compiler
8705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8707# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8709$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008710if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008712else
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 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 +00008714
Martin v. Löwis11437992002-04-12 09:54:03 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 if test "$ac_cv_type_double" = yes; then
8717 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008719as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008720See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721 else
8722 ac_cv_sizeof_double=0
8723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8728$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729
8730
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008733#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008734_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008735
8736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737# The cast to long int works around a bug in the HP C Compiler
8738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8740# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8742$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008743if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 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 +00008747
Martin v. Löwis11437992002-04-12 09:54:03 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 if test "$ac_cv_type_fpos_t" = yes; then
8750 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008752as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008753See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754 else
8755 ac_cv_sizeof_fpos_t=0
8756 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758
Martin v. Löwis11437992002-04-12 09:54:03 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8761$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762
8763
8764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008766#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008767_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008768
Michael W. Hudson54241132001-12-07 15:38:26 +00008769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770# The cast to long int works around a bug in the HP C Compiler
8771# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8772# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8773# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8775$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008776if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 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 +00008780
Martin v. Löwis18e16552006-02-15 17:27:45 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 if test "$ac_cv_type_size_t" = yes; then
8783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008785as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008786See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787 else
8788 ac_cv_sizeof_size_t=0
8789 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791
Martin v. Löwis18e16552006-02-15 17:27:45 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8794$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795
8796
8797
Martin v. Löwis18e16552006-02-15 17:27:45 +00008798cat >>confdefs.h <<_ACEOF
8799#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8800_ACEOF
8801
8802
Christian Heimes400adb02008-02-01 08:12:03 +00008803# The cast to long int works around a bug in the HP C Compiler
8804# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8805# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8806# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8808$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 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 +00008813
Christian Heimes400adb02008-02-01 08:12:03 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$ac_cv_type_pid_t" = yes; then
8816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008818as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008819See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008820 else
8821 ac_cv_sizeof_pid_t=0
8822 fi
8823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824
Christian Heimes400adb02008-02-01 08:12:03 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8827$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008828
8829
8830
8831cat >>confdefs.h <<_ACEOF
8832#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8833_ACEOF
8834
8835
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008836# The cast to long int works around a bug in the HP C Compiler
8837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8839# This bug is HP SR number 8606223364.
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8841$as_echo_n "checking size of uintptr_t... " >&6; }
8842if ${ac_cv_sizeof_uintptr_t+:} false; then :
8843 $as_echo_n "(cached) " >&6
8844else
8845 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8846
8847else
8848 if test "$ac_cv_type_uintptr_t" = yes; then
8849 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8851as_fn_error 77 "cannot compute sizeof (uintptr_t)
8852See \`config.log' for more details" "$LINENO" 5; }
8853 else
8854 ac_cv_sizeof_uintptr_t=0
8855 fi
8856fi
8857
8858fi
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8860$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8861
8862
8863
8864cat >>confdefs.h <<_ACEOF
8865#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8866_ACEOF
8867
8868
Michael W. Hudson54241132001-12-07 15:38:26 +00008869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8871$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008872have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008874/* end confdefs.h. */
8875
8876int
8877main ()
8878{
8879long double x; x = (long double)0;
8880 ;
8881 return 0;
8882}
8883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008884if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008885
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008888
8889 have_long_double=yes
8890
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8894$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008896# The cast to long int works around a bug in the HP C Compiler
8897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8901$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008902if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008904else
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 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 +00008906
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008907else
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 if test "$ac_cv_type_long_double" = yes; then
8909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008911as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008912See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008913 else
8914 ac_cv_sizeof_long_double=0
8915 fi
8916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8920$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008921
8922
8923
8924cat >>confdefs.h <<_ACEOF
8925#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8926_ACEOF
8927
8928
8929fi
8930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931# The cast to long int works around a bug in the HP C Compiler
8932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8934# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8936$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008937if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008939else
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 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 +00008941
Thomas Woutersb2137042007-02-01 18:02:27 +00008942else
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 if test "$ac_cv_type__Bool" = yes; then
8944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008946as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008947See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948 else
8949 ac_cv_sizeof__Bool=0
8950 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952
Thomas Woutersb2137042007-02-01 18:02:27 +00008953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8955$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956
8957
8958
Thomas Woutersb2137042007-02-01 18:02:27 +00008959cat >>confdefs.h <<_ACEOF
8960#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8961_ACEOF
8962
8963
Thomas Woutersb2137042007-02-01 18:02:27 +00008964
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008965# The cast to long int works around a bug in the HP C Compiler
8966# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8967# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8968# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8970$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973else
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975#ifdef HAVE_SYS_TYPES_H
8976#include <sys/types.h>
8977#endif
8978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 if test "$ac_cv_type_off_t" = yes; then
8983 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008985as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008986See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987 else
8988 ac_cv_sizeof_off_t=0
8989 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8994$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996
8997
Martin v. Löwis11437992002-04-12 09:54:03 +00008998cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008999#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001
Michael W. Hudson54241132001-12-07 15:38:26 +00009002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9005$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009006if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009007 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009008
Matthias Kloseb9621712010-04-24 17:59:49 +00009009$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009010
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9012$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009013else
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9015$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009016fi
9017
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009018# The cast to long int works around a bug in the HP C Compiler
9019# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9020# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9021# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9023$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009024if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009026else
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009028#ifdef HAVE_SYS_TYPES_H
9029#include <sys/types.h>
9030#endif
9031#ifdef HAVE_TIME_H
9032#include <time.h>
9033#endif
9034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037else
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 if test "$ac_cv_type_time_t" = yes; then
9039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009041as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009042See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009043 else
9044 ac_cv_sizeof_time_t=0
9045 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009048fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9050$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052
9053
Martin v. Löwis11437992002-04-12 09:54:03 +00009054cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009055#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009057
Michael W. Hudson54241132001-12-07 15:38:26 +00009058
9059
Trent Mick635f6fb2000-08-23 21:33:05 +00009060# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009061ac_save_cc="$CC"
9062if test "$ac_cv_kpthread" = "yes"
9063then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009064elif test "$ac_cv_kthread" = "yes"
9065then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009066elif test "$ac_cv_pthread" = "yes"
9067then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009068fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9071$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009072have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009074/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009075
9076 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009077int
9078main ()
9079{
Guido van Rossum12580492000-09-24 16:47:19 +00009080pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ;
9082 return 0;
9083}
Matthias Kloseb159a552010-04-25 21:00:44 +00009084
Martin v. Löwis11437992002-04-12 09:54:03 +00009085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009086if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009087 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9091$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009092if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9096# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9098$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009099if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101else
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009103#ifdef HAVE_PTHREAD_H
9104#include <pthread.h>
9105#endif
9106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009109else
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 if test "$ac_cv_type_pthread_t" = yes; then
9111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009113as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009114See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009115 else
9116 ac_cv_sizeof_pthread_t=0
9117 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009119
Trent Mick635f6fb2000-08-23 21:33:05 +00009120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9122$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009124
9125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009127#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009128_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009130
Trent Mick635f6fb2000-08-23 21:33:05 +00009131fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009132
9133# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9134# This checking will be unnecessary after removing deprecated TLS API.
9135# The cast to long int works around a bug in the HP C Compiler
9136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9138# This bug is HP SR number 8606223364.
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9140$as_echo_n "checking size of pthread_key_t... " >&6; }
9141if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9142 $as_echo_n "(cached) " >&6
9143else
9144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9145"; then :
9146
9147else
9148 if test "$ac_cv_type_pthread_key_t" = yes; then
9149 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9151as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9152See \`config.log' for more details" "$LINENO" 5; }
9153 else
9154 ac_cv_sizeof_pthread_key_t=0
9155 fi
9156fi
9157
9158fi
9159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9160$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9161
9162
9163
9164cat >>confdefs.h <<_ACEOF
9165#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9166_ACEOF
9167
9168
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9170$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9171if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9173/* end confdefs.h. */
9174#include <pthread.h>
9175int
9176main ()
9177{
9178pthread_key_t k; k * 1;
9179 ;
9180 return 0;
9181}
9182_ACEOF
9183if ac_fn_c_try_compile "$LINENO"; then :
9184 ac_pthread_key_t_is_arithmetic_type=yes
9185else
9186 ac_pthread_key_t_is_arithmetic_type=no
9187
9188fi
9189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9191$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9192 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9193
9194$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9195
9196 fi
9197else
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9199$as_echo "no" >&6; }
9200fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009201CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009202
Michael W. Hudson54241132001-12-07 15:38:26 +00009203
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009204case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009205 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009206 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9207 ;;
9208 Darwin/*)
9209 OTHER_LIBTOOL_OPT=""
9210 ;;
9211esac
9212
9213
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009215case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009216 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009217 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9218 if test "${enable_universalsdk}"; then
9219 :
9220 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009221 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009222 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009223 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009224 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009225 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009226 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009227 if test ${gcc_version} '<' 4.0
9228 then
9229 LIBTOOL_CRUFT="-lcc_dynamic"
9230 else
9231 LIBTOOL_CRUFT=""
9232 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009234 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009235else
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009237/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009238
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009239 #include <unistd.h>
9240 int main(int argc, char*argv[])
9241 {
9242 if (sizeof(long) == 4) {
9243 return 0;
9244 } else {
9245 return 1;
9246 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009247 }
9248
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009250if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009251 ac_osx_32bit=yes
9252else
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9256 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257fi
9258
9259
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009260 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009261 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009262 i386)
9263 MACOSX_DEFAULT_ARCH="i386"
9264 ;;
9265 ppc)
9266 MACOSX_DEFAULT_ARCH="ppc"
9267 ;;
9268 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009269 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009270 ;;
9271 esac
9272 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009273 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009274 i386)
9275 MACOSX_DEFAULT_ARCH="x86_64"
9276 ;;
9277 ppc)
9278 MACOSX_DEFAULT_ARCH="ppc64"
9279 ;;
9280 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009281 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009282 ;;
9283 esac
9284
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009285 fi
9286
9287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009290esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9292$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009293if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009295 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009297 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9302$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009303 if test $enable_shared = "yes"
9304 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009305 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 +00009306 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009307else
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009310fi
9311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9313$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009314case $ac_sys_system/$ac_sys_release in
9315 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9320$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009321 ;;
9322 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9324$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009325 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009326esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009327
Guido van Rossum0a516c91994-09-12 10:58:40 +00009328# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329
Michael W. Hudson54241132001-12-07 15:38:26 +00009330
9331
9332
9333
Benjamin Peterson99f03762010-04-11 22:15:28 +00009334
Thomas Wouters477c8d52006-05-27 19:21:47 +00009335
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009336# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9337# -- usually .so, .sl on HP-UX, .dll on Cygwin
9338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9339$as_echo_n "checking the extension of shared libraries... " >&6; }
9340if test -z "$SHLIB_SUFFIX"; then
9341 case $ac_sys_system in
9342 hp*|HP*)
9343 case `uname -m` in
9344 ia64) SHLIB_SUFFIX=.so;;
9345 *) SHLIB_SUFFIX=.sl;;
9346 esac
9347 ;;
9348 CYGWIN*) SHLIB_SUFFIX=.dll;;
9349 *) SHLIB_SUFFIX=.so;;
9350 esac
9351fi
9352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9353$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009354
Guido van Rossum0a516c91994-09-12 10:58:40 +00009355# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009356# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357# (Shared libraries in this instance are shared modules to be loaded into
9358# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9360$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009361if test -z "$LDSHARED"
9362then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009363 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009364 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009365 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009366 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009367 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009369 if test "$GCC" = "yes" ; then
9370 LDSHARED='$(CC) -shared'
9371 LDCXXSHARED='$(CXX) -shared'
9372 else
9373 LDSHARED='$(CC) -G'
9374 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009375 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009376 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009377 if test "$GCC" = "yes" ; then
9378 LDSHARED='$(CC) -shared'
9379 LDCXXSHARED='$(CXX) -shared'
9380 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009381 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009382 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009383 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009384 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009385 LDSHARED='$(CC) -bundle'
9386 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009387 if test "$enable_framework" ; then
9388 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009389 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9390 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009391 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009392 else
9393 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009394 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009395 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009396 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009397 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009398 LDSHARED='$(CC) -bundle'
9399 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009400 if test "$enable_framework" ; then
9401 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009402 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9403 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009404 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009405 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009406 # No framework, use the Python app as bundle-loader
9407 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009408 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009409 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009410 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009411 Darwin/*)
9412 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9413 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009414
Ned Deily36820b62014-06-25 13:44:22 -07009415 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9416 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9417 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9418 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9419 if test ${dep_target_major} -eq 10 && \
9420 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009421 then
Ned Deily36820b62014-06-25 13:44:22 -07009422 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009423 LDSHARED='$(CC) -bundle'
9424 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009425 if test "$enable_framework" ; then
9426 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009427 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9428 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009429 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009430 else
9431 # No framework, use the Python app as bundle-loader
9432 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9433 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009434 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009435 fi
Ned Deily36820b62014-06-25 13:44:22 -07009436 else
9437 # building for OS X 10.3 and later
9438 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9439 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9440 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009441 fi
9442 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443 Linux*|GNU*|QNX*)
9444 LDSHARED='$(CC) -shared'
9445 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009446 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009447 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009448 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009449 LDSHARED='$(CC) -shared'
9450 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009451 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009452 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009453 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009454 OpenBSD*)
9455 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9456 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009457 LDSHARED='$(CC) -shared $(CCSHARED)'
9458 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009459 else
9460 case `uname -r` in
9461 [01].* | 2.[0-7] | 2.[0-7].*)
9462 LDSHARED="ld -Bshareable ${LDFLAGS}"
9463 ;;
9464 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009465 LDSHARED='$(CC) -shared $(CCSHARED)'
9466 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009467 ;;
9468 esac
9469 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009470 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009471 LDSHARED='$(CC) -shared'
9472 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009473 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009474 if test "$GCC" = "yes" ; then
9475 LDSHARED='$(CC) -shared'
9476 LDCXXSHARED='$(CXX) -shared'
9477 else
9478 LDSHARED='$(CC) -G'
9479 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009480 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009481 SCO_SV*)
9482 LDSHARED='$(CC) -Wl,-G,-Bexport'
9483 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9484 CYGWIN*)
9485 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9486 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009487 *) LDSHARED="ld";;
9488 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9491$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009492LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009493BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009494# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009495# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9497$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009498if test -z "$CCSHARED"
9499then
Guido van Rossum07397971997-04-29 21:49:50 +00009500 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009501 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009502 then CCSHARED="-fPIC";
9503 elif test `uname -p` = sparc;
9504 then CCSHARED="-xcode=pic32";
9505 else CCSHARED="-Kpic";
9506 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009507 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009508 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009509 else CCSHARED="+z";
9510 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009511 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009512 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009513 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009514 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009515 if test "$GCC" = "yes"
9516 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009517 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009518 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009519 SCO_SV*)
9520 if test "$GCC" = "yes"
9521 then CCSHARED="-fPIC"
9522 else CCSHARED="-Kpic -belf"
9523 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009524 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9527$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009528# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009529# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9531$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009532if test -z "$LINKFORSHARED"
9533then
Guido van Rossum07397971997-04-29 21:49:50 +00009534 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009535 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009536 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009537 LINKFORSHARED="-Wl,-E -Wl,+s";;
9538# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009539 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009540 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009543 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009544
9545 # Issue #18075: the default maximum stack size (8MBytes) is too
9546 # small for the default recursion limit. Increase the stack size
9547 # to ensure that tests don't crash
9548 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9549
Jack Jansene578a632001-08-15 01:27:14 +00009550 if test "$enable_framework"
9551 then
Jack Jansenda49e192005-01-07 13:08:22 +00009552 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009553 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009554 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009555 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009556 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009557 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009558 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009559 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9560 then
9561 LINKFORSHARED="-Wl,--export-dynamic"
9562 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009563 SunOS/5*) case $CC in
9564 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009565 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009566 then
9567 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009568 fi;;
9569 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009570 CYGWIN*)
9571 if test $enable_shared = "no"
9572 then
9573 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9574 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009575 QNX*)
9576 # -Wl,-E causes the symbols to be added to the dynamic
9577 # symbol table so that they can be found when a module
9578 # is loaded. -N 2048K causes the stack size to be set
9579 # to 2048 kilobytes so that the stack doesn't overflow
9580 # when running test_compile.py.
9581 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009582 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9585$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009586
Michael W. Hudson54241132001-12-07 15:38:26 +00009587
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009588
Matthias Kloseb9621712010-04-24 17:59:49 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9590$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009591if test ! "$LIBRARY" = "$LDLIBRARY"
9592then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009593 case $ac_sys_system in
9594 CYGWIN*)
9595 # Cygwin needs CCSHARED when building extension DLLs
9596 # but not when building the interpreter DLL.
9597 CFLAGSFORSHARED='';;
9598 *)
9599 CFLAGSFORSHARED='$(CCSHARED)'
9600 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9603$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009604
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009605# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9606# library (with --enable-shared).
9607# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009608# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9609# if it is not required, since it creates a dependency of the shared library
9610# to LIBS. This, in turn, means that applications linking the shared libpython
9611# don't need to link LIBS explicitly. The default should be only changed
9612# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009613
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9615$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009616case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009617 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009618 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009619esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9621$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009622
9623
Guido van Rossum627b2d71993-12-24 10:39:16 +00009624# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9626$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009627if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009628 $as_echo_n "(cached) " >&6
9629else
9630 ac_check_lib_save_LIBS=$LIBS
9631LIBS="-lsendfile $LIBS"
9632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9633/* end confdefs.h. */
9634
9635/* Override any GCC internal prototype to avoid an error.
9636 Use char because int might match the return type of a GCC
9637 builtin and then its argument prototype would still apply. */
9638#ifdef __cplusplus
9639extern "C"
9640#endif
9641char sendfile ();
9642int
9643main ()
9644{
9645return sendfile ();
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650if ac_fn_c_try_link "$LINENO"; then :
9651 ac_cv_lib_sendfile_sendfile=yes
9652else
9653 ac_cv_lib_sendfile_sendfile=no
9654fi
9655rm -f core conftest.err conftest.$ac_objext \
9656 conftest$ac_exeext conftest.$ac_ext
9657LIBS=$ac_check_lib_save_LIBS
9658fi
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9660$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009661if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009662 cat >>confdefs.h <<_ACEOF
9663#define HAVE_LIBSENDFILE 1
9664_ACEOF
9665
9666 LIBS="-lsendfile $LIBS"
9667
9668fi
9669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9671$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009672if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009674else
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009676LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680/* Override any GCC internal prototype to avoid an error.
9681 Use char because int might match the return type of a GCC
9682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683#ifdef __cplusplus
9684extern "C"
9685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009686char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687int
9688main ()
9689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ;
9692 return 0;
9693}
9694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009697else
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700rm -f core conftest.err conftest.$ac_objext \
9701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9705$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009706if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009707 cat >>confdefs.h <<_ACEOF
9708#define HAVE_LIBDL 1
9709_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009710
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009711 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009712
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009713fi
9714 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9716$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009717if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009719else
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009721LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725/* Override any GCC internal prototype to avoid an error.
9726 Use char because int might match the return type of a GCC
9727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009728#ifdef __cplusplus
9729extern "C"
9730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009731char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009732int
9733main ()
9734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ;
9737 return 0;
9738}
9739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009740if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009742else
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009745rm -f core conftest.err conftest.$ac_objext \
9746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009747LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9750$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009751if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 cat >>confdefs.h <<_ACEOF
9753#define HAVE_LIBDLD 1
9754_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009755
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009756 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009757
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009758fi
9759 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009760
Michael Felt0d3ccb42017-12-30 22:39:20 +01009761# checks for uuid.h location
9762for ac_header in uuid/uuid.h uuid.h
9763do :
9764 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9765ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9766if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9767 cat >>confdefs.h <<_ACEOF
9768#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9769_ACEOF
9770
9771fi
9772
9773done
9774
9775
Berker Peksag9a10ff42017-11-08 23:09:16 +03009776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9777$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9779/* end confdefs.h. */
9780#include <uuid/uuid.h>
9781int
9782main ()
9783{
9784
9785#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009786void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009787#endif
9788
9789 ;
9790 return 0;
9791}
9792_ACEOF
9793if ac_fn_c_try_compile "$LINENO"; then :
9794
9795$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9796
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9798$as_echo "yes" >&6; }
9799else
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
9802
9803fi
9804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9805
Michael Felt0d3ccb42017-12-30 22:39:20 +01009806# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009807# FreeBSD and OpenBSD provides support as well
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9809$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811/* end confdefs.h. */
9812#include <uuid.h>
9813int
9814main ()
9815{
9816
9817#ifndef uuid_create
9818void *x = uuid_create
9819#endif
9820
9821 ;
9822 return 0;
9823}
9824_ACEOF
9825if ac_fn_c_try_compile "$LINENO"; then :
9826
9827$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9828
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9830$as_echo "yes" >&6; }
9831else
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834
9835fi
9836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9837
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009838# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9839# stream in big-endian byte-order
9840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9841$as_echo_n "checking for uuid_enc_be... " >&6; }
9842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9843/* end confdefs.h. */
9844#include <uuid.h>
9845int
9846main ()
9847{
9848
9849#ifndef uuid_enc_be
Michael Felt20cd5c62018-06-09 15:59:02 -06009850void *x = uuid_enc_be
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009851#endif
9852
9853 ;
9854 return 0;
9855}
9856_ACEOF
9857if ac_fn_c_try_compile "$LINENO"; then :
9858
9859$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9860
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9862$as_echo "yes" >&6; }
9863else
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866
9867fi
9868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9869
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009870# 'Real Time' functions on Solaris
9871# posix4 on Solaris 2.6
9872# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009874$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009875if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009877else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009878 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882/* Override any GCC internal prototype to avoid an error.
9883 Use char because int might match the return type of a GCC
9884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009885#ifdef __cplusplus
9886extern "C"
9887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009888char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009889int
9890main ()
9891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ;
9894 return 0;
9895}
9896_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897for ac_lib in '' pthread rt posix4; do
9898 if test -z "$ac_lib"; then
9899 ac_res="none required"
9900 else
9901 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009902 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core conftest.err conftest.$ac_objext \
9908 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009909 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912done
Victor Stinnere0be4232011-10-25 13:06:09 +02009913if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915else
9916 ac_cv_search_sem_init=no
9917fi
9918rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009919LIBS=$ac_func_search_save_LIBS
9920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9922$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009924if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009926
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009927fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009928
Martin v. Löwis519adae2003-09-20 10:47:47 +00009929
Martin v. Löwis19d17342003-06-14 21:03:05 +00009930# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9932$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009933if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009935else
9936 ac_check_lib_save_LIBS=$LIBS
9937LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009939/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941/* Override any GCC internal prototype to avoid an error.
9942 Use char because int might match the return type of a GCC
9943 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009944#ifdef __cplusplus
9945extern "C"
9946#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009948int
9949main ()
9950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009951return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009952 ;
9953 return 0;
9954}
9955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009957 ac_cv_lib_intl_textdomain=yes
9958else
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961rm -f core conftest.err conftest.$ac_objext \
9962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009963LIBS=$ac_check_lib_save_LIBS
9964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9966$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009967if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009970
Brett Cannonc6d936e2009-06-07 20:09:53 +00009971 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009972fi
9973
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009974
9975# checks for system dependent C++ extensions support
9976case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9978$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009981
Georg Brandl59e87bd2011-02-15 19:48:59 +00009982 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009983int
9984main ()
9985{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009986loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 ;
9988 return 0;
9989}
Matthias Kloseb159a552010-04-25 21:00:44 +00009990
Martin v. Löwis11437992002-04-12 09:54:03 +00009991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009992if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009993
Matthias Kloseb159a552010-04-25 21:00:44 +00009994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009996
Matthias Kloseb159a552010-04-25 21:00:44 +00009997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009998$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009999
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010000else
Matthias Kloseb159a552010-04-25 21:00:44 +000010001
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010003$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010004
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010006rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010008 *) ;;
10009esac
10010
Christian Heimes985ecdc2013-11-20 11:46:18 +010010011# check for systems that require aligned memory access
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10013$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010014if ${ac_cv_aligned_required+:} false; then :
10015 $as_echo_n "(cached) " >&6
10016else
10017 if test "$cross_compiling" = yes; then :
10018 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010019else
10020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10021/* end confdefs.h. */
10022
10023int main()
10024{
10025 char s[16];
10026 int i, *p1, *p2;
10027 for (i=0; i < 16; i++)
10028 s[i] = i;
10029 p1 = (int*)(s+1);
10030 p2 = (int*)(s+2);
10031 if (*p1 == *p2)
10032 return 1;
10033 return 0;
10034}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010035_ACEOF
10036if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010037 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010038else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010039 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010040fi
10041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10042 conftest.$ac_objext conftest.beam conftest.$ac_ext
10043fi
10044
10045
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010046fi
10047
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10049$as_echo "$ac_cv_aligned_required" >&6; }
10050if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010051
10052$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10053
10054fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010055
10056# str, bytes and memoryview hash algorithm
10057
10058
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10060$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10061
10062# Check whether --with-hash_algorithm was given.
10063if test "${with_hash_algorithm+set}" = set; then :
10064 withval=$with_hash_algorithm;
10065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10066$as_echo "$withval" >&6; }
10067case "$withval" in
10068 siphash24)
10069 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10070
10071 ;;
10072 fnv)
10073 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10074
10075 ;;
10076 *)
10077 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10078 ;;
10079esac
10080
10081else
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10083$as_echo "default" >&6; }
10084fi
10085
10086
Charles-François Natalid30b0222014-05-08 23:08:51 +010010087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10088$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10089
10090# Check whether --with-address_sanitizer was given.
10091if test "${with_address_sanitizer+set}" = set; then :
10092 withval=$with_address_sanitizer;
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10094$as_echo "$withval" >&6; }
10095BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10096LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith5f4d05d2018-11-12 13:48:24 -080010097# ASan works by controlling memory allocation, our own malloc interferes.
10098with_pymalloc="no"
10099
10100else
10101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10102$as_echo "no" >&6; }
10103fi
10104
10105
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10107$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10108
10109# Check whether --with-memory_sanitizer was given.
10110if test "${with_memory_sanitizer+set}" = set; then :
10111 withval=$with_memory_sanitizer;
10112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10113$as_echo "$withval" >&6; }
10114BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10115LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10116# MSan works by controlling memory allocation, our own malloc interferes.
10117with_pymalloc="no"
10118
10119else
10120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10126$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10127
10128# Check whether --with-undefined_behavior_sanitizer was given.
10129if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10130 withval=$with_undefined_behavior_sanitizer;
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10132$as_echo "$withval" >&6; }
10133BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10134LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010135
10136else
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10138$as_echo "no" >&6; }
10139fi
10140
10141
Guido van Rossum70c7f481998-03-26 18:44:10 +000010142# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10144$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010145if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010149LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153/* Override any GCC internal prototype to avoid an error.
10154 Use char because int might match the return type of a GCC
10155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156#ifdef __cplusplus
10157extern "C"
10158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010159char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010160int
10161main ()
10162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010163return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ;
10165 return 0;
10166}
10167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010168if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010170else
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173rm -f core conftest.err conftest.$ac_objext \
10174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010175LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10178$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010179if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010180 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010181fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010182 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10184$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010185if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010187else
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010189LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193/* Override any GCC internal prototype to avoid an error.
10194 Use char because int might match the return type of a GCC
10195 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010196#ifdef __cplusplus
10197extern "C"
10198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010199char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010200int
10201main ()
10202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 ;
10205 return 0;
10206}
10207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010208if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010210else
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010213rm -f core conftest.err conftest.$ac_objext \
10214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010215LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10218$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010219if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010220 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010221fi
10222 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010223
Matthias Kloseb9621712010-04-24 17:59:49 +000010224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10225$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010228if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10231$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010232LIBS="$withval $LIBS"
10233
10234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237fi
10238
Guido van Rossum7f43da71994-08-01 12:15:30 +000010239
Victor Stinner8291b5e2015-03-20 16:03:14 +010010240
10241
10242
10243
10244
10245
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010246
Victor Stinner8291b5e2015-03-20 16:03:14 +010010247if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10248 if test -n "$ac_tool_prefix"; then
10249 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10250set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10252$as_echo_n "checking for $ac_word... " >&6; }
10253if ${ac_cv_path_PKG_CONFIG+:} false; then :
10254 $as_echo_n "(cached) " >&6
10255else
10256 case $PKG_CONFIG in
10257 [\\/]* | ?:[\\/]*)
10258 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10259 ;;
10260 *)
10261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10262for as_dir in $PATH
10263do
10264 IFS=$as_save_IFS
10265 test -z "$as_dir" && as_dir=.
10266 for ac_exec_ext in '' $ac_executable_extensions; do
10267 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10268 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10270 break 2
10271 fi
10272done
10273 done
10274IFS=$as_save_IFS
10275
10276 ;;
10277esac
10278fi
10279PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10280if test -n "$PKG_CONFIG"; then
10281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10282$as_echo "$PKG_CONFIG" >&6; }
10283else
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285$as_echo "no" >&6; }
10286fi
10287
10288
10289fi
10290if test -z "$ac_cv_path_PKG_CONFIG"; then
10291 ac_pt_PKG_CONFIG=$PKG_CONFIG
10292 # Extract the first word of "pkg-config", so it can be a program name with args.
10293set dummy pkg-config; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10297 $as_echo_n "(cached) " >&6
10298else
10299 case $ac_pt_PKG_CONFIG in
10300 [\\/]* | ?:[\\/]*)
10301 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10302 ;;
10303 *)
10304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307 IFS=$as_save_IFS
10308 test -z "$as_dir" && as_dir=.
10309 for ac_exec_ext in '' $ac_executable_extensions; do
10310 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313 break 2
10314 fi
10315done
10316 done
10317IFS=$as_save_IFS
10318
10319 ;;
10320esac
10321fi
10322ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10323if test -n "$ac_pt_PKG_CONFIG"; then
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10325$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10326else
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331 if test "x$ac_pt_PKG_CONFIG" = x; then
10332 PKG_CONFIG=""
10333 else
10334 case $cross_compiling:$ac_tool_warned in
10335yes:)
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10338ac_tool_warned=yes ;;
10339esac
10340 PKG_CONFIG=$ac_pt_PKG_CONFIG
10341 fi
10342else
10343 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10344fi
10345
10346fi
10347if test -n "$PKG_CONFIG"; then
10348 _pkg_min_version=0.9.0
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10350$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10351 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10353$as_echo "yes" >&6; }
10354 else
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
10357 PKG_CONFIG=""
10358 fi
10359fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010360
10361# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10363$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010364
10365# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010367 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010368else
10369 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010370fi
10371
10372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10374$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010375
10376# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10378$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010379
10380# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010382 withval=$with_system_ffi;
10383fi
10384
10385
Zachary Waref40d4dd2016-09-17 01:25:24 -050010386if test "$ac_sys_system" = "Darwin"
10387then
10388 case "$with_system_ffi" in
10389 "")
10390 with_system_ffi="no"
10391 ;;
10392 yes|no)
10393 ;;
10394 *)
10395 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10396 ;;
10397 esac
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10399$as_echo "$with_system_ffi" >&6; }
10400else
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10402$as_echo "yes" >&6; }
10403 if test "$with_system_ffi" != ""
10404 then
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10406$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10407 fi
10408 with_system_ffi="yes"
10409fi
Zachary Ware935043d2016-09-09 17:01:21 -070010410
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010411if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010412 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10413else
10414 LIBFFI_INCLUDEDIR=""
10415fi
10416
10417
Stefan Krah60187b52012-03-23 19:06:27 +010010418# Check for use of the system libmpdec library
10419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10420$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10421
10422# Check whether --with-system_libmpdec was given.
10423if test "${with_system_libmpdec+set}" = set; then :
10424 withval=$with_system_libmpdec;
10425else
10426 with_system_libmpdec="no"
10427fi
10428
10429
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10431$as_echo "$with_system_libmpdec" >&6; }
10432
Benjamin Peterson076ed002010-10-31 17:11:02 +000010433# Check for support for loadable sqlite extensions
10434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10435$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10436# Check whether --enable-loadable-sqlite-extensions was given.
10437if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10438 enableval=$enable_loadable_sqlite_extensions;
10439else
10440 enable_loadable_sqlite_extensions="no"
10441fi
10442
10443
10444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10445$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10446
Ned Deilyd819b932013-09-06 01:07:05 -070010447# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10448
10449
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10451$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10452
10453# Check whether --with-tcltk-includes was given.
10454if test "${with_tcltk_includes+set}" = set; then :
10455 withval=$with_tcltk_includes;
10456else
10457 with_tcltk_includes="default"
10458fi
10459
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10461$as_echo "$with_tcltk_includes" >&6; }
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10463$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10464
10465# Check whether --with-tcltk-libs was given.
10466if test "${with_tcltk_libs+set}" = set; then :
10467 withval=$with_tcltk_libs;
10468else
10469 with_tcltk_libs="default"
10470fi
10471
10472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10473$as_echo "$with_tcltk_libs" >&6; }
10474if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10475then
10476 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10477 then
10478 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10479 fi
10480 TCLTK_INCLUDES=""
10481 TCLTK_LIBS=""
10482else
10483 TCLTK_INCLUDES="$with_tcltk_includes"
10484 TCLTK_LIBS="$with_tcltk_libs"
10485fi
10486
Matthias Klose55708cc2009-04-30 08:06:49 +000010487# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10489$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010490
10491# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010492if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010493 withval=$with_dbmliborder;
10494if test x$with_dbmliborder = xyes
10495then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010496as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010497else
10498 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10499 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10500 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010501 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010502 fi
10503 done
10504fi
10505fi
10506
Matthias Kloseb9621712010-04-24 17:59:49 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10508$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510
Martin v. Löwis11437992002-04-12 09:54:03 +000010511
10512# Templates for things AC_DEFINEd more than once.
10513# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010514
10515
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010516if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010517then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010518 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010520
10521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522elif test "$ac_cv_kpthread" = "yes"
10523then
10524 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010525 if test "$ac_cv_cxx_thread" = "yes"; then
10526 CXX="$CXX -Kpthread"
10527 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010528 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010529elif test "$ac_cv_kthread" = "yes"
10530then
10531 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010532 if test "$ac_cv_cxx_thread" = "yes"; then
10533 CXX="$CXX -Kthread"
10534 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010535 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010536elif test "$ac_cv_pthread" = "yes"
10537then
10538 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010539 if test "$ac_cv_cxx_thread" = "yes"; then
10540 CXX="$CXX -pthread"
10541 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544 if test ! -z "$withval" -a -d "$withval"
10545 then LDFLAGS="$LDFLAGS -L$withval"
10546 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547
10548 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010549 # define _POSIX_THREADS in unistd.h. Some apparently don't
10550 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10552$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010554/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010555
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010557#ifdef _POSIX_THREADS
10558yes
10559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010560
10561_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564 unistd_defines_pthreads=yes
10565else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010566 unistd_defines_pthreads=no
10567fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010568rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10571$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010574
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010575 # Just looking for pthread_create in libpthread is not enough:
10576 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10577 # So we really have to include pthread.h, and then link.
10578 _libs=$LIBS
10579 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10581$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010584
10585#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010586#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010587
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010588void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010589int
10590main ()
10591{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010592
10593pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ;
10595 return 0;
10596}
10597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10601$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010602 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010603
Guido van Rossum02a1c402000-02-25 19:26:31 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010606 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010609
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010610 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010611
Guido van Rossumad678af1998-10-02 14:42:15 +000010612else
Guido van Rossumad678af1998-10-02 14:42:15 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10615$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010616if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010618else
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010620LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624/* Override any GCC internal prototype to avoid an error.
10625 Use char because int might match the return type of a GCC
10626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010627#ifdef __cplusplus
10628extern "C"
10629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010630char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010631int
10632main ()
10633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 ;
10636 return 0;
10637}
10638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010641else
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010644rm -f core conftest.err conftest.$ac_objext \
10645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010646LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10649$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010650if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010651
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010652 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010653 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010654
Greg Steinadf63d62000-07-05 10:38:09 +000010655else
Greg Steinadf63d62000-07-05 10:38:09 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10658$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010659if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010661else
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010663LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667/* Override any GCC internal prototype to avoid an error.
10668 Use char because int might match the return type of a GCC
10669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010670#ifdef __cplusplus
10671extern "C"
10672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010673char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010674int
10675main ()
10676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010684else
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010687rm -f core conftest.err conftest.$ac_objext \
10688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010689LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10692$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010693if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010694
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010695 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010696 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010697
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010698else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10701$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010702if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010704else
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010706LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710/* Override any GCC internal prototype to avoid an error.
10711 Use char because int might match the return type of a GCC
10712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010713#ifdef __cplusplus
10714extern "C"
10715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010716char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010717int
10718main ()
10719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010730rm -f core conftest.err conftest.$ac_objext \
10731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10735$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010736if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010737
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010738 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010739 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010740
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010741else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10744$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010745if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010747else
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010749LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753/* Override any GCC internal prototype to avoid an error.
10754 Use char because int might match the return type of a GCC
10755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010756#ifdef __cplusplus
10757extern "C"
10758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010759char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010760int
10761main ()
10762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 ;
10765 return 0;
10766}
10767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010773rm -f core conftest.err conftest.$ac_objext \
10774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010775LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10778$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010779if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010782 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010783
Guido van Rossumb93a8621998-05-07 13:27:32 +000010784else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010785
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010786 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10787
Guido van Rossum2d38f911996-06-26 19:47:01 +000010788fi
10789
Guido van Rossum627b2d71993-12-24 10:39:16 +000010790
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010791fi
10792
Guido van Rossum0be3e491997-05-22 20:33:33 +000010793fi
10794
Guido van Rossum49545951997-12-02 19:28:29 +000010795fi
10796
Guido van Rossumb93a8621998-05-07 13:27:32 +000010797fi
10798
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010800rm -f core conftest.err conftest.$ac_objext \
10801 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10804$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010805if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010809LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813/* Override any GCC internal prototype to avoid an error.
10814 Use char because int might match the return type of a GCC
10815 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010816#ifdef __cplusplus
10817extern "C"
10818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010819char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010820int
10821main ()
10822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010833rm -f core conftest.err conftest.$ac_objext \
10834 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010835LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10838$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010839if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010840
Martin v. Löwis130fb172001-07-19 11:00:41 +000010841 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010842
Guido van Rossum627b2d71993-12-24 10:39:16 +000010843fi
10844
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010845
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010847
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010848if test "$posix_threads" = "yes"; then
10849 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852
10853 fi
10854
10855 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10856 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010857 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010859
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010860 ;;
10861 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010862$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010863
10864 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010865 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010867
10868 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010869 esac
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10872$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010873 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010877 ac_cv_pthread_system_supported=no
10878else
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. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010881
10882 #include <stdio.h>
10883 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884 void *foo(void *parm) {
10885 return NULL;
10886 }
10887 main() {
10888 pthread_attr_t attr;
10889 pthread_t id;
10890 if (pthread_attr_init(&attr)) exit(-1);
10891 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10892 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10893 exit(0);
10894 }
10895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010896if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897 ac_cv_pthread_system_supported=yes
10898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010903fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905
Guido van Rossum627b2d71993-12-24 10:39:16 +000010906fi
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10909$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010910 if test "$ac_cv_pthread_system_supported" = "yes"; then
10911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913
10914 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 for ac_func in pthread_sigmask
10916do :
10917 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010918if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010919 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010920#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010921_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010922 case $ac_sys_system in
10923 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010926
10927 ;;
10928 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010929fi
10930done
10931
pdoxe14679c2017-10-05 00:01:56 -070010932 for ac_func in pthread_getcpuclockid
10933do :
10934 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10935if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10936 cat >>confdefs.h <<_ACEOF
10937#define HAVE_PTHREAD_GETCPUCLOCKID 1
10938_ACEOF
10939
10940fi
10941done
10942
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010943fi
10944
10945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10949$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010951if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956 ipv6=no
10957 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10959$as_echo "yes" >&6; }
10960 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961
10962 ipv6=yes
10963 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965else
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010968/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969 /* AF_INET6 available check */
10970#include <sys/types.h>
10971#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010972int
10973main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010975int domain = AF_INET6;
10976 ;
10977 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010978}
Martin v. Löwis11437992002-04-12 09:54:03 +000010979_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010980if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10983$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010985
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986else
Matthias Kloseb159a552010-04-25 21:00:44 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010991
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010995if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10997$as_echo_n "checking if RFC2553 API is available... " >&6; }
10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011000
11001 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011002#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
11005{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011006struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011007 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011008 ;
11009 return 0;
11010}
Matthias Kloseb159a552010-04-25 21:00:44 +000011011
Martin v. Löwis11437992002-04-12 09:54:03 +000011012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011014
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011016$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011017 ipv6=yes
11018
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011019else
Matthias Kloseb159a552010-04-25 21:00:44 +000011020
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011023 ipv6=no
11024
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011027fi
11028
11029if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011031
11032fi
11033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034fi
11035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036
11037ipv6type=unknown
11038ipv6lib=none
11039ipv6trylibc=no
11040
11041if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11043$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011044 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11045 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046 case $i in
11047 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051#include <netinet/in.h>
11052#ifdef IPV6_INRIA_VERSION
11053yes
11054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011058 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011060rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061
11062 ;;
11063 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067#include <netinet/in.h>
11068#ifdef __KAME__
11069yes
11070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074 ipv6type=$i;
11075 ipv6lib=inet6
11076 ipv6libdir=/usr/local/v6/lib
11077 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080
11081 ;;
11082 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086#include <features.h>
11087#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11088yes
11089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 ipv6type=$i;
11094 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011096rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097
11098 ;;
11099 linux-inet6)
11100 if test -d /usr/inet6; then
11101 ipv6type=$i
11102 ipv6lib=inet6
11103 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011104 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105 fi
11106 ;;
11107 solaris)
11108 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011109 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110 ipv6type=$i
11111 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112 fi
11113 fi
11114 ;;
11115 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119#include <sys/param.h>
11120#ifdef _TOSHIBA_INET6
11121yes
11122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126 ipv6type=$i;
11127 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011128 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011130rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131
11132 ;;
11133 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137#include </usr/local/v6/include/sys/v6config.h>
11138#ifdef __V6D__
11139yes
11140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144 ipv6type=$i;
11145 ipv6lib=v6;
11146 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011147 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011149rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150
11151 ;;
11152 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011155
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156#include <sys/param.h>
11157#ifdef _ZETA_MINAMI_INET6
11158yes
11159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011160_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163 ipv6type=$i;
11164 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011165 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011166fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011167rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011168
11169 ;;
11170 esac
11171 if test "$ipv6type" != "unknown"; then
11172 break
11173 fi
11174 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11176$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177fi
11178
11179if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11180 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11181 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11182 echo "using lib$ipv6lib"
11183 else
11184 if test $ipv6trylibc = "yes"; then
11185 echo "using libc"
11186 else
11187 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11188 echo "You need to fetch lib$ipv6lib.a from appropriate"
11189 echo 'ipv6 kit and compile beforehand.'
11190 exit 1
11191 fi
11192 fi
11193fi
11194
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11196$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11198/* end confdefs.h. */
11199 /* CAN_RAW_FD_FRAMES available check */
11200#include <linux/can/raw.h>
11201int
11202main ()
11203{
11204int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11205 ;
11206 return 0;
11207}
11208_ACEOF
11209if ac_fn_c_try_compile "$LINENO"; then :
11210
11211
11212$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11213
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11215$as_echo "yes" >&6; }
11216
11217else
11218
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220$as_echo "no" >&6; }
11221
11222fi
11223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011225# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11227$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231 withval=$with_doc_strings;
11232fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011233
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011234
11235if test -z "$with_doc_strings"
11236then with_doc_strings="yes"
11237fi
11238if test "$with_doc_strings" != "no"
11239then
11240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011242
11243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11245$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011246
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011247# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11249$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253 withval=$with_pymalloc;
11254fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011255
Neil Schemenauera35c6882001-02-27 04:45:05 +000011256
Neil Schemenauer16c22972002-03-22 15:34:49 +000011257if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011258then
11259 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011260fi
11261if test "$with_pymalloc" != "no"
11262then
Martin v. Löwis11437992002-04-12 09:54:03 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011265
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011266 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11269$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011270
Nick Coghlan6ea41862017-06-11 13:16:15 +100011271# Check for --with-c-locale-coercion
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11273$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11274
11275# Check whether --with-c-locale-coercion was given.
11276if test "${with_c_locale_coercion+set}" = set; then :
11277 withval=$with_c_locale_coercion;
11278fi
11279
11280
11281if test -z "$with_c_locale_coercion"
11282then
11283 with_c_locale_coercion="yes"
11284fi
11285if test "$with_c_locale_coercion" != "no"
11286then
11287
11288$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11289
11290fi
11291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11292$as_echo "$with_c_locale_coercion" >&6; }
11293
Benjamin Peterson05159c42009-12-03 03:01:27 +000011294# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11296$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011297
11298# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011299if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011300 withval=$with_valgrind;
11301else
11302 with_valgrind=no
11303fi
11304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11306$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011307if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 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 +020011309if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011312
11313else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011314 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011315
11316fi
11317
11318
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011319 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011320fi
11321
Łukasz Langaa785c872016-09-09 17:37:37 -070011322# Check for DTrace support
11323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11324$as_echo_n "checking for --with-dtrace... " >&6; }
11325
11326# Check whether --with-dtrace was given.
11327if test "${with_dtrace+set}" = set; then :
11328 withval=$with_dtrace;
11329else
11330 with_dtrace=no
11331fi
11332
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11334$as_echo "$with_dtrace" >&6; }
11335
11336
11337
11338
11339
11340DTRACE=
11341DFLAGS=
11342DTRACE_HEADERS=
11343DTRACE_OBJS=
11344
11345if test "$with_dtrace" = "yes"
11346then
11347 # Extract the first word of "dtrace", so it can be a program name with args.
11348set dummy dtrace; ac_word=$2
11349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11350$as_echo_n "checking for $ac_word... " >&6; }
11351if ${ac_cv_path_DTRACE+:} false; then :
11352 $as_echo_n "(cached) " >&6
11353else
11354 case $DTRACE in
11355 [\\/]* | ?:[\\/]*)
11356 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11357 ;;
11358 *)
11359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11360for as_dir in $PATH
11361do
11362 IFS=$as_save_IFS
11363 test -z "$as_dir" && as_dir=.
11364 for ac_exec_ext in '' $ac_executable_extensions; do
11365 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11366 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11367 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11368 break 2
11369 fi
11370done
11371 done
11372IFS=$as_save_IFS
11373
11374 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11375 ;;
11376esac
11377fi
11378DTRACE=$ac_cv_path_DTRACE
11379if test -n "$DTRACE"; then
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11381$as_echo "$DTRACE" >&6; }
11382else
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
11385fi
11386
11387
11388 if test "$DTRACE" = "not found"; then
11389 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11390 fi
11391
11392$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11393
11394 DTRACE_HEADERS="Include/pydtrace_probes.h"
11395
11396 # On OS X, DTrace providers do not need to be explicitly compiled and
11397 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11398 # generation flag '-G'. We check for presence of this flag, rather than
11399 # hardcoding support by OS, in the interest of robustness.
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11401$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11402if ${ac_cv_dtrace_link+:} false; then :
11403 $as_echo_n "(cached) " >&6
11404else
11405 ac_cv_dtrace_link=no
11406 echo 'BEGIN' > conftest.d
11407 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11408 ac_cv_dtrace_link=yes
11409
11410fi
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11412$as_echo "$ac_cv_dtrace_link" >&6; }
11413 if test "$ac_cv_dtrace_link" = "yes"; then
11414 DTRACE_OBJS="Python/pydtrace.o"
11415 fi
11416fi
11417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011418# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011419
Guido van Rossum98935bf2001-09-05 19:13:16 +000011420DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011421
Guido van Rossume97ee181999-12-20 21:27:22 +000011422# the dlopen() function means we might want to use dynload_shlib.o. some
11423# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011424for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011425do :
11426 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011427if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011430_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011431
Guido van Rossume97ee181999-12-20 21:27:22 +000011432fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011433done
Guido van Rossume97ee181999-12-20 21:27:22 +000011434
Michael W. Hudson54241132001-12-07 15:38:26 +000011435
Guido van Rossume97ee181999-12-20 21:27:22 +000011436# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11437# loading of modules.
11438
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11440$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011441if test -z "$DYNLOADFILE"
11442then
11443 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011444 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11445 if test "$ac_cv_func_dlopen" = yes
11446 then DYNLOADFILE="dynload_shlib.o"
11447 else DYNLOADFILE="dynload_aix.o"
11448 fi
11449 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011450 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011451 *)
11452 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11453 # out any dynamic loading
11454 if test "$ac_cv_func_dlopen" = yes
11455 then DYNLOADFILE="dynload_shlib.o"
11456 else DYNLOADFILE="dynload_stub.o"
11457 fi
11458 ;;
11459 esac
11460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11462$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011463if test "$DYNLOADFILE" != "dynload_stub.o"
11464then
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Matthias Kloseb9621712010-04-24 17:59:49 +000011466$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011467
11468fi
11469
Neil Schemenauer4e425612001-06-19 15:44:15 +000011470# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11474$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011475if test -z "$MACHDEP_OBJS"
11476then
Jack Jansene578a632001-08-15 01:27:14 +000011477 MACHDEP_OBJS=$extra_machdep_objs
11478else
11479 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011480fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011481if test -z "$MACHDEP_OBJS"; then
11482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11483$as_echo "none" >&6; }
11484else
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11486$as_echo "$MACHDEP_OBJS" >&6; }
11487fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011488
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011490for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011491 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011492 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011493 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011494 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011495 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011496 if_nameindex \
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011497 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011498 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011499 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011500 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011501 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011502 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011503 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011504 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011505 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11506 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011507 sigaction sigaltstack siginterrupt sigpending sigrelse \
11508 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011509 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011510 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011511 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011512do :
11513 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11514ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011515if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011518_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520fi
11521done
11522
Michael W. Hudson54241132001-12-07 15:38:26 +000011523
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011524# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11525# links. Some libc implementations have a stub lchmod implementation that always
11526# returns an error.
11527if test "$MACHDEP" != linux; then
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011528 for ac_func in lchmod
11529do :
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011530 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11531if test "x$ac_cv_func_lchmod" = xyes; then :
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011532 cat >>confdefs.h <<_ACEOF
11533#define HAVE_LCHMOD 1
11534_ACEOF
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011535
11536fi
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011537done
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011538
11539fi
11540
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011541ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11542 #include <dirent.h>
11543"
11544if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11545
11546$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11547
11548fi
11549
11550
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011551# For some functions, having a definition is not sufficient, since
11552# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11554$as_echo_n "checking for chroot... " >&6; }
11555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558int
11559main ()
11560{
11561void *x=chroot
11562 ;
11563 return 0;
11564}
11565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569
Matthias Kloseb159a552010-04-25 21:00:44 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011571$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572else
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11574$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575
11576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11579$as_echo_n "checking for link... " >&6; }
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583int
11584main ()
11585{
11586void *x=link
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594
Matthias Kloseb159a552010-04-25 21:00:44 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011600
11601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11604$as_echo_n "checking for symlink... " >&6; }
11605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011606/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608int
11609main ()
11610{
11611void *x=symlink
11612 ;
11613 return 0;
11614}
11615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011617
Matthias Kloseb9621712010-04-24 17:59:49 +000011618$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619
Matthias Kloseb159a552010-04-25 21:00:44 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011621$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011622else
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011625
11626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11629$as_echo_n "checking for fchdir... " >&6; }
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011632#include <unistd.h>
11633int
11634main ()
11635{
11636void *x=fchdir
11637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644
Matthias Kloseb159a552010-04-25 21:00:44 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650
11651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11654$as_echo_n "checking for fsync... " >&6; }
11655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011657#include <unistd.h>
11658int
11659main ()
11660{
11661void *x=fsync
11662 ;
11663 return 0;
11664}
11665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669
Matthias Kloseb159a552010-04-25 21:00:44 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011671$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011675
11676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11679$as_echo_n "checking for fdatasync... " >&6; }
11680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682#include <unistd.h>
11683int
11684main ()
11685{
11686void *x=fdatasync
11687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011694
Matthias Kloseb159a552010-04-25 21:00:44 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011696$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011697else
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11699$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011700
11701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11704$as_echo_n "checking for epoll... " >&6; }
11705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011706/* end confdefs.h. */
11707#include <sys/epoll.h>
11708int
11709main ()
11710{
11711void *x=epoll_create
11712 ;
11713 return 0;
11714}
11715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011719
Matthias Kloseb159a552010-04-25 21:00:44 +000011720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011722else
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11724$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011725
11726fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11729$as_echo_n "checking for epoll_create1... " >&6; }
11730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731/* end confdefs.h. */
11732#include <sys/epoll.h>
11733int
11734main ()
11735{
11736void *x=epoll_create1
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741if ac_fn_c_try_compile "$LINENO"; then :
11742
11743$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11744
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11746$as_echo "yes" >&6; }
11747else
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750
11751fi
11752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11754$as_echo_n "checking for kqueue... " >&6; }
11755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011756/* end confdefs.h. */
11757
11758#include <sys/types.h>
11759#include <sys/event.h>
11760
11761int
11762main ()
11763{
11764int x=kqueue()
11765 ;
11766 return 0;
11767}
11768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011769if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011772
Matthias Kloseb159a552010-04-25 21:00:44 +000011773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011774$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11777$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011778
11779fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11782$as_echo_n "checking for prlimit... " >&6; }
11783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784/* end confdefs.h. */
11785
11786#include <sys/time.h>
11787#include <sys/resource.h>
11788
11789int
11790main ()
11791{
11792void *x=prlimit
11793 ;
11794 return 0;
11795}
11796_ACEOF
11797if ac_fn_c_try_compile "$LINENO"; then :
11798
11799$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11800
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11802$as_echo "yes" >&6; }
11803else
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806
11807fi
11808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11809
Martin v. Löwisd5843682002-11-21 20:41:28 +000011810# On some systems (eg. FreeBSD 5), we would find a definition of the
11811# functions ctermid_r, setgroups in the library, but no prototype
11812# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11813# address to avoid compiler warnings and potential miscompilations
11814# because of the missing prototypes.
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11817$as_echo_n "checking for ctermid_r... " >&6; }
11818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011819/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011820
Martin v. Löwisd5843682002-11-21 20:41:28 +000011821#include <stdio.h>
11822
Martin v. Löwisd5843682002-11-21 20:41:28 +000011823int
11824main ()
11825{
11826void* p = ctermid_r
11827 ;
11828 return 0;
11829}
11830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011834
Matthias Kloseb159a552010-04-25 21:00:44 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011836$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11839$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011840
11841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11843
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11845$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011847 $as_echo_n "(cached) " >&6
11848else
11849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011850/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011851#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011852int
11853main ()
11854{
11855void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011856
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011862 ac_cv_flock_decl=yes
11863else
11864 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011865
11866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011868
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011869fi
11870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11871$as_echo "$ac_cv_flock_decl" >&6; }
11872if test "x${ac_cv_flock_decl}" = xyes; then
11873 for ac_func in flock
11874do :
11875 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011877 cat >>confdefs.h <<_ACEOF
11878#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011879_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011880
Antoine Pitroua3000072010-09-07 14:52:42 +000011881else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011883$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011884if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011885 $as_echo_n "(cached) " >&6
11886else
11887 ac_check_lib_save_LIBS=$LIBS
11888LIBS="-lbsd $LIBS"
11889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890/* end confdefs.h. */
11891
11892/* Override any GCC internal prototype to avoid an error.
11893 Use char because int might match the return type of a GCC
11894 builtin and then its argument prototype would still apply. */
11895#ifdef __cplusplus
11896extern "C"
11897#endif
11898char flock ();
11899int
11900main ()
11901{
11902return flock ();
11903 ;
11904 return 0;
11905}
11906_ACEOF
11907if ac_fn_c_try_link "$LINENO"; then :
11908 ac_cv_lib_bsd_flock=yes
11909else
11910 ac_cv_lib_bsd_flock=no
11911fi
11912rm -f core conftest.err conftest.$ac_objext \
11913 conftest$ac_exeext conftest.$ac_ext
11914LIBS=$ac_check_lib_save_LIBS
11915fi
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11917$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011918if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011919 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011920
11921
11922$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11923
11924
11925fi
11926
11927
11928fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011929done
11930
Antoine Pitroua3000072010-09-07 14:52:42 +000011931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11934$as_echo_n "checking for getpagesize... " >&6; }
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011936/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011937
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011938#include <unistd.h>
11939
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011940int
11941main ()
11942{
11943void* p = getpagesize
11944 ;
11945 return 0;
11946}
11947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011949
Matthias Kloseb9621712010-04-24 17:59:49 +000011950$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011951
Matthias Kloseb159a552010-04-25 21:00:44 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011957
11958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011960
Victor Stinner984890f2011-11-24 13:53:38 +010011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11962$as_echo_n "checking for broken unsetenv... " >&6; }
11963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964/* end confdefs.h. */
11965
11966#include <stdlib.h>
11967
11968int
11969main ()
11970{
11971int res = unsetenv("DUMMY")
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976if ac_fn_c_try_compile "$LINENO"; then :
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
11979else
11980
11981$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11982
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11984$as_echo "yes" >&6; }
11985
11986fi
11987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11988
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011989for ac_prog in true
11990do
11991 # Extract the first word of "$ac_prog", so it can be a program name with args.
11992set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11994$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011995if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011997else
11998 if test -n "$TRUE"; then
11999 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12000else
12001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12002for as_dir in $PATH
12003do
12004 IFS=$as_save_IFS
12005 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012008 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 $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 +000012010 break 2
12011 fi
12012done
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012015
12016fi
12017fi
12018TRUE=$ac_cv_prog_TRUE
12019if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12021$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012025fi
12026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012028 test -n "$TRUE" && break
12029done
12030test -n "$TRUE" || TRUE="/bin/true"
12031
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12034$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012035if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012037else
12038 ac_check_lib_save_LIBS=$LIBS
12039LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043/* Override any GCC internal prototype to avoid an error.
12044 Use char because int might match the return type of a GCC
12045 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012046#ifdef __cplusplus
12047extern "C"
12048#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012050int
12051main ()
12052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054 ;
12055 return 0;
12056}
12057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012058if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012059 ac_cv_lib_c_inet_aton=yes
12060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063rm -f core conftest.err conftest.$ac_objext \
12064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065LIBS=$ac_check_lib_save_LIBS
12066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12068$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012069if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012070 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12073$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012074if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012076else
12077 ac_check_lib_save_LIBS=$LIBS
12078LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012080/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082/* Override any GCC internal prototype to avoid an error.
12083 Use char because int might match the return type of a GCC
12084 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085#ifdef __cplusplus
12086extern "C"
12087#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012089int
12090main ()
12091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012093 ;
12094 return 0;
12095}
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012098 ac_cv_lib_resolv_inet_aton=yes
12099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102rm -f core conftest.err conftest.$ac_objext \
12103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012104LIBS=$ac_check_lib_save_LIBS
12105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12107$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012109 cat >>confdefs.h <<_ACEOF
12110#define HAVE_LIBRESOLV 1
12111_ACEOF
12112
12113 LIBS="-lresolv $LIBS"
12114
12115fi
12116
12117
12118fi
12119
12120
Christian Heimesd0764e22007-12-04 15:00:33 +000012121# On Tru64, chflags seems to be present, but calling it will
12122# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12124$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012125if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012129 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012132/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012133
Christian Heimesd0764e22007-12-04 15:00:33 +000012134#include <sys/stat.h>
12135#include <unistd.h>
12136int main(int argc, char*argv[])
12137{
12138 if(chflags(argv[0], 0) != 0)
12139 return 1;
12140 return 0;
12141}
Ned Deily3eb67d52011-06-28 00:00:28 -070012142
Christian Heimesd0764e22007-12-04 15:00:33 +000012143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012145 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012151fi
12152
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12156$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012157if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012160 ac_cv_have_chflags="yes"
12161else
12162 ac_cv_have_chflags="no"
12163fi
12164
12165fi
12166if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169
12170fi
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12173$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012174if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012178 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012181/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012182
Christian Heimesd0764e22007-12-04 15:00:33 +000012183#include <sys/stat.h>
12184#include <unistd.h>
12185int main(int argc, char*argv[])
12186{
12187 if(lchflags(argv[0], 0) != 0)
12188 return 1;
12189 return 0;
12190}
Ned Deily3eb67d52011-06-28 00:00:28 -070012191
Christian Heimesd0764e22007-12-04 15:00:33 +000012192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012193if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012194 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012200fi
12201
12202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12205$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012206if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012209 ac_cv_have_lchflags="yes"
12210else
12211 ac_cv_have_lchflags="no"
12212fi
12213
12214fi
12215if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012216
Matthias Kloseb9621712010-04-24 17:59:49 +000012217$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012218
12219fi
12220
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012221case $ac_sys_system/$ac_sys_release in
12222Darwin/*)
12223 _CUR_CFLAGS="${CFLAGS}"
12224 _CUR_LDFLAGS="${LDFLAGS}"
12225 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12226 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12227 ;;
12228esac
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12231$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012234else
12235 ac_check_lib_save_LIBS=$LIBS
12236LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012238/* end confdefs.h. */
12239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240/* Override any GCC internal prototype to avoid an error.
12241 Use char because int might match the return type of a GCC
12242 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012243#ifdef __cplusplus
12244extern "C"
12245#endif
12246char inflateCopy ();
12247int
12248main ()
12249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012251 ;
12252 return 0;
12253}
12254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012256 ac_cv_lib_z_inflateCopy=yes
12257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012260rm -f core conftest.err conftest.$ac_objext \
12261 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012262LIBS=$ac_check_lib_save_LIBS
12263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12265$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012269
12270fi
12271
12272
12273case $ac_sys_system/$ac_sys_release in
12274Darwin/*)
12275 CFLAGS="${_CUR_CFLAGS}"
12276 LDFLAGS="${_CUR_LDFLAGS}"
12277 ;;
12278esac
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12281$as_echo_n "checking for hstrerror... " >&6; }
12282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012284
Martin v. Löwise9416172003-05-03 10:12:45 +000012285#include <netdb.h>
12286
Martin v. Löwise9416172003-05-03 10:12:45 +000012287int
12288main ()
12289{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012290void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012298
Matthias Kloseb159a552010-04-25 21:00:44 +000012299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012300$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012304
12305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12310$as_echo_n "checking for inet_aton... " >&6; }
12311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012312/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012313
Martin v. Löwis86d66262006-02-17 08:40:11 +000012314#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012315#include <sys/socket.h>
12316#include <netinet/in.h>
12317#include <arpa/inet.h>
12318
Martin v. Löwise9416172003-05-03 10:12:45 +000012319int
12320main ()
12321{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012322void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012323 ;
12324 return 0;
12325}
12326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Matthias Kloseb159a552010-04-25 21:00:44 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012332$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012336
12337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012338rm -f core conftest.err conftest.$ac_objext \
12339 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12342$as_echo_n "checking for inet_pton... " >&6; }
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012345
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012346#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012347#include <sys/socket.h>
12348#include <netinet/in.h>
12349#include <arpa/inet.h>
12350
Martin v. Löwise9416172003-05-03 10:12:45 +000012351int
12352main ()
12353{
12354void* p = inet_pton
12355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012362
Matthias Kloseb159a552010-04-25 21:00:44 +000012363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012364$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12367$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012368
12369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012371
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012372# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12374$as_echo_n "checking for setgroups... " >&6; }
12375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012377
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012378#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012379#ifdef HAVE_GRP_H
12380#include <grp.h>
12381#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012382
Martin v. Löwisd5843682002-11-21 20:41:28 +000012383int
12384main ()
12385{
12386void* p = setgroups
12387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012394
Matthias Kloseb159a552010-04-25 21:00:44 +000012395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012400
12401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012404# check for openpty and forkpty
12405
12406for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012407do :
12408 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if test "x$ac_cv_func_openpty" = 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_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012412_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12416$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012419else
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012421LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425/* Override any GCC internal prototype to avoid an error.
12426 Use char because int might match the return type of a GCC
12427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012428#ifdef __cplusplus
12429extern "C"
12430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012431char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012445rm -f core conftest.err conftest.$ac_objext \
12446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012447LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12450$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012451if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12456$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012459else
12460 ac_check_lib_save_LIBS=$LIBS
12461LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012463/* end confdefs.h. */
12464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465/* Override any GCC internal prototype to avoid an error.
12466 Use char because int might match the return type of a GCC
12467 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012468#ifdef __cplusplus
12469extern "C"
12470#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012471char openpty ();
12472int
12473main ()
12474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012481 ac_cv_lib_bsd_openpty=yes
12482else
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012485rm -f core conftest.err conftest.$ac_objext \
12486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012487LIBS=$ac_check_lib_save_LIBS
12488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12490$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012491if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012493 LIBS="$LIBS -lbsd"
12494fi
12495
12496
12497fi
12498
Fred Drake8cef4cf2000-06-28 16:40:38 +000012499
12500fi
12501done
12502
12503for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012504do :
12505 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012506if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012508#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012509_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012510
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511else
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12513$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012514if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012516else
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522/* Override any GCC internal prototype to avoid an error.
12523 Use char because int might match the return type of a GCC
12524 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012525#ifdef __cplusplus
12526extern "C"
12527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012528char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012529int
12530main ()
12531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ;
12534 return 0;
12535}
12536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542rm -f core conftest.err conftest.$ac_objext \
12543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012544LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12547$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012548if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012550 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12553$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012554if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012556else
12557 ac_check_lib_save_LIBS=$LIBS
12558LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012560/* end confdefs.h. */
12561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562/* Override any GCC internal prototype to avoid an error.
12563 Use char because int might match the return type of a GCC
12564 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012565#ifdef __cplusplus
12566extern "C"
12567#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012568char forkpty ();
12569int
12570main ()
12571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012573 ;
12574 return 0;
12575}
12576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012578 ac_cv_lib_bsd_forkpty=yes
12579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582rm -f core conftest.err conftest.$ac_objext \
12583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012584LIBS=$ac_check_lib_save_LIBS
12585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12587$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012588if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590 LIBS="$LIBS -lbsd"
12591fi
12592
12593
12594fi
12595
Fred Drake8cef4cf2000-06-28 16:40:38 +000012596
12597fi
12598done
12599
Jack Jansendd19cf82001-12-06 22:36:17 +000012600
Michael W. Hudson54241132001-12-07 15:38:26 +000012601# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012602for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012603do :
12604 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12605ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012606if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012608#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012609_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612done
12613
Michael W. Hudson54241132001-12-07 15:38:26 +000012614
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012615ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012616if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012617 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012618
Martin v. Löwis1142de32002-03-29 16:28:31 +000012619else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012621 *" dup2.$ac_objext "* ) ;;
12622 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012624esac
12625
Martin v. Löwis1142de32002-03-29 16:28:31 +000012626fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012627
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012628ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012629if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012630 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12631
12632else
12633 case " $LIBOBJS " in
12634 *" strdup.$ac_objext "* ) ;;
12635 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12636 ;;
12637esac
12638
12639fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012640
12641
12642for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012643do :
12644 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012645if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012647#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ;
12657 return 0;
12658}
12659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012661
Matthias Kloseb9621712010-04-24 17:59:49 +000012662$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012663
Guido van Rossum627b2d71993-12-24 10:39:16 +000012664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012666
Guido van Rossum627b2d71993-12-24 10:39:16 +000012667fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012668done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669
Jack Jansen150753c2003-03-29 22:07:47 +000012670for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012671do :
12672 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012673if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012674 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012675#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012678/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012679#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012680int
12681main ()
12682{
12683setpgrp(0,0);
12684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012691
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012694
12695fi
12696done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012697
Thomas Wouters3a584202000-08-05 23:28:51 +000012698for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012699do :
12700 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012701if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012707#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_compile "$LINENO"; then :
12717
Guido van Rossum627b2d71993-12-24 10:39:16 +000012718else
Skip Montanaro6dead952003-09-25 14:50:04 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012721
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Guido van Rossum627b2d71993-12-24 10:39:16 +000012723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012727done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728
Michael W. Hudson54241132001-12-07 15:38:26 +000012729
Miss Islington (bot)a144fee2018-12-30 17:59:52 -080012730# We search for both crypt and crypt_r as one or the other may be defined
12731# This gets us our -lcrypt in LIBS when required on the target platform.
12732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12733$as_echo_n "checking for library containing crypt... " >&6; }
12734if ${ac_cv_search_crypt+:} false; then :
12735 $as_echo_n "(cached) " >&6
12736else
12737 ac_func_search_save_LIBS=$LIBS
12738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12739/* end confdefs.h. */
12740
12741/* Override any GCC internal prototype to avoid an error.
12742 Use char because int might match the return type of a GCC
12743 builtin and then its argument prototype would still apply. */
12744#ifdef __cplusplus
12745extern "C"
12746#endif
12747char crypt ();
12748int
12749main ()
12750{
12751return crypt ();
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756for ac_lib in '' crypt; do
12757 if test -z "$ac_lib"; then
12758 ac_res="none required"
12759 else
12760 ac_res=-l$ac_lib
12761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12762 fi
12763 if ac_fn_c_try_link "$LINENO"; then :
12764 ac_cv_search_crypt=$ac_res
12765fi
12766rm -f core conftest.err conftest.$ac_objext \
12767 conftest$ac_exeext
12768 if ${ac_cv_search_crypt+:} false; then :
12769 break
12770fi
12771done
12772if ${ac_cv_search_crypt+:} false; then :
12773
12774else
12775 ac_cv_search_crypt=no
12776fi
12777rm conftest.$ac_ext
12778LIBS=$ac_func_search_save_LIBS
12779fi
12780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12781$as_echo "$ac_cv_search_crypt" >&6; }
12782ac_res=$ac_cv_search_crypt
12783if test "$ac_res" != no; then :
12784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12785
12786fi
12787
12788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12789$as_echo_n "checking for library containing crypt_r... " >&6; }
12790if ${ac_cv_search_crypt_r+:} false; then :
12791 $as_echo_n "(cached) " >&6
12792else
12793 ac_func_search_save_LIBS=$LIBS
12794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12795/* end confdefs.h. */
12796
12797/* Override any GCC internal prototype to avoid an error.
12798 Use char because int might match the return type of a GCC
12799 builtin and then its argument prototype would still apply. */
12800#ifdef __cplusplus
12801extern "C"
12802#endif
12803char crypt_r ();
12804int
12805main ()
12806{
12807return crypt_r ();
12808 ;
12809 return 0;
12810}
12811_ACEOF
12812for ac_lib in '' crypt; do
12813 if test -z "$ac_lib"; then
12814 ac_res="none required"
12815 else
12816 ac_res=-l$ac_lib
12817 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12818 fi
12819 if ac_fn_c_try_link "$LINENO"; then :
12820 ac_cv_search_crypt_r=$ac_res
12821fi
12822rm -f core conftest.err conftest.$ac_objext \
12823 conftest$ac_exeext
12824 if ${ac_cv_search_crypt_r+:} false; then :
12825 break
12826fi
12827done
12828if ${ac_cv_search_crypt_r+:} false; then :
12829
12830else
12831 ac_cv_search_crypt_r=no
12832fi
12833rm conftest.$ac_ext
12834LIBS=$ac_func_search_save_LIBS
12835fi
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12837$as_echo "$ac_cv_search_crypt_r" >&6; }
12838ac_res=$ac_cv_search_crypt_r
12839if test "$ac_res" != no; then :
12840 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12841
12842fi
12843
12844
12845ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12846if test "x$ac_cv_func_crypt_r" = xyes; then :
12847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12848/* end confdefs.h. */
12849
12850#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12851#include <crypt.h>
12852
12853int
12854main ()
12855{
12856
12857struct crypt_data d;
12858char *r = crypt_r("", "", &d);
12859
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864if ac_fn_c_try_compile "$LINENO"; then :
12865
12866$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12867
12868fi
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12870
12871fi
12872
12873
Victor Stinnere0be4232011-10-25 13:06:09 +020012874for ac_func in clock_gettime
12875do :
12876 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12877if test "x$ac_cv_func_clock_gettime" = xyes; then :
12878 cat >>confdefs.h <<_ACEOF
12879#define HAVE_CLOCK_GETTIME 1
12880_ACEOF
12881
12882else
12883
12884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12885$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12886if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12887 $as_echo_n "(cached) " >&6
12888else
12889 ac_check_lib_save_LIBS=$LIBS
12890LIBS="-lrt $LIBS"
12891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12892/* end confdefs.h. */
12893
12894/* Override any GCC internal prototype to avoid an error.
12895 Use char because int might match the return type of a GCC
12896 builtin and then its argument prototype would still apply. */
12897#ifdef __cplusplus
12898extern "C"
12899#endif
12900char clock_gettime ();
12901int
12902main ()
12903{
12904return clock_gettime ();
12905 ;
12906 return 0;
12907}
12908_ACEOF
12909if ac_fn_c_try_link "$LINENO"; then :
12910 ac_cv_lib_rt_clock_gettime=yes
12911else
12912 ac_cv_lib_rt_clock_gettime=no
12913fi
12914rm -f core conftest.err conftest.$ac_objext \
12915 conftest$ac_exeext conftest.$ac_ext
12916LIBS=$ac_check_lib_save_LIBS
12917fi
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12919$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12920if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12921
Victor Stinner7efb8332014-08-29 15:41:08 +020012922 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012923 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12924
12925
12926$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12927
12928
12929fi
12930
12931
12932fi
12933done
12934
12935
12936for ac_func in clock_getres
12937do :
12938 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12939if test "x$ac_cv_func_clock_getres" = xyes; then :
12940 cat >>confdefs.h <<_ACEOF
12941#define HAVE_CLOCK_GETRES 1
12942_ACEOF
12943
12944else
12945
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12947$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12948if ${ac_cv_lib_rt_clock_getres+:} false; then :
12949 $as_echo_n "(cached) " >&6
12950else
12951 ac_check_lib_save_LIBS=$LIBS
12952LIBS="-lrt $LIBS"
12953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12954/* end confdefs.h. */
12955
12956/* Override any GCC internal prototype to avoid an error.
12957 Use char because int might match the return type of a GCC
12958 builtin and then its argument prototype would still apply. */
12959#ifdef __cplusplus
12960extern "C"
12961#endif
12962char clock_getres ();
12963int
12964main ()
12965{
12966return clock_getres ();
12967 ;
12968 return 0;
12969}
12970_ACEOF
12971if ac_fn_c_try_link "$LINENO"; then :
12972 ac_cv_lib_rt_clock_getres=yes
12973else
12974 ac_cv_lib_rt_clock_getres=no
12975fi
12976rm -f core conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
12978LIBS=$ac_check_lib_save_LIBS
12979fi
12980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12981$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12982if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12983
12984 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12985
12986
12987fi
12988
12989
12990fi
12991done
12992
12993
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012994for ac_func in clock_settime
12995do :
12996 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12997if test "x$ac_cv_func_clock_settime" = xyes; then :
12998 cat >>confdefs.h <<_ACEOF
12999#define HAVE_CLOCK_SETTIME 1
13000_ACEOF
13001
13002else
13003
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13005$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13006if ${ac_cv_lib_rt_clock_settime+:} false; then :
13007 $as_echo_n "(cached) " >&6
13008else
13009 ac_check_lib_save_LIBS=$LIBS
13010LIBS="-lrt $LIBS"
13011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012/* end confdefs.h. */
13013
13014/* Override any GCC internal prototype to avoid an error.
13015 Use char because int might match the return type of a GCC
13016 builtin and then its argument prototype would still apply. */
13017#ifdef __cplusplus
13018extern "C"
13019#endif
13020char clock_settime ();
13021int
13022main ()
13023{
13024return clock_settime ();
13025 ;
13026 return 0;
13027}
13028_ACEOF
13029if ac_fn_c_try_link "$LINENO"; then :
13030 ac_cv_lib_rt_clock_settime=yes
13031else
13032 ac_cv_lib_rt_clock_settime=no
13033fi
13034rm -f core conftest.err conftest.$ac_objext \
13035 conftest$ac_exeext conftest.$ac_ext
13036LIBS=$ac_check_lib_save_LIBS
13037fi
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13039$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13040if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13041
13042 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13043
13044
13045fi
13046
13047
13048fi
13049done
13050
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13053$as_echo_n "checking for major... " >&6; }
13054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013055/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013056
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013057#if defined(MAJOR_IN_MKDEV)
13058#include <sys/mkdev.h>
13059#elif defined(MAJOR_IN_SYSMACROS)
13060#include <sys/sysmacros.h>
13061#else
13062#include <sys/types.h>
13063#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013064
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013065int
13066main ()
13067{
13068
13069 makedev(major(0),minor(0));
13070
13071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013076
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13081$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013082
13083else
Skip Montanaro6dead952003-09-25 14:50:04 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13086$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013087
13088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013091
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013092# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013093# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13095$as_echo_n "checking for getaddrinfo... " >&6; }
13096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013098
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013099#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013100#include <sys/socket.h>
13101#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013102#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104int
13105main ()
13106{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013107getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ;
13109 return 0;
13110}
13111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013113 have_getaddrinfo=yes
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013117rm -f core conftest.err conftest.$ac_objext \
13118 conftest$ac_exeext conftest.$ac_ext
13119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13120$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121if test $have_getaddrinfo = yes
13122then
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13124$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013125 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013129
13130if test "${enable_ipv6+set}" = set; then
13131 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13132else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013134fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138
Stefan Krah19c21392012-11-22 23:47:32 +010013139#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140#include <sys/types.h>
13141#include <netdb.h>
13142#include <string.h>
13143#include <sys/socket.h>
13144#include <netinet/in.h>
13145
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013146int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147{
13148 int passive, gaierr, inet4 = 0, inet6 = 0;
13149 struct addrinfo hints, *ai, *aitop;
13150 char straddr[INET6_ADDRSTRLEN], strport[16];
13151
13152 for (passive = 0; passive <= 1; passive++) {
13153 memset(&hints, 0, sizeof(hints));
13154 hints.ai_family = AF_UNSPEC;
13155 hints.ai_flags = passive ? AI_PASSIVE : 0;
13156 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013157 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13159 (void)gai_strerror(gaierr);
13160 goto bad;
13161 }
13162 for (ai = aitop; ai; ai = ai->ai_next) {
13163 if (ai->ai_addr == NULL ||
13164 ai->ai_addrlen == 0 ||
13165 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13166 straddr, sizeof(straddr), strport, sizeof(strport),
13167 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13168 goto bad;
13169 }
13170 switch (ai->ai_family) {
13171 case AF_INET:
13172 if (strcmp(strport, "54321") != 0) {
13173 goto bad;
13174 }
13175 if (passive) {
13176 if (strcmp(straddr, "0.0.0.0") != 0) {
13177 goto bad;
13178 }
13179 } else {
13180 if (strcmp(straddr, "127.0.0.1") != 0) {
13181 goto bad;
13182 }
13183 }
13184 inet4++;
13185 break;
13186 case AF_INET6:
13187 if (strcmp(strport, "54321") != 0) {
13188 goto bad;
13189 }
13190 if (passive) {
13191 if (strcmp(straddr, "::") != 0) {
13192 goto bad;
13193 }
13194 } else {
13195 if (strcmp(straddr, "::1") != 0) {
13196 goto bad;
13197 }
13198 }
13199 inet6++;
13200 break;
13201 case AF_UNSPEC:
13202 goto bad;
13203 break;
13204 default:
13205 /* another family support? */
13206 break;
13207 }
13208 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013209 freeaddrinfo(aitop);
13210 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211 }
13212
13213 if (!(inet4 == 0 || inet4 == 2))
13214 goto bad;
13215 if (!(inet6 == 0 || inet6 == 2))
13216 goto bad;
13217
13218 if (aitop)
13219 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013220 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221
13222 bad:
13223 if (aitop)
13224 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226}
13227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013229if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013230 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13243$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13244
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013245if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246then
13247 if test $ipv6 = yes
13248 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249 echo 'Fatal: You must get working getaddrinfo() function.'
13250 echo ' or you can specify "--disable-ipv6"'.
13251 exit 1
13252 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013253else
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013256
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013258
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013259for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013260do :
13261 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013262if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013264#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013265_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267fi
13268done
13269
Michael W. Hudson54241132001-12-07 15:38:26 +000013270
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13273$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013274if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279#include <sys/types.h>
13280#include <sys/time.h>
13281#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283int
13284main ()
13285{
13286if ((struct tm *) 0)
13287return 0;
13288 ;
13289 return 0;
13290}
13291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13300$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013301if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013304
13305fi
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13308$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013309if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314#include <sys/types.h>
13315#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320struct tm tm;
13321 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 ;
13324 return 0;
13325}
13326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013327if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328 ac_cv_struct_tm=time.h
13329else
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13335$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013336if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013339
13340fi
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342ac_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 +000013343#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345"
Victor Stinnere0be4232011-10-25 13:06:09 +020013346if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013347
13348cat >>confdefs.h <<_ACEOF
13349#define HAVE_STRUCT_TM_TM_ZONE 1
13350_ACEOF
13351
13352
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
13359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13361"
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366fi
13367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370_ACEOF
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13373$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013374if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013379#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380#if !HAVE_DECL_TZNAME
13381extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384int
13385main ()
13386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 ;
13389 return 0;
13390}
13391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013392if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393 ac_cv_var_tzname=yes
13394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013397rm -f core conftest.err conftest.$ac_objext \
13398 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13401$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013402 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406 fi
13407fi
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409ac_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 +020013410if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
13412cat >>confdefs.h <<_ACEOF
13413#define HAVE_STRUCT_STAT_ST_RDEV 1
13414_ACEOF
13415
13416
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013417fi
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419ac_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 +020013420if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422cat >>confdefs.h <<_ACEOF
13423#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13424_ACEOF
13425
13426
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013427fi
13428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429ac_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 +020013430if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013431
13432cat >>confdefs.h <<_ACEOF
13433#define HAVE_STRUCT_STAT_ST_FLAGS 1
13434_ACEOF
13435
13436
13437fi
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439ac_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 +020013440if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013441
13442cat >>confdefs.h <<_ACEOF
13443#define HAVE_STRUCT_STAT_ST_GEN 1
13444_ACEOF
13445
13446
13447fi
13448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449ac_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 +020013450if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013451
13452cat >>confdefs.h <<_ACEOF
13453#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13454_ACEOF
13455
13456
13457fi
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459ac_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 +020013460if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462cat >>confdefs.h <<_ACEOF
13463#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13464_ACEOF
13465
13466
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013467fi
13468
Stefan Krah267b6392016-04-26 01:09:18 +020013469ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13470 #include <sys/types.h>
13471 #include <pwd.h>
13472
13473"
13474if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13475
13476cat >>confdefs.h <<_ACEOF
13477#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13478_ACEOF
13479
13480
13481fi
13482ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13483 #include <sys/types.h>
13484 #include <pwd.h>
13485
13486"
13487if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13488
13489cat >>confdefs.h <<_ACEOF
13490#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13491_ACEOF
13492
13493
13494fi
13495
Zachary Ware6a6967e2016-10-01 00:47:27 -050013496# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13497ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13498"
13499if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13500
13501cat >>confdefs.h <<_ACEOF
13502#define HAVE_SIGINFO_T_SI_BAND 1
13503_ACEOF
13504
13505
13506fi
13507
Michael W. Hudson54241132001-12-07 15:38:26 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13510$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013511if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013513else
Matthias Kloseb159a552010-04-25 21:00:44 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013516/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013517#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013518int
13519main ()
13520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ;
13523 return 0;
13524}
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527 ac_cv_header_time_altzone=yes
13528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13536$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013537if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540
13541fi
13542
Guido van Rossumda88dad1995-01-26 00:46:29 +000013543was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13545$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548
13549#include <sys/types.h>
13550#include <sys/select.h>
13551#include <sys/time.h>
13552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556;
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013566 was_it_defined=yes
13567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13571$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13574$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013575if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013580#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013581int
13582main ()
13583{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 ;
13586 return 0;
13587}
13588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013590 ac_cv_struct_addrinfo=yes
13591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13595fi
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13598$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013599if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602
13603fi
13604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13606$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612
13613# include <sys/types.h>
13614# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013615int
13616main ()
13617{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 ;
13620 return 0;
13621}
13622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624 ac_cv_struct_sockaddr_storage=yes
13625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13632$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013633if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636
13637fi
13638
Christian Heimesdffa3942016-09-05 23:54:41 +020013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13640$as_echo_n "checking for sockaddr_alg... " >&6; }
13641if ${ac_cv_struct_sockaddr_alg+:} false; then :
13642 $as_echo_n "(cached) " >&6
13643else
13644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645/* end confdefs.h. */
13646
13647# include <sys/types.h>
13648# include <sys/socket.h>
13649# include <linux/if_alg.h>
13650int
13651main ()
13652{
13653struct sockaddr_alg s
13654 ;
13655 return 0;
13656}
13657_ACEOF
13658if ac_fn_c_try_compile "$LINENO"; then :
13659 ac_cv_struct_sockaddr_alg=yes
13660else
13661 ac_cv_struct_sockaddr_alg=no
13662fi
13663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13664fi
13665
13666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13667$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13668if test $ac_cv_struct_sockaddr_alg = yes; then
13669
13670$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13671
13672fi
13673
Guido van Rossum627b2d71993-12-24 10:39:16 +000013674# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13677$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013678if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013680else
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013683$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013684int
13685main ()
13686{
13687static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013688test_array [0] = 0;
13689return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
13691 ;
13692 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013693}
Martin v. Löwis11437992002-04-12 09:54:03 +000013694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013696 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13703$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013706
13707fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13710$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013711if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013715/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716
Martin v. Löwis11437992002-04-12 09:54:03 +000013717int
13718main ()
13719{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013722 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013724 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726 char const *const *pcpcc;
13727 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 /* NEC SVR4.0.2 mips cc rejects this. */
13729 struct point {int x, y;};
13730 static struct point const zero = {0,0};
13731 /* AIX XL C 1.02.0.0 rejects this.
13732 It does not let you subtract one const X* pointer from another in
13733 an arm of an if-expression whose if-part is not a constant
13734 expression */
13735 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 ++pcpcc;
13739 ppc = (char**) pcpcc;
13740 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013741 { /* SCO 3.2v4 cc rejects this sort of thing. */
13742 char tx;
13743 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013745
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 }
13749 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13750 int x[] = {25, 17};
13751 const int *foo = &x[0];
13752 ++foo;
13753 }
13754 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13755 typedef const int *iptr;
13756 iptr p = 0;
13757 ++p;
13758 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013759 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013761 struct s { int j; const int *ap[3]; } bx;
13762 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 }
13764 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13765 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013769#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ;
13772 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013773}
Martin v. Löwis11437992002-04-12 09:54:03 +000013774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013776 ac_cv_c_const=yes
13777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13783$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787
13788fi
13789
Michael W. Hudson54241132001-12-07 15:38:26 +000013790
Guido van Rossumda88dad1995-01-26 00:46:29 +000013791works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13793$as_echo_n "checking for working signed char... " >&6; }
13794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797int
13798main ()
13799{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 ;
13802 return 0;
13803}
13804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013806 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013807else
Skip Montanaro6dead952003-09-25 14:50:04 +000013808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013810
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013811
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13815$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013816
Guido van Rossumda88dad1995-01-26 00:46:29 +000013817have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13819$as_echo_n "checking for prototypes... " >&6; }
13820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013821/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013823int
13824main ()
13825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ;
13828 return 0;
13829}
13830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
Matthias Kloseb159a552010-04-25 21:00:44 +000013835 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13839$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840
Guido van Rossumda88dad1995-01-26 00:46:29 +000013841works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13843$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013845/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846
13847#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013848int foo(int x, ...) {
13849 va_list va;
13850 va_start(va, x);
13851 va_arg(va, int);
13852 va_arg(va, char *);
13853 va_arg(va, double);
13854 return 0;
13855}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857int
13858main ()
13859{
Guido van Rossum90eea071996-08-30 20:58:57 +000013860return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 ;
13862 return 0;
13863}
13864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
13867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013870 works=yes
13871
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13875$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013876
Martin v. Löwisd6320502004-08-12 13:45:08 +000013877# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13879$as_echo_n "checking for socketpair... " >&6; }
13880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013881/* end confdefs.h. */
13882
13883#include <sys/types.h>
13884#include <sys/socket.h>
13885
13886int
13887main ()
13888{
13889void *x=socketpair
13890 ;
13891 return 0;
13892}
13893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013897
Matthias Kloseb159a552010-04-25 21:00:44 +000013898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013900else
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13902$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013903
13904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013906
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013907# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13909$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013911/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013912#include <sys/types.h>
13913#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013914int
13915main ()
13916{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917struct sockaddr x;
13918x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 ;
13920 return 0;
13921}
13922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_compile "$LINENO"; then :
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13925$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013928
13929else
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13931$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013932
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013936# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
13938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013940if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13945$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013946 OLD_CFLAGS=$CFLAGS
13947 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013949/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013950
13951# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
Martin v. Löwis11437992002-04-12 09:54:03 +000013953int
13954main ()
13955{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013956
13957 char *name;
13958 struct hostent *he, *res;
13959 char buffer[2048];
13960 int buflen = 2048;
13961 int h_errnop;
13962
13963 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
13965 ;
13966 return 0;
13967}
13968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13977$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979else
Skip Montanaro6dead952003-09-25 14:50:04 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13982$as_echo "no" >&6; }
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13984$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013986/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990int
13991main ()
13992{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993
13994 char *name;
13995 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013996 char buffer[2048];
13997 int buflen = 2048;
13998 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999
Matthias Kloseb159a552010-04-25 21:00:44 +000014000 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
14002 ;
14003 return 0;
14004}
14005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014009
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Matthias Kloseb159a552010-04-25 21:00:44 +000014011$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14014$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016else
Skip Montanaro6dead952003-09-25 14:50:04 +000014017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14019$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14021$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023/* end confdefs.h. */
14024
14025# include <netdb.h>
14026
14027int
14028main ()
14029{
14030
14031 char *name;
14032 struct hostent *he;
14033 struct hostent_data data;
14034
14035 (void) gethostbyname_r(name, he, &data);
14036
14037 ;
14038 return 0;
14039}
14040_ACEOF
14041if ac_fn_c_try_compile "$LINENO"; then :
14042
14043 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14044
14045
14046$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14047
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14049$as_echo "yes" >&6; }
14050
14051else
14052
14053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14054$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064 CFLAGS=$OLD_CFLAGS
14065
14066else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 for ac_func in gethostbyname
14069do :
14070 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014071if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014074_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014077done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014078
Michael W. Hudson54241132001-12-07 15:38:26 +000014079
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080fi
14081
Michael W. Hudson54241132001-12-07 15:38:26 +000014082
14083
14084
14085
14086
14087
Guido van Rossum627b2d71993-12-24 10:39:16 +000014088# checks for system services
14089# (none yet)
14090
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014091# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014092ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014093if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014094
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14097$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014098if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014102LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106/* Override any GCC internal prototype to avoid an error.
14107 Use char because int might match the return type of a GCC
14108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014109#ifdef __cplusplus
14110extern "C"
14111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014112char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014113int
14114main ()
14115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 ;
14118 return 0;
14119}
14120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014123else
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014126rm -f core conftest.err conftest.$ac_objext \
14127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014128LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14131$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014132if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 cat >>confdefs.h <<_ACEOF
14134#define HAVE_LIBIEEE 1
14135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014136
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014137 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014138
Guido van Rossum627b2d71993-12-24 10:39:16 +000014139fi
14140
Michael W. Hudson54241132001-12-07 15:38:26 +000014141
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014142fi
14143
Michael W. Hudson54241132001-12-07 15:38:26 +000014144
Guido van Rossum7f43da71994-08-01 12:15:30 +000014145# check for --with-libm=...
14146
Guido van Rossum563e7081996-09-10 18:20:48 +000014147case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014148Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014149*) LIBM=-lm
14150esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14152$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014155if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014157if test "$withval" = no
14158then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14160$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014161elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014162then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14164$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014165else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014166fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014167else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14169$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
14171
Guido van Rossum7f43da71994-08-01 12:15:30 +000014172
14173# check for --with-libc=...
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14176$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014179if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014181if test "$withval" = no
14182then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14184$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014185elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014186then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14188$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014189else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014190fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14193$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194fi
14195
Guido van Rossum7f43da71994-08-01 12:15:30 +000014196
Stefan Krah1919b7e2012-03-21 18:25:23 +010014197# **************************************
14198# * Check for gcc x64 inline assembler *
14199# **************************************
14200
14201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14202$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14204/* end confdefs.h. */
14205
14206int
14207main ()
14208{
14209
14210 __asm__ __volatile__ ("movq %rcx, %rax");
14211
14212 ;
14213 return 0;
14214}
14215_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014216if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014217 have_gcc_asm_for_x64=yes
14218else
14219 have_gcc_asm_for_x64=no
14220fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014221rm -f core conftest.err conftest.$ac_objext \
14222 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14224$as_echo "$have_gcc_asm_for_x64" >&6; }
14225if test "$have_gcc_asm_for_x64" = yes
14226then
14227
14228$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14229
14230fi
14231
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014232# **************************************************
14233# * Check for various properties of floating point *
14234# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
14237$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014240else
14241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014243 ac_cv_little_endian_double=no
14244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014246/* end confdefs.h. */
14247
14248#include <string.h>
14249int main() {
14250 double x = 9006104071832581.0;
14251 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14252 return 0;
14253 else
14254 return 1;
14255}
14256
14257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014258if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014259 ac_cv_little_endian_double=yes
14260else
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14264 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014265fi
14266
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014267fi
14268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14270$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014271if test "$ac_cv_little_endian_double" = yes
14272then
14273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014275
14276fi
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14279$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014280if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014282else
14283
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014285 ac_cv_big_endian_double=no
14286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014288/* end confdefs.h. */
14289
14290#include <string.h>
14291int main() {
14292 double x = 9006104071832581.0;
14293 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14294 return 0;
14295 else
14296 return 1;
14297}
14298
14299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014300if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301 ac_cv_big_endian_double=yes
14302else
Matthias Kloseb9621712010-04-24 17:59:49 +000014303 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014307fi
14308
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309fi
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14312$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014313if test "$ac_cv_big_endian_double" = yes
14314then
14315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014317
14318fi
14319
14320# Some ARM platforms use a mixed-endian representation for doubles.
14321# While Python doesn't currently have full support for these platforms
14322# (see e.g., issue 1762561), we can at least make sure that float <-> string
14323# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14325$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014326if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328else
14329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014331 ac_cv_mixed_endian_double=no
14332else
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014334/* end confdefs.h. */
14335
14336#include <string.h>
14337int main() {
14338 double x = 9006104071832581.0;
14339 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14340 return 0;
14341 else
14342 return 1;
14343}
14344
14345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014346if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014347 ac_cv_mixed_endian_double=yes
14348else
Matthias Kloseb9621712010-04-24 17:59:49 +000014349 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14352 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014353fi
14354
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014355fi
14356
Matthias Kloseb9621712010-04-24 17:59:49 +000014357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14358$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014359if test "$ac_cv_mixed_endian_double" = yes
14360then
14361
Matthias Kloseb9621712010-04-24 17:59:49 +000014362$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014363
14364fi
14365
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014366# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014367# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014368# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014369# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014370# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014371# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014372
14373# This inline assembler syntax may also work for suncc and icc,
14374# so we try it on all platforms.
14375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14377$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014379/* end confdefs.h. */
14380
14381int
14382main ()
14383{
14384
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014385 unsigned short cw;
14386 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14387 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014388
14389 ;
14390 return 0;
14391}
14392_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014393if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014394 have_gcc_asm_for_x87=yes
14395else
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014397fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014398rm -f core conftest.err conftest.$ac_objext \
14399 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14401$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014402if test "$have_gcc_asm_for_x87" = yes
14403then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014406
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14410$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14412/* end confdefs.h. */
14413
14414int
14415main ()
14416{
14417
14418 unsigned int fpcr;
14419 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14420 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14421
14422 ;
14423 return 0;
14424}
14425_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014426if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014427 have_gcc_asm_for_mc68881=yes
14428else
14429 have_gcc_asm_for_mc68881=no
14430fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014431rm -f core conftest.err conftest.$ac_objext \
14432 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14434$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14435if test "$have_gcc_asm_for_mc68881" = yes
14436then
14437
14438$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14439
14440fi
14441
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014442# Detect whether system arithmetic is subject to x87-style double
14443# rounding issues. The result of this test has little meaning on non
14444# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14445# mode is round-to-nearest and double rounding issues are present, and
14446# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14448$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014449# $BASECFLAGS may affect the result
14450ac_save_cc="$CC"
14451CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014452if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014453 ac_cv_x87_double_rounding=no
14454else
Matthias Kloseb9621712010-04-24 17:59:49 +000014455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014456/* end confdefs.h. */
14457
14458#include <stdlib.h>
14459#include <math.h>
14460int main() {
14461 volatile double x, y, z;
14462 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14463 x = 0.99999999999999989; /* 1-2**-53 */
14464 y = 1./x;
14465 if (y != 1.)
14466 exit(0);
14467 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14468 x = 1e16;
14469 y = 2.99999;
14470 z = x + y;
14471 if (z != 1e16+4.)
14472 exit(0);
14473 /* both tests show evidence of double rounding */
14474 exit(1);
14475}
14476
14477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014478if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014479 ac_cv_x87_double_rounding=no
14480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014485fi
14486
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014487CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14489$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014490if test "$ac_cv_x87_double_rounding" = yes
14491then
14492
Matthias Kloseb9621712010-04-24 17:59:49 +000014493$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014494
14495fi
14496
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014497# ************************************
14498# * Check for mathematical functions *
14499# ************************************
14500
14501LIBS_SAVE=$LIBS
14502LIBS="$LIBS $LIBM"
14503
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014504for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14505do :
14506 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14507ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014508if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014509 cat >>confdefs.h <<_ACEOF
14510#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14511_ACEOF
14512
14513fi
14514done
14515
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014516for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014517do :
14518 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14519ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014520if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014521 cat >>confdefs.h <<_ACEOF
14522#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14523_ACEOF
14524
14525fi
14526done
14527
14528ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14529"
Victor Stinnere0be4232011-10-25 13:06:09 +020014530if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014531 ac_have_decl=1
14532else
14533 ac_have_decl=0
14534fi
14535
14536cat >>confdefs.h <<_ACEOF
14537#define HAVE_DECL_ISINF $ac_have_decl
14538_ACEOF
14539ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14540"
Victor Stinnere0be4232011-10-25 13:06:09 +020014541if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014542 ac_have_decl=1
14543else
14544 ac_have_decl=0
14545fi
14546
14547cat >>confdefs.h <<_ACEOF
14548#define HAVE_DECL_ISNAN $ac_have_decl
14549_ACEOF
14550ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14551"
Victor Stinnere0be4232011-10-25 13:06:09 +020014552if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014553 ac_have_decl=1
14554else
14555 ac_have_decl=0
14556fi
14557
14558cat >>confdefs.h <<_ACEOF
14559#define HAVE_DECL_ISFINITE $ac_have_decl
14560_ACEOF
14561
14562
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014563# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14564# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14566$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014569else
14570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014572 ac_cv_tanh_preserves_zero_sign=no
14573else
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014575/* end confdefs.h. */
14576
14577#include <math.h>
14578#include <stdlib.h>
14579int main() {
14580 /* return 0 if either negative zeros don't exist
14581 on this platform or if negative zeros exist
14582 and tanh(-0.) == -0. */
14583 if (atan2(0., -1.) == atan2(-0., -1.) ||
14584 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14585 else exit(1);
14586}
14587
14588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014589if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014590 ac_cv_tanh_preserves_zero_sign=yes
14591else
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014596fi
14597
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014598fi
14599
Matthias Kloseb9621712010-04-24 17:59:49 +000014600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14601$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014602if test "$ac_cv_tanh_preserves_zero_sign" = yes
14603then
14604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014606
14607fi
14608
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014609if test "$ac_cv_func_log1p" = yes
14610then
14611 # On some versions of AIX, log1p(-0.) returns 0. instead of
14612 # -0. See issue #9920.
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14614$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014615 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014616 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014617else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014618
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014619 if test "$cross_compiling" = yes; then :
14620 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014621else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14623/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014624
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014625 #include <math.h>
14626 #include <stdlib.h>
14627 int main() {
14628 /* Fail if the signs of log1p(-0.) and -0. can be
14629 distinguished. */
14630 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14631 return 0;
14632 else
14633 return 1;
14634 }
14635
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014636_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014637if ac_fn_c_try_run "$LINENO"; then :
14638 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014639else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014640 ac_cv_log1p_drops_zero_sign=yes
14641fi
14642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014644fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014645
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014646fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014647
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14649$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14650fi
14651if test "$ac_cv_log1p_drops_zero_sign" = yes
14652then
14653
14654$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14655
14656fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014657
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014658LIBS=$LIBS_SAVE
14659
Mark Dickinsona614f042009-11-28 12:48:43 +000014660# For multiprocessing module, check that sem_open
14661# actually works. For FreeBSD versions <= 7.2,
14662# the kernel module that provides POSIX semaphores
14663# isn't loaded by default, so an attempt to call
14664# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14666$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014667if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014669else
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014671 ac_cv_posix_semaphores_enabled=yes
14672else
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014674/* end confdefs.h. */
14675
14676#include <unistd.h>
14677#include <fcntl.h>
14678#include <stdio.h>
14679#include <semaphore.h>
14680#include <sys/stat.h>
14681
14682int main(void) {
14683 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14684 if (a == SEM_FAILED) {
14685 perror("sem_open");
14686 return 1;
14687 }
14688 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014689 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014690 return 0;
14691}
14692
14693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014694if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014695 ac_cv_posix_semaphores_enabled=yes
14696else
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014701fi
14702
14703
Mark Dickinsona614f042009-11-28 12:48:43 +000014704fi
14705
Matthias Kloseb9621712010-04-24 17:59:49 +000014706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14707$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014708if test $ac_cv_posix_semaphores_enabled = no
14709then
14710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014712
14713fi
14714
Mark Dickinson10683072009-04-18 21:18:19 +000014715# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14717$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014718if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014722 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014723else
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014725/* end confdefs.h. */
14726
14727#include <unistd.h>
14728#include <fcntl.h>
14729#include <stdio.h>
14730#include <semaphore.h>
14731#include <sys/stat.h>
14732
14733int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014734 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014735 int count;
14736 int res;
14737 if(a==SEM_FAILED){
14738 perror("sem_open");
14739 return 1;
14740
14741 }
14742 res = sem_getvalue(a, &count);
14743 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014744 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014745 return res==-1 ? 1 : 0;
14746}
14747
Mark Dickinson10683072009-04-18 21:18:19 +000014748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014750 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014751else
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014756fi
14757
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014758
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014759fi
14760
Matthias Kloseb9621712010-04-24 17:59:49 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14762$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014763if test $ac_cv_broken_sem_getvalue = yes
14764then
14765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014767
14768fi
14769
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014770ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14771"
14772if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14773 ac_have_decl=1
14774else
14775 ac_have_decl=0
14776fi
14777
14778cat >>confdefs.h <<_ACEOF
14779#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14780_ACEOF
14781ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14782"
14783if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14784 ac_have_decl=1
14785else
14786 ac_have_decl=0
14787fi
14788
14789cat >>confdefs.h <<_ACEOF
14790#define HAVE_DECL_RTLD_NOW $ac_have_decl
14791_ACEOF
14792ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14793"
14794if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14795 ac_have_decl=1
14796else
14797 ac_have_decl=0
14798fi
14799
14800cat >>confdefs.h <<_ACEOF
14801#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14802_ACEOF
14803ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14804"
14805if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14806 ac_have_decl=1
14807else
14808 ac_have_decl=0
14809fi
14810
14811cat >>confdefs.h <<_ACEOF
14812#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14813_ACEOF
14814ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14815"
14816if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14817 ac_have_decl=1
14818else
14819 ac_have_decl=0
14820fi
14821
14822cat >>confdefs.h <<_ACEOF
14823#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14824_ACEOF
14825ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14826"
14827if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14828 ac_have_decl=1
14829else
14830 ac_have_decl=0
14831fi
14832
14833cat >>confdefs.h <<_ACEOF
14834#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14835_ACEOF
14836ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14837"
14838if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14839 ac_have_decl=1
14840else
14841 ac_have_decl=0
14842fi
14843
14844cat >>confdefs.h <<_ACEOF
14845#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14846_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014847ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14848"
14849if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14850 ac_have_decl=1
14851else
14852 ac_have_decl=0
14853fi
14854
14855cat >>confdefs.h <<_ACEOF
14856#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14857_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014858
14859
Mark Dickinsonbd792642009-03-18 20:06:12 +000014860# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14862$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014863# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014864if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014865 enableval=$enable_big_digits; case $enable_big_digits in
14866yes)
14867 enable_big_digits=30 ;;
14868no)
14869 enable_big_digits=15 ;;
1487015|30)
14871 ;;
14872*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014873 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 +000014874esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14876$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014877
14878cat >>confdefs.h <<_ACEOF
14879#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14880_ACEOF
14881
14882
14883else
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14885$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014886fi
14887
14888
Guido van Rossumef2255b2000-03-10 22:30:29 +000014889# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014890ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014891if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
14893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014895
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014896 wchar_h="yes"
14897
Guido van Rossumef2255b2000-03-10 22:30:29 +000014898else
Martin v. Löwis11437992002-04-12 09:54:03 +000014899 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014900
14901fi
14902
Michael W. Hudson54241132001-12-07 15:38:26 +000014903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014905# determine wchar_t size
14906if test "$wchar_h" = yes
14907then
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14911# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14913$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014914if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014916else
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14918"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Martin v. Löwis11437992002-04-12 09:54:03 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 if test "$ac_cv_type_wchar_t" = yes; then
14922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014924as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014925See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926 else
14927 ac_cv_sizeof_wchar_t=0
14928 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014930
Martin v. Löwis11437992002-04-12 09:54:03 +000014931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14933$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934
14935
14936
Martin v. Löwis11437992002-04-12 09:54:03 +000014937cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014938#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014939_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014940
Michael W. Hudson54241132001-12-07 15:38:26 +000014941
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014942fi
14943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14945$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014946have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014949
14950#include <tcl.h>
14951#if TCL_UTF_MAX != 6
14952# error "NOT UCS4_TCL"
14953#endif
14954int
14955main ()
14956{
14957
14958 ;
14959 return 0;
14960}
14961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014963
14964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014966
14967 have_ucs4_tcl=yes
14968
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14972$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014973
Skip Montanaro6dead952003-09-25 14:50:04 +000014974# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014975if test "$wchar_h" = yes
14976then
14977 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14979$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014980 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014981 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014982else
14983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014985 ac_cv_wchar_t_signed=yes
14986else
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014989
14990 #include <wchar.h>
14991 int main()
14992 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014993 /* Success: exit code 0 */
14994 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014995 }
14996
14997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014998if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014999 ac_cv_wchar_t_signed=yes
15000else
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015005fi
15006
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000015007fi
15008
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
15010$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011fi
15012
Miss Islington (bot)4973f762018-08-24 12:36:30 -040015013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
15014$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015015# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020015016if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000015017 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000015018then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019
Matthias Kloseb9621712010-04-24 17:59:49 +000015020$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015021
Miss Islington (bot)4973f762018-08-24 12:36:30 -040015022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15023$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000015024else
Miss Islington (bot)4973f762018-08-24 12:36:30 -040015025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15026$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015027fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015028
15029# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15031$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015032if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015034else
Matthias Kloseb9621712010-04-24 17:59:49 +000015035 ac_cv_c_bigendian=unknown
15036 # See if we're dealing with a universal compiler.
15037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15038/* end confdefs.h. */
15039#ifndef __APPLE_CC__
15040 not a universal capable compiler
15041 #endif
15042 typedef int dummy;
15043
Skip Montanaro6dead952003-09-25 14:50:04 +000015044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_compile "$LINENO"; then :
15046
15047 # Check for potential -arch flags. It is not universal unless
15048 # there are at least two -arch flags with different values.
15049 ac_arch=
15050 ac_prev=
15051 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15052 if test -n "$ac_prev"; then
15053 case $ac_word in
15054 i?86 | x86_64 | ppc | ppc64)
15055 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15056 ac_arch=$ac_word
15057 else
15058 ac_cv_c_bigendian=universal
15059 break
15060 fi
15061 ;;
15062 esac
15063 ac_prev=
15064 elif test "x$ac_word" = "x-arch"; then
15065 ac_prev=arch
15066 fi
15067 done
15068fi
15069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15070 if test $ac_cv_c_bigendian = unknown; then
15071 # See if sys/param.h defines the BYTE_ORDER macro.
15072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015073/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015074#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015076
Martin v. Löwis11437992002-04-12 09:54:03 +000015077int
15078main ()
15079{
Matthias Kloseb9621712010-04-24 17:59:49 +000015080#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15081 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15082 && LITTLE_ENDIAN)
15083 bogus endian macros
15084 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015085
15086 ;
15087 return 0;
15088}
15089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015090if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015091 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015093/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096
Martin v. Löwis11437992002-04-12 09:54:03 +000015097int
15098main ()
15099{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015100#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 not big endian
15102 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
15104 ;
15105 return 0;
15106}
15107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015109 ac_cv_c_bigendian=yes
15110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000015114fi
15115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15116 fi
15117 if test $ac_cv_c_bigendian = unknown; then
15118 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015120/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015121#include <limits.h>
15122
Martin v. Löwis11437992002-04-12 09:54:03 +000015123int
15124main ()
15125{
Matthias Kloseb9621712010-04-24 17:59:49 +000015126#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15127 bogus endian macros
15128 #endif
15129
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ;
15131 return 0;
15132}
15133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015134if ac_fn_c_try_compile "$LINENO"; then :
15135 # It does; now see whether it defined to _BIG_ENDIAN or not.
15136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15137/* end confdefs.h. */
15138#include <limits.h>
15139
15140int
15141main ()
15142{
15143#ifndef _BIG_ENDIAN
15144 not big endian
15145 #endif
15146
15147 ;
15148 return 0;
15149}
15150_ACEOF
15151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015153else
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15157fi
15158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15159 fi
15160 if test $ac_cv_c_bigendian = unknown; then
15161 # Compile a test program.
15162 if test "$cross_compiling" = yes; then :
15163 # Try to guess by grepping values from an object file.
15164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15165/* end confdefs.h. */
15166short int ascii_mm[] =
15167 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15168 short int ascii_ii[] =
15169 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15170 int use_ascii (int i) {
15171 return ascii_mm[i] + ascii_ii[i];
15172 }
15173 short int ebcdic_ii[] =
15174 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15175 short int ebcdic_mm[] =
15176 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15177 int use_ebcdic (int i) {
15178 return ebcdic_mm[i] + ebcdic_ii[i];
15179 }
15180 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182int
15183main ()
15184{
15185return use_ascii (foo) == use_ebcdic (foo);
15186 ;
15187 return 0;
15188}
15189_ACEOF
15190if ac_fn_c_try_compile "$LINENO"; then :
15191 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15192 ac_cv_c_bigendian=yes
15193 fi
15194 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15195 if test "$ac_cv_c_bigendian" = unknown; then
15196 ac_cv_c_bigendian=no
15197 else
15198 # finding both strings is unlikely to happen, but who knows?
15199 ac_cv_c_bigendian=unknown
15200 fi
15201 fi
15202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015204else
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015206/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015208int
15209main ()
15210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 /* Are we little or big endian? From Harbison&Steele. */
15213 union
15214 {
15215 long int l;
15216 char c[sizeof (long int)];
15217 } u;
15218 u.l = 1;
15219 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220
15221 ;
15222 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015223}
Martin v. Löwis11437992002-04-12 09:54:03 +000015224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015225if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015226 ac_cv_c_bigendian=no
15227else
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15237$as_echo "$ac_cv_c_bigendian" >&6; }
15238 case $ac_cv_c_bigendian in #(
15239 yes)
15240 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15241;; #(
15242 no)
15243 ;; #(
15244 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 ;; #(
15249 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015250 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015251 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015253
Michael W. Hudson54241132001-12-07 15:38:26 +000015254
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015255# ABI version string for Python extension modules. This appears between the
15256# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15257# from the following attributes which affect the ABI of this Python build (in
15258# this order):
15259#
15260# * The Python implementation (always 'cpython-' for us)
15261# * The major and minor version numbers
15262# * --with-pydebug (adds a 'd')
15263# * --with-pymalloc (adds a 'm')
15264# * --with-wide-unicode (adds a 'u')
15265#
15266# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015267# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15268# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015269
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15271$as_echo_n "checking ABIFLAGS... " >&6; }
15272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15273$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15275$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015276SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15278$as_echo "$SOABI" >&6; }
15279
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015280
15281case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015282 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015283 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15284 *)
15285 EXT_SUFFIX=${SHLIB_SUFFIX};;
15286esac
15287
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15289$as_echo_n "checking LDVERSION... " >&6; }
15290LDVERSION='$(VERSION)$(ABIFLAGS)'
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15292$as_echo "$LDVERSION" >&6; }
15293
doko@python.org87421192013-01-26 11:39:31 +010015294
doko@ubuntu.com55532312016-06-14 08:55:19 +020015295if test x$PLATFORM_TRIPLET = x; then
15296 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15297else
15298 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15299fi
doko@python.org87421192013-01-26 11:39:31 +010015300
15301
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015302# Check whether right shifting a negative integer extends the sign bit
15303# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15305$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015306if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015308else
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015311 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015314/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015315
15316int main()
15317{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015318 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015319}
15320
Martin v. Löwis11437992002-04-12 09:54:03 +000015321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015323 ac_cv_rshift_extends_sign=yes
15324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015329fi
15330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015331fi
15332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15334$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015335if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015336then
Martin v. Löwis11437992002-04-12 09:54:03 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015339
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015340fi
15341
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015342# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15344$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015345if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015347else
Martin v. Löwis11437992002-04-12 09:54:03 +000015348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015350/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015351#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015352int
15353main ()
15354{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015355
15356 FILE *f = fopen("/dev/null", "r");
15357 flockfile(f);
15358 getc_unlocked(f);
15359 funlockfile(f);
15360
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 ;
15362 return 0;
15363}
15364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015365if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015366 ac_cv_have_getc_unlocked=yes
15367else
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 ac_cv_have_getc_unlocked=no
15369fi
15370rm -f core conftest.err conftest.$ac_objext \
15371 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373
Matthias Kloseb9621712010-04-24 17:59:49 +000015374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15375$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015376if test "$ac_cv_have_getc_unlocked" = yes
15377then
Martin v. Löwis11437992002-04-12 09:54:03 +000015378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015380
15381fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015382
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015383# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015384# save the value of LIBS so we don't actually link Python with readline
15385LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015386
Gregory P. Smith18820942008-09-07 06:24:49 +000015387# On some systems we need to link readline to a termcap compatible
15388# library. NOTE: Keep the precedence of listed libraries synchronised
15389# with setup.py.
15390py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15392$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015393for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015394 if test -z "$py_libtermcap"; then
15395 READLINE_LIBS="-lreadline"
15396 else
15397 READLINE_LIBS="-lreadline -l$py_libtermcap"
15398 fi
15399 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015401/* end confdefs.h. */
15402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403/* Override any GCC internal prototype to avoid an error.
15404 Use char because int might match the return type of a GCC
15405 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015406#ifdef __cplusplus
15407extern "C"
15408#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015409char readline ();
15410int
15411main ()
15412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015414 ;
15415 return 0;
15416}
15417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015418if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015419 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015421rm -f core conftest.err conftest.$ac_objext \
15422 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015423 if test $py_cv_lib_readline = yes; then
15424 break
15425 fi
15426done
15427# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15428#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015429if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15431$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015432else
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15434$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015435
Matthias Kloseb9621712010-04-24 17:59:49 +000015436$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015437
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015438fi
15439
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015440# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015442/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015443#include <readline/readline.h>
15444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015445if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015446 have_readline=yes
15447else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015448 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015449
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015450fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015451rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015452if test $have_readline = yes
15453then
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015455/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015456#include <readline/readline.h>
15457
15458_ACEOF
15459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015463
15464fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015465rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015468/* end confdefs.h. */
15469#include <readline/readline.h>
15470
15471_ACEOF
15472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015474
Matthias Kloseb9621712010-04-24 17:59:49 +000015475$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015476
15477fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015478rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015479
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015480fi
15481
Martin v. Löwis0daad592001-09-30 21:09:59 +000015482# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15484$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015485if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015487else
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015489LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493/* Override any GCC internal prototype to avoid an error.
15494 Use char because int might match the return type of a GCC
15495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015496#ifdef __cplusplus
15497extern "C"
15498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015499char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015500int
15501main ()
15502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015503return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 ;
15505 return 0;
15506}
15507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015510else
Matthias Kloseb9621712010-04-24 17:59:49 +000015511 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015513rm -f core conftest.err conftest.$ac_objext \
15514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015515LIBS=$ac_check_lib_save_LIBS
15516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15518$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015519if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015520
Matthias Kloseb9621712010-04-24 17:59:49 +000015521$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015522
Martin v. Löwis0daad592001-09-30 21:09:59 +000015523fi
15524
Michael W. Hudson54241132001-12-07 15:38:26 +000015525
Thomas Wouters89d996e2007-09-08 17:39:28 +000015526# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15528$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015531else
15532 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015533LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015535/* end confdefs.h. */
15536
15537/* Override any GCC internal prototype to avoid an error.
15538 Use char because int might match the return type of a GCC
15539 builtin and then its argument prototype would still apply. */
15540#ifdef __cplusplus
15541extern "C"
15542#endif
15543char rl_completion_display_matches_hook ();
15544int
15545main ()
15546{
15547return rl_completion_display_matches_hook ();
15548 ;
15549 return 0;
15550}
15551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015552if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015553 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015557rm -f core conftest.err conftest.$ac_objext \
15558 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015559LIBS=$ac_check_lib_save_LIBS
15560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15562$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015563if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015566
15567fi
15568
15569
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015570# also in 4.0, but not in editline
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15572$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15573if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15574 $as_echo_n "(cached) " >&6
15575else
15576 ac_check_lib_save_LIBS=$LIBS
15577LIBS="-lreadline $READLINE_LIBS $LIBS"
15578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15579/* end confdefs.h. */
15580
15581/* Override any GCC internal prototype to avoid an error.
15582 Use char because int might match the return type of a GCC
15583 builtin and then its argument prototype would still apply. */
15584#ifdef __cplusplus
15585extern "C"
15586#endif
15587char rl_resize_terminal ();
15588int
15589main ()
15590{
15591return rl_resize_terminal ();
15592 ;
15593 return 0;
15594}
15595_ACEOF
15596if ac_fn_c_try_link "$LINENO"; then :
15597 ac_cv_lib_readline_rl_resize_terminal=yes
15598else
15599 ac_cv_lib_readline_rl_resize_terminal=no
15600fi
15601rm -f core conftest.err conftest.$ac_objext \
15602 conftest$ac_exeext conftest.$ac_ext
15603LIBS=$ac_check_lib_save_LIBS
15604fi
15605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15606$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15607if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15608
15609$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15610
15611fi
15612
15613
Martin v. Löwis0daad592001-09-30 21:09:59 +000015614# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15616$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015617if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015619else
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015621LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625/* Override any GCC internal prototype to avoid an error.
15626 Use char because int might match the return type of a GCC
15627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015628#ifdef __cplusplus
15629extern "C"
15630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015631char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015632int
15633main ()
15634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015636 ;
15637 return 0;
15638}
15639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015642else
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015645rm -f core conftest.err conftest.$ac_objext \
15646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015647LIBS=$ac_check_lib_save_LIBS
15648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15650$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015652
Matthias Kloseb9621712010-04-24 17:59:49 +000015653$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015654
Guido van Rossum353ae582001-07-10 16:45:32 +000015655fi
15656
Jack Jansendd19cf82001-12-06 22:36:17 +000015657
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015658# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015660/* end confdefs.h. */
15661#include <readline/readline.h>
15662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015663if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015664 have_readline=yes
15665else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015666 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015667
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015668fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015669rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015670if test $have_readline = yes
15671then
Matthias Kloseb9621712010-04-24 17:59:49 +000015672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015673/* end confdefs.h. */
15674#include <readline/readline.h>
15675
15676_ACEOF
15677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015681
15682fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015683rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015684
15685fi
15686
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15688$as_echo_n "checking for append_history in -lreadline... " >&6; }
15689if ${ac_cv_lib_readline_append_history+:} false; then :
15690 $as_echo_n "(cached) " >&6
15691else
15692 ac_check_lib_save_LIBS=$LIBS
15693LIBS="-lreadline $READLINE_LIBS $LIBS"
15694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15695/* end confdefs.h. */
15696
15697/* Override any GCC internal prototype to avoid an error.
15698 Use char because int might match the return type of a GCC
15699 builtin and then its argument prototype would still apply. */
15700#ifdef __cplusplus
15701extern "C"
15702#endif
15703char append_history ();
15704int
15705main ()
15706{
15707return append_history ();
15708 ;
15709 return 0;
15710}
15711_ACEOF
15712if ac_fn_c_try_link "$LINENO"; then :
15713 ac_cv_lib_readline_append_history=yes
15714else
15715 ac_cv_lib_readline_append_history=no
15716fi
15717rm -f core conftest.err conftest.$ac_objext \
15718 conftest$ac_exeext conftest.$ac_ext
15719LIBS=$ac_check_lib_save_LIBS
15720fi
15721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15722$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15723if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15724
15725$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15726
15727fi
15728
15729
Martin v. Löwis82bca632006-02-10 20:49:30 +000015730# End of readline checks: restore LIBS
15731LIBS=$LIBS_no_readline
15732
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15734$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015735if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015737else
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015740 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015741else
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015743/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015744
15745int main()
15746{
15747 int val1 = nice(1);
15748 if (val1 != -1 && val1 == nice(2))
15749 exit(0);
15750 exit(1);
15751}
15752
Martin v. Löwis11437992002-04-12 09:54:03 +000015753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015754if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015755 ac_cv_broken_nice=yes
15756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015761fi
15762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763fi
15764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15766$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015767if test "$ac_cv_broken_nice" = yes
15768then
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
Matthias Kloseb9621712010-04-24 17:59:49 +000015770$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015771
15772fi
15773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15775$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015776if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015778else
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015780 ac_cv_broken_poll=no
15781else
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015783/* end confdefs.h. */
15784
15785#include <poll.h>
15786
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015787int main()
15788{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015789 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015790 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015791
15792 close (42);
15793
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015794 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015795 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015796 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015797 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015798 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015799 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015800 return 1;
15801}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015802
15803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015804if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015805 ac_cv_broken_poll=yes
15806else
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015813fi
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15816$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015817if test "$ac_cv_broken_poll" = yes
15818then
15819
Matthias Kloseb9621712010-04-24 17:59:49 +000015820$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015821
15822fi
15823
Martin v. Löwis1d459062005-03-14 21:23:33 +000015824# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15826$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015827if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015829else
15830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015832 ac_cv_working_tzset=no
15833else
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015836
15837#include <stdlib.h>
15838#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015839#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015840
15841#if HAVE_TZNAME
15842extern char *tzname[];
15843#endif
15844
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015845int main()
15846{
Brett Cannon18367812003-09-19 00:59:16 +000015847 /* Note that we need to ensure that not only does tzset(3)
15848 do 'something' with localtime, but it works as documented
15849 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015850 This includes making sure that tzname is set properly if
15851 tm->tm_zone does not exist since it is the alternative way
15852 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015853
15854 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015855 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015856 */
15857
Martin v. Löwis1d459062005-03-14 21:23:33 +000015858 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015859 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15860
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015861 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015862 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015863 if (localtime(&groundhogday)->tm_hour != 0)
15864 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015865#if HAVE_TZNAME
15866 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15867 if (strcmp(tzname[0], "UTC") ||
15868 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15869 exit(1);
15870#endif
Brett Cannon18367812003-09-19 00:59:16 +000015871
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015872 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015873 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015874 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015875 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015876#if HAVE_TZNAME
15877 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15878 exit(1);
15879#endif
Brett Cannon18367812003-09-19 00:59:16 +000015880
15881 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15882 tzset();
15883 if (localtime(&groundhogday)->tm_hour != 11)
15884 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015885#if HAVE_TZNAME
15886 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15887 exit(1);
15888#endif
15889
15890#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015891 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15892 exit(1);
15893 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15894 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015895#endif
Brett Cannon18367812003-09-19 00:59:16 +000015896
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015897 exit(0);
15898}
15899
15900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015901if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015902 ac_cv_working_tzset=yes
15903else
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015908fi
15909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015910fi
15911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15913$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015914if test "$ac_cv_working_tzset" = yes
15915then
15916
Matthias Kloseb9621712010-04-24 17:59:49 +000015917$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015918
15919fi
15920
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015921# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15923$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015924if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015925 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015926else
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015928/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015929#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015930int
15931main ()
15932{
15933
15934struct stat st;
15935st.st_mtim.tv_nsec = 1;
15936
15937 ;
15938 return 0;
15939}
15940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015942 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015943else
Matthias Kloseb9621712010-04-24 17:59:49 +000015944 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15947fi
15948
Matthias Kloseb9621712010-04-24 17:59:49 +000015949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15950$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015951if test "$ac_cv_stat_tv_nsec" = yes
15952then
15953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015955
15956fi
15957
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015958# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15960$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015961if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015962 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015963else
Matthias Kloseb9621712010-04-24 17:59:49 +000015964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015965/* end confdefs.h. */
15966#include <sys/stat.h>
15967int
15968main ()
15969{
15970
15971struct stat st;
15972st.st_mtimespec.tv_nsec = 1;
15973
15974 ;
15975 return 0;
15976}
15977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015979 ac_cv_stat_tv_nsec2=yes
15980else
Matthias Kloseb9621712010-04-24 17:59:49 +000015981 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15984fi
15985
Matthias Kloseb9621712010-04-24 17:59:49 +000015986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15987$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015988if test "$ac_cv_stat_tv_nsec2" = yes
15989then
15990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015992
15993fi
15994
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015995# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015996ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015997if test "$cross_compiling" = no; then
15998 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15999fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020016000
16001for ac_header in curses.h ncurses.h
16002do :
16003 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16004ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16006 cat >>confdefs.h <<_ACEOF
16007#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16008_ACEOF
16009
16010fi
16011
16012done
16013
16014
16015# On Solaris, term.h requires curses.h
16016for ac_header in term.h
16017do :
16018 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
16019#ifdef HAVE_CURSES_H
16020#include <curses.h>
16021#endif
16022
16023"
16024if test "x$ac_cv_header_term_h" = xyes; then :
16025 cat >>confdefs.h <<_ACEOF
16026#define HAVE_TERM_H 1
16027_ACEOF
16028
16029fi
16030
16031done
16032
16033
Jack Jansen666b1e72001-10-31 12:11:48 +000016034# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000016035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
16036$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016037if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016038 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016039else
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016041/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000016042#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016043int
16044main ()
16045{
Jack Jansen666b1e72001-10-31 12:11:48 +000016046
16047 int rtn;
16048 rtn = mvwdelch(0,0,0);
16049
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ;
16051 return 0;
16052}
16053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016054if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016055 ac_cv_mvwdelch_is_expression=yes
16056else
Matthias Kloseb9621712010-04-24 17:59:49 +000016057 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16060fi
16061
Matthias Kloseb9621712010-04-24 17:59:49 +000016062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
16063$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000016064
16065if test "$ac_cv_mvwdelch_is_expression" = yes
16066then
Martin v. Löwis11437992002-04-12 09:54:03 +000016067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016069
16070fi
16071
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016072# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
16073# structs since version 5.7. If the macro is defined as zero before including
16074# [n]curses.h, ncurses will expose fields of the structs regardless of the
16075# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000016076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
16077$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016078if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016080else
Matthias Kloseb9621712010-04-24 17:59:49 +000016081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016082/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016083
16084 #define NCURSES_OPAQUE 0
16085 #include <curses.h>
16086
Martin v. Löwis11437992002-04-12 09:54:03 +000016087int
16088main ()
16089{
Jack Jansen666b1e72001-10-31 12:11:48 +000016090
16091 WINDOW *w;
16092 w->_flags = 0;
16093
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 ;
16095 return 0;
16096}
16097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016098if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000016099 ac_cv_window_has_flags=yes
16100else
Matthias Kloseb9621712010-04-24 17:59:49 +000016101 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16104fi
16105
Matthias Kloseb9621712010-04-24 17:59:49 +000016106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
16107$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016108
Jack Jansen666b1e72001-10-31 12:11:48 +000016109
16110if test "$ac_cv_window_has_flags" = yes
16111then
Martin v. Löwis11437992002-04-12 09:54:03 +000016112
Matthias Kloseb9621712010-04-24 17:59:49 +000016113$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000016114
16115fi
16116
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090016117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
16118$as_echo_n "checking for is_pad... " >&6; }
16119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120/* end confdefs.h. */
16121#include <curses.h>
16122int
16123main ()
16124{
16125
16126#ifndef is_pad
16127void *x=is_pad
16128#endif
16129
16130 ;
16131 return 0;
16132}
16133_ACEOF
16134if ac_fn_c_try_compile "$LINENO"; then :
16135
16136$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16137
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16139$as_echo "yes" >&6; }
16140else
16141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16142$as_echo "no" >&6; }
16143
16144fi
16145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16148$as_echo_n "checking for is_term_resized... " >&6; }
16149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016150/* end confdefs.h. */
16151#include <curses.h>
16152int
16153main ()
16154{
16155void *x=is_term_resized
16156 ;
16157 return 0;
16158}
16159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016161
Matthias Kloseb9621712010-04-24 17:59:49 +000016162$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016163
Matthias Kloseb159a552010-04-25 21:00:44 +000016164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016165$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016166else
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16168$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016169
16170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16172
Matthias Kloseb9621712010-04-24 17:59:49 +000016173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16174$as_echo_n "checking for resize_term... " >&6; }
16175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016176/* end confdefs.h. */
16177#include <curses.h>
16178int
16179main ()
16180{
16181void *x=resize_term
16182 ;
16183 return 0;
16184}
16185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016186if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016187
Matthias Kloseb9621712010-04-24 17:59:49 +000016188$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016189
Matthias Kloseb159a552010-04-25 21:00:44 +000016190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016191$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016192else
Matthias Kloseb9621712010-04-24 17:59:49 +000016193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16194$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016195
16196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16198
Matthias Kloseb9621712010-04-24 17:59:49 +000016199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16200$as_echo_n "checking for resizeterm... " >&6; }
16201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016202/* end confdefs.h. */
16203#include <curses.h>
16204int
16205main ()
16206{
16207void *x=resizeterm
16208 ;
16209 return 0;
16210}
16211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016213
Matthias Kloseb9621712010-04-24 17:59:49 +000016214$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016215
Matthias Kloseb159a552010-04-25 21:00:44 +000016216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016217$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016218else
Matthias Kloseb9621712010-04-24 17:59:49 +000016219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16220$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016221
16222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016224
16225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16226$as_echo_n "checking for immedok... " >&6; }
16227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16228/* end confdefs.h. */
16229#include <curses.h>
16230int
16231main ()
16232{
16233
16234#ifndef immedok
16235void *x=immedok
16236#endif
16237
16238 ;
16239 return 0;
16240}
16241_ACEOF
16242if ac_fn_c_try_compile "$LINENO"; then :
16243
16244$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16245
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16247$as_echo "yes" >&6; }
16248else
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16250$as_echo "no" >&6; }
16251
16252fi
16253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16254
16255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16256$as_echo_n "checking for syncok... " >&6; }
16257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258/* end confdefs.h. */
16259#include <curses.h>
16260int
16261main ()
16262{
16263
16264#ifndef syncok
16265void *x=syncok
16266#endif
16267
16268 ;
16269 return 0;
16270}
16271_ACEOF
16272if ac_fn_c_try_compile "$LINENO"; then :
16273
16274$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16275
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16277$as_echo "yes" >&6; }
16278else
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16280$as_echo "no" >&6; }
16281
16282fi
16283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16284
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16286$as_echo_n "checking for wchgat... " >&6; }
16287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16288/* end confdefs.h. */
16289#include <curses.h>
16290int
16291main ()
16292{
16293
16294#ifndef wchgat
16295void *x=wchgat
16296#endif
16297
16298 ;
16299 return 0;
16300}
16301_ACEOF
16302if ac_fn_c_try_compile "$LINENO"; then :
16303
16304$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16305
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16307$as_echo "yes" >&6; }
16308else
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16310$as_echo "no" >&6; }
16311
16312fi
16313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16314
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16316$as_echo_n "checking for filter... " >&6; }
16317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16318/* end confdefs.h. */
16319#include <curses.h>
16320int
16321main ()
16322{
16323
16324#ifndef filter
16325void *x=filter
16326#endif
16327
16328 ;
16329 return 0;
16330}
16331_ACEOF
16332if ac_fn_c_try_compile "$LINENO"; then :
16333
16334$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16335
16336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16337$as_echo "yes" >&6; }
16338else
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16340$as_echo "no" >&6; }
16341
16342fi
16343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16344
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16346$as_echo_n "checking for has_key... " >&6; }
16347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16348/* end confdefs.h. */
16349#include <curses.h>
16350int
16351main ()
16352{
16353
16354#ifndef has_key
16355void *x=has_key
16356#endif
16357
16358 ;
16359 return 0;
16360}
16361_ACEOF
16362if ac_fn_c_try_compile "$LINENO"; then :
16363
16364$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16365
16366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16367$as_echo "yes" >&6; }
16368else
16369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16370$as_echo "no" >&6; }
16371
16372fi
16373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16374
16375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16376$as_echo_n "checking for typeahead... " >&6; }
16377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378/* end confdefs.h. */
16379#include <curses.h>
16380int
16381main ()
16382{
16383
16384#ifndef typeahead
16385void *x=typeahead
16386#endif
16387
16388 ;
16389 return 0;
16390}
16391_ACEOF
16392if ac_fn_c_try_compile "$LINENO"; then :
16393
16394$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16395
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16397$as_echo "yes" >&6; }
16398else
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16400$as_echo "no" >&6; }
16401
16402fi
16403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16404
16405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16406$as_echo_n "checking for use_env... " >&6; }
16407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16408/* end confdefs.h. */
16409#include <curses.h>
16410int
16411main ()
16412{
16413
16414#ifndef use_env
16415void *x=use_env
16416#endif
16417
16418 ;
16419 return 0;
16420}
16421_ACEOF
16422if ac_fn_c_try_compile "$LINENO"; then :
16423
16424$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16425
16426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16427$as_echo "yes" >&6; }
16428else
16429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16430$as_echo "no" >&6; }
16431
16432fi
16433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016434# last curses configure check
16435CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16438$as_echo "$as_me: checking for device files" >&6;}
16439
16440if test "x$cross_compiling" = xyes; then
16441 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16443$as_echo_n "checking for /dev/ptmx... " >&6; }
16444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16445$as_echo "not set" >&6; }
16446 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16447 fi
16448 if test "${ac_cv_file__dev_ptc+set}" != set; then
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16450$as_echo_n "checking for /dev/ptc... " >&6; }
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16452$as_echo "not set" >&6; }
16453 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16454 fi
16455fi
16456
Matthias Kloseb9621712010-04-24 17:59:49 +000016457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16458$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016459if ${ac_cv_file__dev_ptmx+:} false; then :
16460 $as_echo_n "(cached) " >&6
16461else
16462 test "$cross_compiling" = yes &&
16463 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16464if test -r "/dev/ptmx"; then
16465 ac_cv_file__dev_ptmx=yes
16466else
16467 ac_cv_file__dev_ptmx=no
16468fi
16469fi
16470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16471$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16472if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016473
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016474fi
16475
16476if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016477
Matthias Kloseb9621712010-04-24 17:59:49 +000016478$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016479
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16482$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016483if ${ac_cv_file__dev_ptc+:} false; then :
16484 $as_echo_n "(cached) " >&6
16485else
16486 test "$cross_compiling" = yes &&
16487 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16488if test -r "/dev/ptc"; then
16489 ac_cv_file__dev_ptc=yes
16490else
16491 ac_cv_file__dev_ptc=no
16492fi
16493fi
16494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16495$as_echo "$ac_cv_file__dev_ptc" >&6; }
16496if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016497
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016498fi
16499
16500if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016501
Matthias Kloseb9621712010-04-24 17:59:49 +000016502$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016503
Neal Norwitz865400f2003-03-21 01:42:58 +000016504fi
16505
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016506if test $ac_sys_system = Darwin
16507then
16508 LIBS="$LIBS -framework CoreFoundation"
16509fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016510
Matthias Kloseb9621712010-04-24 17:59:49 +000016511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16512$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016513if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016514 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016515else
Matthias Kloseb9621712010-04-24 17:59:49 +000016516 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016517 ac_cv_have_size_t_format="cross -- assuming yes"
16518
Thomas Wouters477c8d52006-05-27 19:21:47 +000016519else
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016521/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016522
Thomas Wouters477c8d52006-05-27 19:21:47 +000016523#include <stdio.h>
16524#include <stddef.h>
16525#include <string.h>
16526
Christian Heimes2c181612007-12-17 20:04:13 +000016527#ifdef HAVE_SYS_TYPES_H
16528#include <sys/types.h>
16529#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016530
16531#ifdef HAVE_SSIZE_T
16532typedef ssize_t Py_ssize_t;
16533#elif SIZEOF_VOID_P == SIZEOF_LONG
16534typedef long Py_ssize_t;
16535#else
16536typedef int Py_ssize_t;
16537#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016538
Christian Heimes2c181612007-12-17 20:04:13 +000016539int main()
16540{
16541 char buffer[256];
16542
Thomas Wouters477c8d52006-05-27 19:21:47 +000016543 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16544 return 1;
16545
Thomas Wouters89f507f2006-12-13 04:49:30 +000016546 if (strcmp(buffer, "123"))
16547 return 1;
16548
16549 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16550 return 1;
16551
16552 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016553 return 1;
16554
16555 return 0;
16556}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016557
Thomas Wouters477c8d52006-05-27 19:21:47 +000016558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016559if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016560 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016561else
Matthias Kloseb9621712010-04-24 17:59:49 +000016562 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016566fi
16567
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16570$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016571if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016572
Matthias Kloseb9621712010-04-24 17:59:49 +000016573$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016574
16575fi
16576
Matthias Kloseb9621712010-04-24 17:59:49 +000016577ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016578#ifdef HAVE_SYS_TYPES_H
16579#include <sys/types.h>
16580#endif
16581#ifdef HAVE_SYS_SOCKET_H
16582#include <sys/socket.h>
16583#endif
16584
Matthias Kloseb9621712010-04-24 17:59:49 +000016585"
Victor Stinnere0be4232011-10-25 13:06:09 +020016586if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016587
Martin v. Löwis11437992002-04-12 09:54:03 +000016588else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016589
Matthias Kloseb9621712010-04-24 17:59:49 +000016590$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016591
16592fi
16593
Michael W. Hudson54241132001-12-07 15:38:26 +000016594
Matthias Kloseb9621712010-04-24 17:59:49 +000016595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16596$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016597if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016598 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016599else
Matthias Kloseb9621712010-04-24 17:59:49 +000016600 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016601 ac_cv_broken_mbstowcs=no
16602else
Matthias Kloseb9621712010-04-24 17:59:49 +000016603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016604/* end confdefs.h. */
16605
Stefan Krah19c21392012-11-22 23:47:32 +010016606#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016607#include<stdlib.h>
16608int main() {
16609 size_t len = -1;
16610 const char *str = "text";
16611 len = mbstowcs(NULL, str, 0);
16612 return (len != 4);
16613}
16614
16615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016616if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016617 ac_cv_broken_mbstowcs=no
16618else
Matthias Kloseb9621712010-04-24 17:59:49 +000016619 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016623fi
16624
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016625fi
16626
Matthias Kloseb9621712010-04-24 17:59:49 +000016627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16628$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016629if test "$ac_cv_broken_mbstowcs" = yes
16630then
16631
Matthias Kloseb9621712010-04-24 17:59:49 +000016632$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016633
16634fi
16635
Antoine Pitroub52ec782009-01-25 16:34:23 +000016636# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16638$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016639
16640# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016641if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016642 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016643if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016644then
16645
Matthias Kloseb9621712010-04-24 17:59:49 +000016646$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016647
Matthias Kloseb9621712010-04-24 17:59:49 +000016648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16649$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016650fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016651if test "$withval" = no
16652then
16653
16654$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16655
Matthias Kloseb9621712010-04-24 17:59:49 +000016656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16657$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016658fi
16659
Antoine Pitrou042b1282010-08-13 21:15:58 +000016660else
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16662$as_echo "no value specified" >&6; }
16663fi
16664
Antoine Pitroub52ec782009-01-25 16:34:23 +000016665
Matthias Kloseb17289e2012-03-15 19:51:34 +010016666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16667$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16668if ${ac_cv_computed_gotos+:} false; then :
16669 $as_echo_n "(cached) " >&6
16670else
16671 if test "$cross_compiling" = yes; then :
16672 if test "${with_computed_gotos+set}" = set; then
16673 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16674 else
16675 ac_cv_computed_gotos=no
16676 fi
16677else
16678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16679/* end confdefs.h. */
16680
16681int main(int argc, char **argv)
16682{
16683 static void *targets[1] = { &&LABEL1 };
16684 goto LABEL2;
16685LABEL1:
16686 return 0;
16687LABEL2:
16688 goto *targets[0];
16689 return 1;
16690}
16691
16692_ACEOF
16693if ac_fn_c_try_run "$LINENO"; then :
16694 ac_cv_computed_gotos=yes
16695else
16696 ac_cv_computed_gotos=no
16697fi
16698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16699 conftest.$ac_objext conftest.beam conftest.$ac_ext
16700fi
16701
16702fi
16703
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16705$as_echo "$ac_cv_computed_gotos" >&6; }
16706case "$ac_cv_computed_gotos" in yes*)
16707
16708$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16709
16710esac
16711
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016712case $ac_sys_system in
16713AIX*)
16714
16715$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16716 ;;
16717esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016718
Michael W. Hudson54241132001-12-07 15:38:26 +000016719
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016720
16721
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016722for h in `(cd $srcdir;echo Python/thread_*.h)`
16723do
16724 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16725done
16726
Michael W. Hudson54241132001-12-07 15:38:26 +000016727
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016728SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16730$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016731for dir in $SRCDIRS; do
16732 if test ! -d $dir; then
16733 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016734 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016735done
Matthias Kloseb9621712010-04-24 17:59:49 +000016736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16737$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016738
Stefan Krah1919b7e2012-03-21 18:25:23 +010016739# Availability of -O2:
16740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16741$as_echo_n "checking for -O2... " >&6; }
16742saved_cflags="$CFLAGS"
16743CFLAGS="-O2"
16744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16745/* end confdefs.h. */
16746
16747int
16748main ()
16749{
16750
16751
16752 ;
16753 return 0;
16754}
16755_ACEOF
16756if ac_fn_c_try_compile "$LINENO"; then :
16757 have_O2=yes
16758else
16759 have_O2=no
16760fi
16761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16763$as_echo "$have_O2" >&6; }
16764CFLAGS="$saved_cflags"
16765
16766# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16767# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16769$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16770saved_cflags="$CFLAGS"
16771CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16772if test "$have_O2" = no; then
16773 CFLAGS=""
16774fi
16775if test "$cross_compiling" = yes; then :
16776 have_glibc_memmove_bug=undefined
16777else
16778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16779/* end confdefs.h. */
16780
16781#include <stdio.h>
16782#include <stdlib.h>
16783#include <string.h>
16784void foo(void *p, void *q) { memmove(p, q, 19); }
16785int main() {
16786 char a[32] = "123456789000000000";
16787 foo(&a[9], a);
16788 if (strcmp(a, "123456789123456789000000000") != 0)
16789 return 1;
16790 foo(a, &a[9]);
16791 if (strcmp(a, "123456789000000000") != 0)
16792 return 1;
16793 return 0;
16794}
16795
16796_ACEOF
16797if ac_fn_c_try_run "$LINENO"; then :
16798 have_glibc_memmove_bug=no
16799else
16800 have_glibc_memmove_bug=yes
16801fi
16802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16803 conftest.$ac_objext conftest.beam conftest.$ac_ext
16804fi
16805
16806CFLAGS="$saved_cflags"
16807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16808$as_echo "$have_glibc_memmove_bug" >&6; }
16809if test "$have_glibc_memmove_bug" = yes; then
16810
16811$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16812
16813fi
16814
16815if test "$have_gcc_asm_for_x87" = yes; then
16816 # Some versions of gcc miscompile inline asm:
16817 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16818 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16819 case $CC in
16820 *gcc*)
16821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16822$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16823 saved_cflags="$CFLAGS"
16824 CFLAGS="-O2"
16825 if test "$cross_compiling" = yes; then :
16826 have_ipa_pure_const_bug=undefined
16827else
16828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16829/* end confdefs.h. */
16830
16831 __attribute__((noinline)) int
16832 foo(int *p) {
16833 int r;
16834 asm ( "movl \$6, (%1)\n\t"
16835 "xorl %0, %0\n\t"
16836 : "=r" (r) : "r" (p) : "memory"
16837 );
16838 return r;
16839 }
16840 int main() {
16841 int p = 8;
16842 if ((foo(&p) ? : p) != 6)
16843 return 1;
16844 return 0;
16845 }
16846
16847_ACEOF
16848if ac_fn_c_try_run "$LINENO"; then :
16849 have_ipa_pure_const_bug=no
16850else
16851 have_ipa_pure_const_bug=yes
16852fi
16853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16854 conftest.$ac_objext conftest.beam conftest.$ac_ext
16855fi
16856
16857 CFLAGS="$saved_cflags"
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16859$as_echo "$have_ipa_pure_const_bug" >&6; }
16860 if test "$have_ipa_pure_const_bug" = yes; then
16861
16862$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16863
16864 fi
16865 ;;
16866 esac
16867fi
16868
Victor Stinner4f5366e2015-01-09 02:13:19 +010016869# Check for stdatomic.h
16870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16871$as_echo_n "checking for stdatomic.h... " >&6; }
16872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16873/* end confdefs.h. */
16874
16875
16876 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016877 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016878 int main() {
16879 int loaded_value = atomic_load(&value);
16880 return 0;
16881 }
16882
16883
16884_ACEOF
16885if ac_fn_c_try_link "$LINENO"; then :
16886 have_stdatomic_h=yes
16887else
16888 have_stdatomic_h=no
16889fi
16890rm -f core conftest.err conftest.$ac_objext \
16891 conftest$ac_exeext conftest.$ac_ext
16892
16893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16894$as_echo "$have_stdatomic_h" >&6; }
16895
16896if test "$have_stdatomic_h" = yes; then
16897
16898$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16899
16900fi
16901
16902# Check for GCC >= 4.7 __atomic builtins
16903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16904$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16906/* end confdefs.h. */
16907
16908
16909 volatile int val = 1;
16910 int main() {
16911 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16912 return 0;
16913 }
16914
16915
16916_ACEOF
16917if ac_fn_c_try_link "$LINENO"; then :
16918 have_builtin_atomic=yes
16919else
16920 have_builtin_atomic=no
16921fi
16922rm -f core conftest.err conftest.$ac_objext \
16923 conftest$ac_exeext conftest.$ac_ext
16924
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16926$as_echo "$have_builtin_atomic" >&6; }
16927
16928if test "$have_builtin_atomic" = yes; then
16929
16930$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16931
16932fi
16933
Ned Deily322f5ba2013-11-21 23:01:59 -080016934# ensurepip option
16935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16936$as_echo_n "checking for ensurepip... " >&6; }
16937
16938# Check whether --with-ensurepip was given.
16939if test "${with_ensurepip+set}" = set; then :
16940 withval=$with_ensurepip;
16941else
16942 with_ensurepip=upgrade
16943fi
16944
16945case $with_ensurepip in #(
16946 yes|upgrade) :
16947 ENSUREPIP=upgrade ;; #(
16948 install) :
16949 ENSUREPIP=install ;; #(
16950 no) :
16951 ENSUREPIP=no ;; #(
16952 *) :
16953 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16954esac
16955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16956$as_echo "$ENSUREPIP" >&6; }
16957
16958
Victor Stinner35a97c02015-03-08 02:59:09 +010016959# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16961$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16963/* end confdefs.h. */
16964
16965
16966 #include <dirent.h>
16967
16968 int main() {
16969 struct dirent entry;
16970 return entry.d_type == DT_UNKNOWN;
16971 }
16972
16973
16974_ACEOF
16975if ac_fn_c_try_link "$LINENO"; then :
16976 have_dirent_d_type=yes
16977else
16978 have_dirent_d_type=no
16979fi
16980rm -f core conftest.err conftest.$ac_objext \
16981 conftest$ac_exeext conftest.$ac_ext
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16983$as_echo "$have_dirent_d_type" >&6; }
16984
16985if test "$have_dirent_d_type" = yes; then
16986
16987$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16988
16989fi
16990
Victor Stinner9eb57c52015-03-19 22:21:49 +010016991# check if the Linux getrandom() syscall is available
16992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16993$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16995/* end confdefs.h. */
16996
16997
Victor Stinner1b80b242016-04-12 22:34:58 +020016998 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016999 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020017000 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010017001
17002 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010017003 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020017004 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020017005 const int flags = GRND_NONBLOCK;
17006 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020017007 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010017008 return 0;
17009 }
17010
17011
17012_ACEOF
17013if ac_fn_c_try_link "$LINENO"; then :
17014 have_getrandom_syscall=yes
17015else
17016 have_getrandom_syscall=no
17017fi
17018rm -f core conftest.err conftest.$ac_objext \
17019 conftest$ac_exeext conftest.$ac_ext
17020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
17021$as_echo "$have_getrandom_syscall" >&6; }
17022
17023if test "$have_getrandom_syscall" = yes; then
17024
17025$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
17026
17027fi
17028
Victor Stinner3abf44e2015-09-18 15:38:37 +020017029# check if the getrandom() function is available
17030# the test was written for the Solaris function of <sys/random.h>
17031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
17032$as_echo_n "checking for the getrandom() function... " >&6; }
17033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17034/* end confdefs.h. */
17035
17036
17037 #include <sys/random.h>
17038
17039 int main() {
17040 char buffer[1];
17041 const size_t buflen = sizeof(buffer);
17042 const int flags = 0;
17043 /* ignore the result, Python checks for ENOSYS at runtime */
17044 (void)getrandom(buffer, buflen, flags);
17045 return 0;
17046 }
17047
17048
17049_ACEOF
17050if ac_fn_c_try_link "$LINENO"; then :
17051 have_getrandom=yes
17052else
17053 have_getrandom=no
17054fi
17055rm -f core conftest.err conftest.$ac_objext \
17056 conftest$ac_exeext conftest.$ac_ext
17057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
17058$as_echo "$have_getrandom" >&6; }
17059
17060if test "$have_getrandom" = yes; then
17061
17062$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
17063
17064fi
17065
Christian Heimesff5be6e2018-01-20 13:19:21 +010017066# Check for usable OpenSSL
17067
17068 found=false
17069
17070# Check whether --with-openssl was given.
17071if test "${with_openssl+set}" = set; then :
17072 withval=$with_openssl;
17073 case "$withval" in
17074 "" | y | ye | yes | n | no)
17075 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17076 ;;
17077 *) ssldirs="$withval"
17078 ;;
17079 esac
17080
17081else
17082
17083 # if pkg-config is installed and openssl has installed a .pc file,
17084 # then use that information and don't search ssldirs
17085 if test -n "$ac_tool_prefix"; then
17086 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17087set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17089$as_echo_n "checking for $ac_word... " >&6; }
17090if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17091 $as_echo_n "(cached) " >&6
17092else
17093 if test -n "$PKG_CONFIG"; then
17094 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17095else
17096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17097for as_dir in $PATH
17098do
17099 IFS=$as_save_IFS
17100 test -z "$as_dir" && as_dir=.
17101 for ac_exec_ext in '' $ac_executable_extensions; do
17102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17103 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17105 break 2
17106 fi
17107done
17108 done
17109IFS=$as_save_IFS
17110
17111fi
17112fi
17113PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17114if test -n "$PKG_CONFIG"; then
17115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17116$as_echo "$PKG_CONFIG" >&6; }
17117else
17118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17119$as_echo "no" >&6; }
17120fi
17121
17122
17123fi
17124if test -z "$ac_cv_prog_PKG_CONFIG"; then
17125 ac_ct_PKG_CONFIG=$PKG_CONFIG
17126 # Extract the first word of "pkg-config", so it can be a program name with args.
17127set dummy pkg-config; ac_word=$2
17128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17129$as_echo_n "checking for $ac_word... " >&6; }
17130if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17131 $as_echo_n "(cached) " >&6
17132else
17133 if test -n "$ac_ct_PKG_CONFIG"; then
17134 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17135else
17136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17137for as_dir in $PATH
17138do
17139 IFS=$as_save_IFS
17140 test -z "$as_dir" && as_dir=.
17141 for ac_exec_ext in '' $ac_executable_extensions; do
17142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17143 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17145 break 2
17146 fi
17147done
17148 done
17149IFS=$as_save_IFS
17150
17151fi
17152fi
17153ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17154if test -n "$ac_ct_PKG_CONFIG"; then
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17156$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17157else
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17159$as_echo "no" >&6; }
17160fi
17161
17162 if test "x$ac_ct_PKG_CONFIG" = x; then
17163 PKG_CONFIG=""
17164 else
17165 case $cross_compiling:$ac_tool_warned in
17166yes:)
17167{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17168$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17169ac_tool_warned=yes ;;
17170esac
17171 PKG_CONFIG=$ac_ct_PKG_CONFIG
17172 fi
17173else
17174 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17175fi
17176
17177 if test x"$PKG_CONFIG" != x""; then
17178 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17179 if test $? = 0; then
17180 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17181 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17182 found=true
17183 fi
17184 fi
17185
17186 # no such luck; use some default ssldirs
17187 if ! $found; then
17188 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17189 fi
17190
17191
17192fi
17193
17194
17195
17196 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17197 # an 'openssl' subdirectory
17198
17199 if ! $found; then
17200 OPENSSL_INCLUDES=
17201 for ssldir in $ssldirs; do
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17203$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17204 if test -f "$ssldir/include/openssl/ssl.h"; then
17205 OPENSSL_INCLUDES="-I$ssldir/include"
17206 OPENSSL_LDFLAGS="-L$ssldir/lib"
17207 OPENSSL_LIBS="-lssl -lcrypto"
17208 found=true
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17210$as_echo "yes" >&6; }
17211 break
17212 else
17213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17214$as_echo "no" >&6; }
17215 fi
17216 done
17217
17218 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17219 # it will just work!
17220 fi
17221
17222 # try the preprocessor and linker with our new flags,
17223 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17224
17225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17226$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17227 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17228 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17229
17230 save_LIBS="$LIBS"
17231 save_LDFLAGS="$LDFLAGS"
17232 save_CPPFLAGS="$CPPFLAGS"
17233 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17234 LIBS="$OPENSSL_LIBS $LIBS"
17235 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17237/* end confdefs.h. */
17238#include <openssl/ssl.h>
17239int
17240main ()
17241{
17242SSL_new(NULL)
17243 ;
17244 return 0;
17245}
17246_ACEOF
17247if ac_fn_c_try_link "$LINENO"; then :
17248
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17250$as_echo "yes" >&6; }
17251 have_openssl=yes
17252
17253else
17254
17255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17256$as_echo "no" >&6; }
17257 have_openssl=no
17258
17259fi
17260rm -f core conftest.err conftest.$ac_objext \
17261 conftest$ac_exeext conftest.$ac_ext
17262 CPPFLAGS="$save_CPPFLAGS"
17263 LDFLAGS="$save_LDFLAGS"
17264 LIBS="$save_LIBS"
17265
17266
17267
17268
17269
17270
17271if test "$have_openssl" = yes; then
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17273$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17274
17275 save_LIBS="$LIBS"
17276 save_LDFLAGS="$LDFLAGS"
17277 save_CPPFLAGS="$CPPFLAGS"
17278 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17279 LIBS="$OPENSSL_LIBS $LIBS"
17280 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17281
17282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283/* end confdefs.h. */
17284
17285 #include <openssl/x509_vfy.h>
17286
17287int
17288main ()
17289{
17290
17291 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17292 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17293 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17294 X509_VERIFY_PARAM_set_hostflags(p, 0);
17295
17296 ;
17297 return 0;
17298}
17299
17300_ACEOF
17301if ac_fn_c_try_link "$LINENO"; then :
17302
17303 ac_cv_has_x509_verify_param_set1_host=yes
17304
17305else
17306
17307 ac_cv_has_x509_verify_param_set1_host=no
17308
17309fi
17310rm -f core conftest.err conftest.$ac_objext \
17311 conftest$ac_exeext conftest.$ac_ext
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17313$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17314 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17315
17316$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17317
17318 fi
17319
17320 CPPFLAGS="$save_CPPFLAGS"
17321 LDFLAGS="$save_LDFLAGS"
17322 LIBS="$save_LIBS"
17323fi
17324
Christian Heimes892d66e2018-01-29 14:10:18 +010017325# ssl module default cipher suite string
17326
17327
17328
17329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17330$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17331
17332# Check whether --with-ssl-default-suites was given.
17333if test "${with_ssl_default_suites+set}" = set; then :
17334 withval=$with_ssl_default_suites;
17335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17336$as_echo "$withval" >&6; }
17337case "$withval" in
17338 python)
17339 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17340
17341 ;;
17342 openssl)
17343 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17344
17345 ;;
17346 *)
17347 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17348
17349 cat >>confdefs.h <<_ACEOF
17350#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17351_ACEOF
17352
17353 ;;
17354esac
17355
17356else
17357
17358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17359$as_echo "python" >&6; }
17360$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17361
17362
17363fi
17364
17365
17366
Guido van Rossum627b2d71993-12-24 10:39:16 +000017367# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017368ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017369
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017370ac_config_files="$ac_config_files Modules/ld_so_aix"
17371
Martin v. Löwis11437992002-04-12 09:54:03 +000017372cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017373# This file is a shell script that caches the results of configure
17374# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017375# scripts and configure runs, see configure's option --config-cache.
17376# It is not useful on other systems. If it contains results you don't
17377# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017378#
Martin v. Löwis11437992002-04-12 09:54:03 +000017379# config.status only pays attention to the cache file if you give it
17380# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017381#
Skip Montanaro6dead952003-09-25 14:50:04 +000017382# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017383# loading this file, other *unset* `ac_cv_foo' will be assigned the
17384# following values.
17385
17386_ACEOF
17387
Guido van Rossumf78abae1997-01-21 22:02:36 +000017388# The following way of writing the cache mishandles newlines in values,
17389# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017391# Ultrix sh set writes to stderr and can't be redirected directly,
17392# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393(
17394 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17395 eval ac_val=\$$ac_var
17396 case $ac_val in #(
17397 *${as_nl}*)
17398 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017399 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17400$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401 esac
17402 case $ac_var in #(
17403 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017404 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17405 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 esac ;;
17407 esac
17408 done
17409
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17412 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017413 # `set' does not quote correctly, so add quotes: double-quote
17414 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017416 "s/'/'\\\\''/g;
17417 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 *)
17420 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 esac |
17424 sort
17425) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017427 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017430 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17431 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17433 :end' >>confcache
17434if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17435 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017436 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017437 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17438$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017439 if test ! -f "$cache_file" || test -h "$cache_file"; then
17440 cat confcache >"$cache_file"
17441 else
17442 case $cache_file in #(
17443 */* | ?:*)
17444 mv -f confcache "$cache_file"$$ &&
17445 mv -f "$cache_file"$$ "$cache_file" ;; #(
17446 *)
17447 mv -f confcache "$cache_file" ;;
17448 esac
17449 fi
17450 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017451 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017452 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17453$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017454 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017455fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017456rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017457
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017458test "x$prefix" = xNONE && prefix=$ac_default_prefix
17459# Let make expand exec_prefix.
17460test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017461
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017462DEFS=-DHAVE_CONFIG_H
17463
Skip Montanaro6dead952003-09-25 14:50:04 +000017464ac_libobjs=
17465ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017466U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017467for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17468 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017470 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17472 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17474 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017475done
17476LIBOBJS=$ac_libobjs
17477
17478LTLIBOBJS=$ac_ltlibobjs
17479
17480
Martin v. Löwis11437992002-04-12 09:54:03 +000017481
Matthias Kloseb9621712010-04-24 17:59:49 +000017482
Victor Stinnere0be4232011-10-25 13:06:09 +020017483: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017484ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017485ac_clean_files_save=$ac_clean_files
17486ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017487{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17488$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17489as_write_fail=0
17490cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017491#! $SHELL
17492# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017493# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017494# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017495# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017496
Martin v. Löwis11437992002-04-12 09:54:03 +000017497debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017498ac_cs_recheck=false
17499ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017500
Matthias Kloseb9621712010-04-24 17:59:49 +000017501SHELL=\${CONFIG_SHELL-$SHELL}
17502export SHELL
17503_ASEOF
17504cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17505## -------------------- ##
17506## M4sh Initialization. ##
17507## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509# Be more Bourne compatible
17510DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017511if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 emulate sh
17513 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017515 # is contrary to our usage. Disable this feature.
17516 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017518else
Matthias Kloseb9621712010-04-24 17:59:49 +000017519 case `(set -o) 2>/dev/null` in #(
17520 *posix*) :
17521 set -o posix ;; #(
17522 *) :
17523 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017525fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017526
17527
Matthias Kloseb9621712010-04-24 17:59:49 +000017528as_nl='
17529'
17530export as_nl
17531# Printing a long string crashes Solaris 7 /usr/bin/printf.
17532as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17533as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17534as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17535# Prefer a ksh shell builtin over an external printf program on Solaris,
17536# but without wasting forks for bash or zsh.
17537if test -z "$BASH_VERSION$ZSH_VERSION" \
17538 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17539 as_echo='print -r --'
17540 as_echo_n='print -rn --'
17541elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17542 as_echo='printf %s\n'
17543 as_echo_n='printf %s'
17544else
17545 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17546 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17547 as_echo_n='/usr/ucb/echo -n'
17548 else
17549 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17550 as_echo_n_body='eval
17551 arg=$1;
17552 case $arg in #(
17553 *"$as_nl"*)
17554 expr "X$arg" : "X\\(.*\\)$as_nl";
17555 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17556 esac;
17557 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17558 '
17559 export as_echo_n_body
17560 as_echo_n='sh -c $as_echo_n_body as_echo'
17561 fi
17562 export as_echo_body
17563 as_echo='sh -c $as_echo_body as_echo'
17564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017565
17566# The user is always right.
17567if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 PATH_SEPARATOR=:
17569 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17570 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17571 PATH_SEPARATOR=';'
17572 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575
17576# IFS
17577# We need space, tab and new line, in precisely that order. Quoting is
17578# there to prevent editors from complaining about space-tab.
17579# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17580# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581IFS=" "" $as_nl"
17582
17583# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017584as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017585case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586 *[\\/]* ) as_myself=$0 ;;
17587 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017588for as_dir in $PATH
17589do
17590 IFS=$as_save_IFS
17591 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17593 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017596 ;;
17597esac
17598# We did not find ourselves, most probably we were run as `sh COMMAND'
17599# in which case we are not to be found in the path.
17600if test "x$as_myself" = x; then
17601 as_myself=$0
17602fi
17603if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17605 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606fi
17607
Matthias Kloseb9621712010-04-24 17:59:49 +000017608# Unset variables that we do not need and which cause bugs (e.g. in
17609# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17610# suppresses any "Segmentation fault" message there. '((' could
17611# trigger a bug in pdksh 5.2.14.
17612for as_var in BASH_ENV ENV MAIL MAILPATH
17613do eval test x\${$as_var+set} = xset \
17614 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615done
17616PS1='$ '
17617PS2='> '
17618PS4='+ '
17619
17620# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017621LC_ALL=C
17622export LC_ALL
17623LANGUAGE=C
17624export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625
Matthias Kloseb9621712010-04-24 17:59:49 +000017626# CDPATH.
17627(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17628
17629
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017630# as_fn_error STATUS ERROR [LINENO LOG_FD]
17631# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017632# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17633# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017634# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017635as_fn_error ()
17636{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637 as_status=$1; test $as_status -eq 0 && as_status=1
17638 if test "$4"; then
17639 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17640 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017642 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017643 as_fn_exit $as_status
17644} # as_fn_error
17645
17646
17647# as_fn_set_status STATUS
17648# -----------------------
17649# Set $? to STATUS, without forking.
17650as_fn_set_status ()
17651{
17652 return $1
17653} # as_fn_set_status
17654
17655# as_fn_exit STATUS
17656# -----------------
17657# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17658as_fn_exit ()
17659{
17660 set +e
17661 as_fn_set_status $1
17662 exit $1
17663} # as_fn_exit
17664
17665# as_fn_unset VAR
17666# ---------------
17667# Portably unset VAR.
17668as_fn_unset ()
17669{
17670 { eval $1=; unset $1;}
17671}
17672as_unset=as_fn_unset
17673# as_fn_append VAR VALUE
17674# ----------------------
17675# Append the text in VALUE to the end of the definition contained in VAR. Take
17676# advantage of any shell optimizations that allow amortized linear growth over
17677# repeated appends, instead of the typical quadratic growth present in naive
17678# implementations.
17679if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17680 eval 'as_fn_append ()
17681 {
17682 eval $1+=\$2
17683 }'
17684else
17685 as_fn_append ()
17686 {
17687 eval $1=\$$1\$2
17688 }
17689fi # as_fn_append
17690
17691# as_fn_arith ARG...
17692# ------------------
17693# Perform arithmetic evaluation on the ARGs, and store the result in the
17694# global $as_val. Take advantage of shells that can avoid forks. The arguments
17695# must be portable across $(()) and expr.
17696if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17697 eval 'as_fn_arith ()
17698 {
17699 as_val=$(( $* ))
17700 }'
17701else
17702 as_fn_arith ()
17703 {
17704 as_val=`expr "$@" || test $? -eq 1`
17705 }
17706fi # as_fn_arith
17707
17708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709if expr a : '\(a\)' >/dev/null 2>&1 &&
17710 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17711 as_expr=expr
17712else
17713 as_expr=false
17714fi
17715
17716if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17717 as_basename=basename
17718else
17719 as_basename=false
17720fi
17721
Matthias Kloseb9621712010-04-24 17:59:49 +000017722if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17723 as_dirname=dirname
17724else
17725 as_dirname=false
17726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728as_me=`$as_basename -- "$0" ||
17729$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17730 X"$0" : 'X\(//\)$' \| \
17731 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017732$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 sed '/^.*\/\([^/][^/]*\)\/*$/{
17734 s//\1/
17735 q
17736 }
17737 /^X\/\(\/\/\)$/{
17738 s//\1/
17739 q
17740 }
17741 /^X\/\(\/\).*/{
17742 s//\1/
17743 q
17744 }
17745 s/.*/./; q'`
17746
Matthias Kloseb9621712010-04-24 17:59:49 +000017747# Avoid depending upon Character Ranges.
17748as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17749as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17750as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17751as_cr_digits='0123456789'
17752as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753
17754ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017755case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017757 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017759 xy) ECHO_C='\c';;
17760 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17761 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 esac;;
17763*)
17764 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017766
Martin v. Löwis11437992002-04-12 09:54:03 +000017767rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768if test -d conf$$.dir; then
17769 rm -f conf$$.dir/conf$$.file
17770else
17771 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017774if (echo >conf$$.file) 2>/dev/null; then
17775 if ln -s conf$$.file conf$$ 2>/dev/null; then
17776 as_ln_s='ln -s'
17777 # ... but there are two gotchas:
17778 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17779 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017780 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017781 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017782 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017783 elif ln conf$$.file conf$$ 2>/dev/null; then
17784 as_ln_s=ln
17785 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017786 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017788else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017789 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17792rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017793
Matthias Kloseb9621712010-04-24 17:59:49 +000017794
17795# as_fn_mkdir_p
17796# -------------
17797# Create "$as_dir" as a directory, including parents if necessary.
17798as_fn_mkdir_p ()
17799{
17800
17801 case $as_dir in #(
17802 -*) as_dir=./$as_dir;;
17803 esac
17804 test -d "$as_dir" || eval $as_mkdir_p || {
17805 as_dirs=
17806 while :; do
17807 case $as_dir in #(
17808 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17809 *) as_qdir=$as_dir;;
17810 esac
17811 as_dirs="'$as_qdir' $as_dirs"
17812 as_dir=`$as_dirname -- "$as_dir" ||
17813$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17814 X"$as_dir" : 'X\(//\)[^/]' \| \
17815 X"$as_dir" : 'X\(//\)$' \| \
17816 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17817$as_echo X"$as_dir" |
17818 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17819 s//\1/
17820 q
17821 }
17822 /^X\(\/\/\)[^/].*/{
17823 s//\1/
17824 q
17825 }
17826 /^X\(\/\/\)$/{
17827 s//\1/
17828 q
17829 }
17830 /^X\(\/\).*/{
17831 s//\1/
17832 q
17833 }
17834 s/.*/./; q'`
17835 test -d "$as_dir" && break
17836 done
17837 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017838 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017839
17840
17841} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017842if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017843 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017844else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017845 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017846 as_mkdir_p=false
17847fi
17848
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017849
17850# as_fn_executable_p FILE
17851# -----------------------
17852# Test if FILE is an executable regular file.
17853as_fn_executable_p ()
17854{
17855 test -f "$1" && test -x "$1"
17856} # as_fn_executable_p
17857as_test_x='test -x'
17858as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017859
17860# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017861as_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 +000017862
17863# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017864as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
17866
Martin v. Löwis11437992002-04-12 09:54:03 +000017867exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017868## ----------------------------------- ##
17869## Main body of $CONFIG_STATUS script. ##
17870## ----------------------------------- ##
17871_ASEOF
17872test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
Matthias Kloseb9621712010-04-24 17:59:49 +000017874cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17875# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017876# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877# values after options handling.
17878ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017879This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017880generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017881
17882 CONFIG_FILES = $CONFIG_FILES
17883 CONFIG_HEADERS = $CONFIG_HEADERS
17884 CONFIG_LINKS = $CONFIG_LINKS
17885 CONFIG_COMMANDS = $CONFIG_COMMANDS
17886 $ $0 $@
17887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888on `(hostname || uname -n) 2>/dev/null | sed 1q`
17889"
17890
Martin v. Löwis11437992002-04-12 09:54:03 +000017891_ACEOF
17892
Matthias Kloseb9621712010-04-24 17:59:49 +000017893case $ac_config_files in *"
17894"*) set x $ac_config_files; shift; ac_config_files=$*;;
17895esac
17896
17897case $ac_config_headers in *"
17898"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17899esac
17900
17901
17902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017903# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017904config_files="$ac_config_files"
17905config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017908
Matthias Kloseb9621712010-04-24 17:59:49 +000017909cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017910ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017911\`$as_me' instantiates files and other configuration actions
17912from templates according to the current configuration. Unless the files
17913and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017916
17917 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017919 --config print configuration, then exit
17920 -q, --quiet, --silent
17921 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017922 -d, --debug don't remove temporary files
17923 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017924 --file=FILE[:TEMPLATE]
17925 instantiate the configuration file FILE
17926 --header=FILE[:TEMPLATE]
17927 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017928
17929Configuration files:
17930$config_files
17931
17932Configuration headers:
17933$config_headers
17934
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017935Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017938cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17939ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017940ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017941python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017942configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017943 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017944
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017945Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017946This config.status script is free software; the Free Software Foundation
17947gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948
17949ac_pwd='$ac_pwd'
17950srcdir='$srcdir'
17951INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017952MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017953test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017954_ACEOF
17955
Matthias Kloseb9621712010-04-24 17:59:49 +000017956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17957# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017958ac_need_defaults=:
17959while test $# != 0
17960do
17961 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017962 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17964 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017965 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017967 --*=)
17968 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17969 ac_optarg=
17970 ac_shift=:
17971 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017973 ac_option=$1
17974 ac_optarg=$2
17975 ac_shift=shift
17976 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 esac
17978
Skip Montanaro6dead952003-09-25 14:50:04 +000017979 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017981 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17982 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017983 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017984 $as_echo "$ac_cs_version"; exit ;;
17985 --config | --confi | --conf | --con | --co | --c )
17986 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 debug=: ;;
17989 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017990 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017991 case $ac_optarg in
17992 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017993 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017994 esac
17995 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 ac_need_defaults=false;;
17997 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017998 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017999 case $ac_optarg in
18000 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18001 esac
18002 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004 --he | --h)
18005 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018006 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018007Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000018009 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018010 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18011 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18012 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018013
18014 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018015 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000018016Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018017
Matthias Kloseb9621712010-04-24 17:59:49 +000018018 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018020
18021 esac
18022 shift
18023done
18024
Skip Montanaro6dead952003-09-25 14:50:04 +000018025ac_configure_extra_args=
18026
18027if $ac_cs_silent; then
18028 exec 6>/dev/null
18029 ac_configure_extra_args="$ac_configure_extra_args --silent"
18030fi
18031
18032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018034if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018035 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018036 shift
18037 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18038 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018040 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018041fi
18042
Martin v. Löwis11437992002-04-12 09:54:03 +000018043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045exec 5>>config.log
18046{
18047 echo
18048 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18049## Running $as_me. ##
18050_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018051 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018055cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018056_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018057
Matthias Kloseb9621712010-04-24 17:59:49 +000018058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059
18060# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018061for ac_config_target in $ac_config_targets
18062do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 case $ac_config_target in
18064 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18065 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18066 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018067 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18068 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018070 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018071 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018072 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073
Victor Stinnere0be4232011-10-25 13:06:09 +020018074 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018075 esac
18076done
18077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078
Martin v. Löwis11437992002-04-12 09:54:03 +000018079# If the user did not use the arguments to specify the items to instantiate,
18080# then the envvar interface is used. Set only those that are not.
18081# We use the long form for the default assignment because of an extremely
18082# bizarre bug on SunOS 4.1.3.
18083if $ac_need_defaults; then
18084 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18085 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18086fi
18087
Skip Montanaro6dead952003-09-25 14:50:04 +000018088# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018090# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091# Hook for its removal unless debugging.
18092# Note that there is a small window in which the directory will not be cleaned:
18093# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018094$debug ||
18095{
Victor Stinnere0be4232011-10-25 13:06:09 +020018096 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018098 : "${ac_tmp:=$tmp}"
18099 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018101 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018102}
Martin v. Löwis11437992002-04-12 09:54:03 +000018103# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018104
Martin v. Löwis11437992002-04-12 09:54:03 +000018105{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018107 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018108} ||
18109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 tmp=./conf$$-$RANDOM
18111 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018112} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018113ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018114
Matthias Kloseb9621712010-04-24 17:59:49 +000018115# Set up the scripts for CONFIG_FILES section.
18116# No need to generate them if there are no CONFIG_FILES.
18117# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018119
Matthias Kloseb9621712010-04-24 17:59:49 +000018120
18121ac_cr=`echo X | tr X '\015'`
18122# On cygwin, bash can eat \r inside `` if the user requested igncr.
18123# But we know of no other shell where ac_cr would be empty at this
18124# point, so we can use a bashism as a fallback.
18125if test "x$ac_cr" = x; then
18126 eval ac_cr=\$\'\\r\'
18127fi
18128ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18129if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018130 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018131else
18132 ac_cs_awk_cr=$ac_cr
18133fi
18134
Victor Stinnere0be4232011-10-25 13:06:09 +020018135echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018136_ACEOF
18137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138
Matthias Kloseb9621712010-04-24 17:59:49 +000018139{
18140 echo "cat >conf$$subs.awk <<_ACEOF" &&
18141 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18142 echo "_ACEOF"
18143} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018144 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18145ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146ac_delim='%!_!# '
18147for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018148 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018149 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150
Matthias Kloseb9621712010-04-24 17:59:49 +000018151 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18152 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018153 break
18154 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018155 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156 else
18157 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018158 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018159done
Matthias Kloseb9621712010-04-24 17:59:49 +000018160rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161
Matthias Kloseb9621712010-04-24 17:59:49 +000018162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018163cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018165sed -n '
18166h
18167s/^/S["/; s/!.*/"]=/
18168p
18169g
18170s/^[^!]*!//
18171:repl
18172t repl
18173s/'"$ac_delim"'$//
18174t delim
18175:nl
18176h
18177s/\(.\{148\}\)..*/\1/
18178t more1
18179s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18180p
18181n
18182b repl
18183:more1
18184s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18185p
18186g
18187s/.\{148\}//
18188t nl
18189:delim
18190h
18191s/\(.\{148\}\)..*/\1/
18192t more2
18193s/["\\]/\\&/g; s/^/"/; s/$/"/
18194p
18195b
18196:more2
18197s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18198p
18199g
18200s/.\{148\}//
18201t delim
18202' <conf$$subs.awk | sed '
18203/^[^""]/{
18204 N
18205 s/\n//
18206}
18207' >>$CONFIG_STATUS || ac_write_fail=1
18208rm -f conf$$subs.awk
18209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18210_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018211cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018212 for (key in S) S_is_set[key] = 1
18213 FS = ""
18214
18215}
18216{
18217 line = $ 0
18218 nfields = split(line, field, "@")
18219 substed = 0
18220 len = length(field[1])
18221 for (i = 2; i < nfields; i++) {
18222 key = field[i]
18223 keylen = length(key)
18224 if (S_is_set[key]) {
18225 value = S[key]
18226 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18227 len += length(value) + length(field[++i])
18228 substed = 1
18229 } else
18230 len += 1 + keylen
18231 }
18232
18233 print line
18234}
18235
18236_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18239if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18240 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18241else
18242 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018243fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018244 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018245_ACEOF
18246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018247# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18248# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249# trailing colons and then remove the whole line if VPATH becomes empty
18250# (actually we leave an empty line to preserve line numbers).
18251if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018252 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18253h
18254s///
18255s/^/:/
18256s/[ ]*$/:/
18257s/:\$(srcdir):/:/g
18258s/:\${srcdir}:/:/g
18259s/:@srcdir@:/:/g
18260s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018262x
18263s/\(=[ ]*\).*/\1/
18264G
18265s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266s/^[^=]*=[ ]*$//
18267}'
18268fi
18269
Matthias Kloseb9621712010-04-24 17:59:49 +000018270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018271fi # test -n "$CONFIG_FILES"
18272
Matthias Kloseb9621712010-04-24 17:59:49 +000018273# Set up the scripts for CONFIG_HEADERS section.
18274# No need to generate them if there are no CONFIG_HEADERS.
18275# This happens for instance with `./config.status Makefile'.
18276if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018277cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018278BEGIN {
18279_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280
Matthias Kloseb9621712010-04-24 17:59:49 +000018281# Transform confdefs.h into an awk script `defines.awk', embedded as
18282# here-document in config.status, that substitutes the proper values into
18283# config.h.in to produce config.h.
18284
18285# Create a delimiter string that does not exist in confdefs.h, to ease
18286# handling of long lines.
18287ac_delim='%!_!# '
18288for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018289 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18290 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018291 break
18292 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018293 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018294 else
18295 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18296 fi
18297done
18298
18299# For the awk script, D is an array of macro values keyed by name,
18300# likewise P contains macro parameters if any. Preserve backslash
18301# newline sequences.
18302
18303ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18304sed -n '
18305s/.\{148\}/&'"$ac_delim"'/g
18306t rset
18307:rset
18308s/^[ ]*#[ ]*define[ ][ ]*/ /
18309t def
18310d
18311:def
18312s/\\$//
18313t bsnl
18314s/["\\]/\\&/g
18315s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18316D["\1"]=" \3"/p
18317s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18318d
18319:bsnl
18320s/["\\]/\\&/g
18321s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18322D["\1"]=" \3\\\\\\n"\\/p
18323t cont
18324s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18325t cont
18326d
18327:cont
18328n
18329s/.\{148\}/&'"$ac_delim"'/g
18330t clear
18331:clear
18332s/\\$//
18333t bsnlc
18334s/["\\]/\\&/g; s/^/"/; s/$/"/p
18335d
18336:bsnlc
18337s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18338b cont
18339' <confdefs.h | sed '
18340s/'"$ac_delim"'/"\\\
18341"/g' >>$CONFIG_STATUS || ac_write_fail=1
18342
18343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18344 for (key in D) D_is_set[key] = 1
18345 FS = ""
18346}
18347/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18348 line = \$ 0
18349 split(line, arg, " ")
18350 if (arg[1] == "#") {
18351 defundef = arg[2]
18352 mac1 = arg[3]
18353 } else {
18354 defundef = substr(arg[1], 2)
18355 mac1 = arg[2]
18356 }
18357 split(mac1, mac2, "(") #)
18358 macro = mac2[1]
18359 prefix = substr(line, 1, index(line, defundef) - 1)
18360 if (D_is_set[macro]) {
18361 # Preserve the white space surrounding the "#".
18362 print prefix "define", macro P[macro] D[macro]
18363 next
18364 } else {
18365 # Replace #undef with comments. This is necessary, for example,
18366 # in the case of _POSIX_SOURCE, which is predefined and required
18367 # on some systems where configure will not decide to define it.
18368 if (defundef == "undef") {
18369 print "/*", prefix defundef, macro, "*/"
18370 next
18371 }
18372 }
18373}
18374{ print }
18375_ACAWK
18376_ACEOF
18377cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018378 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018379fi # test -n "$CONFIG_HEADERS"
18380
18381
18382eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18383shift
18384for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385do
18386 case $ac_tag in
18387 :[FHLC]) ac_mode=$ac_tag; continue;;
18388 esac
18389 case $ac_mode$ac_tag in
18390 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018391 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392 :[FH]-) ac_tag=-:-;;
18393 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18394 esac
18395 ac_save_IFS=$IFS
18396 IFS=:
18397 set x $ac_tag
18398 IFS=$ac_save_IFS
18399 shift
18400 ac_file=$1
18401 shift
18402
18403 case $ac_mode in
18404 :L) ac_source=$1;;
18405 :[FH])
18406 ac_file_inputs=
18407 for ac_f
18408 do
18409 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018410 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 *) # Look for the file first in the build tree, then in the source tree
18412 # (if the path is not absolute). The absolute path cannot be DOS-style,
18413 # because $ac_f cannot contain `:'.
18414 test -f "$ac_f" ||
18415 case $ac_f in
18416 [\\/$]*) false;;
18417 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18418 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018419 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018421 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18422 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018423 done
18424
18425 # Let's still pretend it is `configure' which instantiates (i.e., don't
18426 # use $as_me), people would be surprised to read:
18427 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018428 configure_input='Generated from '`
18429 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18430 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431 if test x"$ac_file" != x-; then
18432 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018433 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18434$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018436 # Neutralize special characters interpreted by sed in replacement strings.
18437 case $configure_input in #(
18438 *\&* | *\|* | *\\* )
18439 ac_sed_conf_input=`$as_echo "$configure_input" |
18440 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18441 *) ac_sed_conf_input=$configure_input;;
18442 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443
18444 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018445 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18446 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 esac
18448 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 esac
18450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018452$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018453 X"$ac_file" : 'X\(//\)[^/]' \| \
18454 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018456$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18458 s//\1/
18459 q
18460 }
18461 /^X\(\/\/\)[^/].*/{
18462 s//\1/
18463 q
18464 }
18465 /^X\(\/\/\)$/{
18466 s//\1/
18467 q
18468 }
18469 /^X\(\/\).*/{
18470 s//\1/
18471 q
18472 }
18473 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018474 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018475 ac_builddir=.
18476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477case "$ac_dir" in
18478.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18479*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018480 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018482 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018483 case $ac_top_builddir_sub in
18484 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18485 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18486 esac ;;
18487esac
18488ac_abs_top_builddir=$ac_pwd
18489ac_abs_builddir=$ac_pwd$ac_dir_suffix
18490# for backward compatibility:
18491ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018492
18493case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496 ac_top_srcdir=$ac_top_builddir_sub
18497 ac_abs_top_srcdir=$ac_pwd ;;
18498 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500 ac_top_srcdir=$srcdir
18501 ac_abs_top_srcdir=$srcdir ;;
18502 *) # Relative name.
18503 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18504 ac_top_srcdir=$ac_top_build_prefix$srcdir
18505 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018506esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018508
Martin v. Löwis11437992002-04-12 09:54:03 +000018509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510 case $ac_mode in
18511 :F)
18512 #
18513 # CONFIG_FILE
18514 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018515
18516 case $INSTALL in
18517 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018518 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018520 ac_MKDIR_P=$MKDIR_P
18521 case $MKDIR_P in
18522 [\\/$]* | ?:[\\/]* ) ;;
18523 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18524 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018526
Matthias Kloseb9621712010-04-24 17:59:49 +000018527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018528# If the template does not know about datarootdir, expand it.
18529# FIXME: This hack should be removed a few years after 2.60.
18530ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018531ac_sed_dataroot='
18532/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533 p
18534 q
18535}
18536/@datadir@/p
18537/@docdir@/p
18538/@infodir@/p
18539/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018540/@mandir@/p'
18541case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018542*datarootdir*) ac_datarootdir_seen=yes;;
18543*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18545$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018547cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018548 ac_datarootdir_hack='
18549 s&@datadir@&$datadir&g
18550 s&@docdir@&$docdir&g
18551 s&@infodir@&$infodir&g
18552 s&@localedir@&$localedir&g
18553 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018554 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555esac
18556_ACEOF
18557
18558# Neutralize VPATH when `$srcdir' = `.'.
18559# Shell code in configure.ac might set extrasub.
18560# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18562ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018563$extrasub
18564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018566:t
18567/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018568s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018569s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018570s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571s&@srcdir@&$ac_srcdir&;t t
18572s&@abs_srcdir@&$ac_abs_srcdir&;t t
18573s&@top_srcdir@&$ac_top_srcdir&;t t
18574s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18575s&@builddir@&$ac_builddir&;t t
18576s&@abs_builddir@&$ac_abs_builddir&;t t
18577s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18578s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018579s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018581"
Victor Stinnere0be4232011-10-25 13:06:09 +020018582eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18583 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018586 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18587 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18588 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018589 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018590which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018591$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018592which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018593
Victor Stinnere0be4232011-10-25 13:06:09 +020018594 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018595 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018596 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18597 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018598 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018599 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600 ;;
18601 :H)
18602 #
18603 # CONFIG_HEADER
18604 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018605 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018606 {
18607 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018608 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18609 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018610 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018611 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018612 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18613$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018615 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018616 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018617 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 fi
18619 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018620 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018621 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018622 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626
18627 esac
18628
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018629
18630 case $ac_file$ac_mode in
18631 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18632
18633 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018634done # for ac_tag
18635
Guido van Rossum627b2d71993-12-24 10:39:16 +000018636
Matthias Kloseb9621712010-04-24 17:59:49 +000018637as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018638_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018639ac_clean_files=$ac_clean_files_save
18640
Matthias Kloseb9621712010-04-24 17:59:49 +000018641test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018642 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018643
Martin v. Löwis11437992002-04-12 09:54:03 +000018644
18645# configure is writing to config.log, and then calls config.status.
18646# config.status does its own redirection, appending to config.log.
18647# Unfortunately, on DOS this fails, as config.log is still kept open
18648# by configure, so config.status won't be able to write to it; its
18649# output is simply discarded. So we exec the FD to /dev/null,
18650# effectively closing config.log, so it can be properly (re)opened and
18651# appended to by config.status. When coming back to configure, we
18652# need to make the FD available again.
18653if test "$no_create" != yes; then
18654 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018655 ac_config_status_args=
18656 test "$silent" = yes &&
18657 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018659 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018660 exec 5>>config.log
18661 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18662 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018663 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018664fi
18665if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18667$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018668fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018669
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018670
Christian Heimes75ed8902013-11-20 01:11:18 +010018671echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018672if test ! -f Modules/Setup
18673then
18674 cp $srcdir/Modules/Setup.dist Modules/Setup
18675fi
18676
Christian Heimes75ed8902013-11-20 01:11:18 +010018677echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018678if test ! -f Modules/Setup.local
18679then
18680 echo "# Edit this file for local setup changes" >Modules/Setup.local
18681fi
18682
Christian Heimes75ed8902013-11-20 01:11:18 +010018683echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018684$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018685 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018686 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018687mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018688
18689if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18690 echo "" >&6
18691 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018692 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 +000018693 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018694 echo "" >&6
18695 echo "" >&6
18696fi
18697