blob: 12663996ff3b165897b917e9689f28e28bb2f7de [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
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_ERR
677LLVM_PROF_FILE
678LLVM_PROF_MERGER
679PGO_PROF_USE_FLAG
680PGO_PROF_GEN_FLAG
Miss Islington (bot)69a3f152018-10-24 17:32:04 -0700681LLVM_AR_FOUND
682target_os
683target_vendor
684target_cpu
685target
686LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
812with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600813with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001399\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001465 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001493 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1494 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001499 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001500 --with-cxx-main=<compiler>
1501 compile main() and link python executable with C++
1502 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-suffix=.exe set executable suffix
1504 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001505 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001506 --with-lto Enable Link Time Optimization in any build. Disabled
1507 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
1511 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001513 --with-system-expat build pyexpat module using an installed expat
1514 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001515 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001516 --with-system-libmpdec build _decimal module using an installed libmpdec
1517 library
Ned Deilyd819b932013-09-06 01:07:05 -07001518 --with-tcltk-includes='-I...'
1519 override search for Tcl and Tk include files
1520 --with-tcltk-libs='-L...'
1521 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001522 --with-dbmliborder=db1:db2:...
1523 order to check db backends for dbm. Valid value is a
1524 colon separated string with the backend names
1525 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with(out)-doc-strings disable/enable documentation strings
1527 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001528 --with(out)-c-locale-coercion
1529 disable/enable C locale coercion to a UTF-8 based
1530 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001531 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001532 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001540 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001541 --with-ssl-default-suites=[python|openssl|STRING]
1542 Override default cipher suites string, python: use
1543 Python's preferred selection (default), openssl:
1544 leave OpenSSL's defaults untouched, STRING: use a
1545 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001548 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CC C compiler command
1550 CFLAGS C compiler flags
1551 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1552 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001557 PKG_CONFIG path to pkg-config utility
1558 PKG_CONFIG_PATH
1559 directories to add to pkg-config's search path
1560 PKG_CONFIG_LIBDIR
1561 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001562
1563Use these variables to override the choices made by `configure' or to help
1564it to find libraries and programs with nonstandard names/locations.
1565
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001566Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
1570
1571if test "$ac_init_help" = "recursive"; then
1572 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 test -d "$ac_dir" ||
1575 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1576 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_builddir=.
1578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579case "$ac_dir" in
1580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 case $ac_top_builddir_sub in
1586 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1588 esac ;;
1589esac
1590ac_abs_top_builddir=$ac_pwd
1591ac_abs_builddir=$ac_pwd$ac_dir_suffix
1592# for backward compatibility:
1593ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$ac_top_builddir_sub
1599 ac_abs_top_srcdir=$ac_pwd ;;
1600 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$srcdir
1603 ac_abs_top_srcdir=$srcdir ;;
1604 *) # Relative name.
1605 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1606 ac_top_srcdir=$ac_top_build_prefix$srcdir
1607 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001608esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 cd "$ac_dir" || { ac_status=$?; continue; }
1612 # Check for guested configure.
1613 if test -f "$ac_srcdir/configure.gnu"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1616 elif test -f "$ac_srcdir/configure"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 fi || ac_status=$?
1622 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 done
1624fi
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001627if $ac_init_version; then
1628 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001629python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001633This configure script is free software; the Free Software Foundation
1634gives unlimited permission to copy, distribute and modify it.
1635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001638
1639## ------------------------ ##
1640## Autoconf initialization. ##
1641## ------------------------ ##
1642
1643# ac_fn_c_try_compile LINENO
1644# --------------------------
1645# Try to compile conftest.$ac_ext, and return whether this succeeded.
1646ac_fn_c_try_compile ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext
1650 if { { ac_try="$ac_compile"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_compile") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest.$ac_objext; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_compile
1680
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } > conftest.i && {
1703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
Matthias Kloseb9621712010-04-24 17:59:49 +00001718# ac_fn_c_try_link LINENO
1719# -----------------------
1720# Try to link conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_c_try_link ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext conftest$ac_exeext
1725 if { { ac_try="$ac_link"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_link") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest$ac_exeext && {
1744 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001745 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
1754 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1755 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1756 # interfere with the next link command; also delete a directory that is
1757 # left behind by Apple's compiler. We do this before executing the actions.
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_link
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1767# the include files in INCLUDES and setting the cache variable VAR
1768# accordingly.
1769ac_fn_c_check_header_mongrel ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777fi
1778eval ac_res=\$$3
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1780$as_echo "$ac_res" >&6; }
1781else
1782 # Is the header compilable?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1784$as_echo_n "checking $2 usability... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787$4
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791 ac_header_compiler=yes
1792else
1793 ac_header_compiler=no
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1797$as_echo "$ac_header_compiler" >&6; }
1798
1799# Is the header present?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1801$as_echo_n "checking $2 presence... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_cpp "$LINENO"; then :
1807 ac_header_preproc=yes
1808else
1809 ac_header_preproc=no
1810fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1813$as_echo "$ac_header_preproc" >&6; }
1814
1815# So? What about this header?
1816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1817 yes:no: )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1819$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1822 ;;
1823 no:yes:* )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1825$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1827$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1829$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1831$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1833$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001834( $as_echo "## --------------------------------------- ##
1835## Report this to https://bugs.python.org/ ##
1836## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 ) | sed "s/^/$as_me: WARNING: /" >&2
1838 ;;
1839esac
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 eval "$3=\$ac_header_compiler"
1846fi
1847eval ac_res=\$$3
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1849$as_echo "$ac_res" >&6; }
1850fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852
1853} # ac_fn_c_check_header_mongrel
1854
1855# ac_fn_c_try_run LINENO
1856# ----------------------
1857# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1858# that executables *can* be run.
1859ac_fn_c_try_run ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { { ac_try="$ac_link"
1863case "(($ac_try" in
1864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865 *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869 (eval "$ac_link") 2>&5
1870 ac_status=$?
1871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1873 { { case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_try") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; }; }; then :
1883 ac_retval=0
1884else
1885 $as_echo "$as_me: program exited with status $ac_status" >&5
1886 $as_echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889 ac_retval=$ac_status
1890fi
1891 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 as_fn_set_status $ac_retval
1894
1895} # ac_fn_c_try_run
1896
1897# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898# -------------------------------------------------------
1899# Tests whether HEADER exists and can be compiled using the include files in
1900# INCLUDES, setting the cache variable VAR accordingly.
1901ac_fn_c_check_header_compile ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912#include <$2>
1913_ACEOF
1914if ac_fn_c_try_compile "$LINENO"; then :
1915 eval "$3=yes"
1916else
1917 eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_header_compile
1927
Matthias Kloseb9621712010-04-24 17:59:49 +00001928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_check_type
1981
Matthias Kloseb9621712010-04-24 17:59:49 +00001982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=0 ac_mid=0
2008 while :; do
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_hi=$ac_mid; break
2025else
2026 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2027 if test $ac_lo -le $ac_mid; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002173if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229
2230} # ac_fn_c_check_func
2231
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002232# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2233# ---------------------------------------------
2234# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2235# accordingly.
2236ac_fn_c_check_decl ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 as_decl_name=`echo $2|sed 's/ *(.*//'`
2240 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2242$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2243if eval \${$3+:} false; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252#ifndef $as_decl_name
2253#ifdef __cplusplus
2254 (void) $as_decl_use;
2255#else
2256 (void) $as_decl_name;
2257#endif
2258#endif
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
2274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275
2276} # ac_fn_c_check_decl
2277
Matthias Kloseb9621712010-04-24 17:59:49 +00002278# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2279# ----------------------------------------------------
2280# Tries to find if the field MEMBER exists in type AGGR, after including
2281# INCLUDES, setting cache variable VAR accordingly.
2282ac_fn_c_check_member ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2286$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$5
2293int
2294main ()
2295{
2296static $2 ac_aggr;
2297if (ac_aggr.$3)
2298return 0;
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303if ac_fn_c_try_compile "$LINENO"; then :
2304 eval "$4=yes"
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (sizeof ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 eval "$4=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$4
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Ned Deily4829bc62016-09-12 17:29:04 -04002338It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002339generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002597See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Trent Nelson4d4ec652012-10-16 08:51:24 -04002687
Christian Heimesff5be6e2018-01-20 13:19:21 +01002688
2689
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002690if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691 # If we're building out-of-tree, we need to make sure the following
2692 # resources get picked up before their $srcdir counterparts.
2693 # Objects/ -> typeslots.inc
2694 # Include/ -> Python-ast.h, graminit.h
2695 # Python/ -> importlib.h
2696 # (A side effect of this is that these resources will automatically be
2697 # regenerated when building out-of-tree, regardless of whether or not
2698 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2699 # off.)
2700 BASECPPFLAGS="-IObjects -IInclude -IPython"
2701else
2702 BASECPPFLAGS=""
2703fi
2704
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705
2706
2707
2708
Victor Stinner9ed34a82017-05-02 22:35:58 +02002709if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002711# Extract the first word of "git", so it can be a program name with args.
2712set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2714$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716 $as_echo_n "(cached) " >&6
2717else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718 if test -n "$HAS_GIT"; then
2719 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720else
2721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2722for as_dir in $PATH
2723do
2724 IFS=$as_save_IFS
2725 test -z "$as_dir" && as_dir=.
2726 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2730 break 2
2731 fi
2732done
2733 done
2734IFS=$as_save_IFS
2735
Ned Deily5c4b0d02017-03-04 00:19:55 -05002736 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002737fi
2738fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739HAS_GIT=$ac_cv_prog_HAS_GIT
2740if test -n "$HAS_GIT"; then
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2742$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743else
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2745$as_echo "no" >&6; }
2746fi
2747
2748
2749else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753then
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04002754 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2755 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2756 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITVERSION=""
2759 GITTAG=""
2760 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761fi
2762
2763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002764ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002765
2766
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002767ac_aux_dir=
2768for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2769 if test -f "$ac_dir/install-sh"; then
2770 ac_aux_dir=$ac_dir
2771 ac_install_sh="$ac_aux_dir/install-sh -c"
2772 break
2773 elif test -f "$ac_dir/install.sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install.sh -c"
2776 break
2777 elif test -f "$ac_dir/shtool"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/shtool install -c"
2780 break
2781 fi
2782done
2783if test -z "$ac_aux_dir"; then
2784 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2785fi
2786
2787# These three variables are undocumented and unsupported,
2788# and are intended to be withdrawn in a future Autoconf release.
2789# They can cause serious problems if a builder's source tree is in a directory
2790# whose full name contains unusual characters.
2791ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2792ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2793ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2794
2795
2796# Make sure we can run config.sub.
2797$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2798 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2799
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2801$as_echo_n "checking build system type... " >&6; }
2802if ${ac_cv_build+:} false; then :
2803 $as_echo_n "(cached) " >&6
2804else
2805 ac_build_alias=$build_alias
2806test "x$ac_build_alias" = x &&
2807 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2808test "x$ac_build_alias" = x &&
2809 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2810ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2811 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2812
2813fi
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2815$as_echo "$ac_cv_build" >&6; }
2816case $ac_cv_build in
2817*-*-*) ;;
2818*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2819esac
2820build=$ac_cv_build
2821ac_save_IFS=$IFS; IFS='-'
2822set x $ac_cv_build
2823shift
2824build_cpu=$1
2825build_vendor=$2
2826shift; shift
2827# Remember, the first character of IFS is used to create $*,
2828# except with old shells:
2829build_os=$*
2830IFS=$ac_save_IFS
2831case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2832
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2835$as_echo_n "checking host system type... " >&6; }
2836if ${ac_cv_host+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 if test "x$host_alias" = x; then
2840 ac_cv_host=$ac_cv_build
2841else
2842 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2844fi
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2848$as_echo "$ac_cv_host" >&6; }
2849case $ac_cv_host in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2852esac
2853host=$ac_cv_host
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_host
2856shift
2857host_cpu=$1
2858host_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862host_os=$*
2863IFS=$ac_save_IFS
2864case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2865
2866
2867
doko@python.orga10e4a92013-01-25 18:45:12 +01002868
2869
Ned Deilyfcbc2462014-08-22 13:32:49 -07002870# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2871rm -f pybuilddir.txt
2872
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002873for ac_prog in python$PACKAGE_VERSION python3 python
2874do
2875 # Extract the first word of "$ac_prog", so it can be a program name with args.
2876set dummy $ac_prog; ac_word=$2
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2878$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002879if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002880 $as_echo_n "(cached) " >&6
2881else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882 if test -n "$PYTHON_FOR_REGEN"; then
2883 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884else
2885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2886for as_dir in $PATH
2887do
2888 IFS=$as_save_IFS
2889 test -z "$as_dir" && as_dir=.
2890 for ac_exec_ext in '' $ac_executable_extensions; do
2891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2894 break 2
2895 fi
2896done
2897 done
2898IFS=$as_save_IFS
2899
2900fi
2901fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002902PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2903if test -n "$PYTHON_FOR_REGEN"; then
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2905$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906else
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2908$as_echo "no" >&6; }
2909fi
2910
2911
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
2917
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python3 python; do
2923 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002924 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 +02002925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002934 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 +02002935 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002936elif test "$cross_compiling" = maybe; then
2937 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938else
2939 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Benjamin Petersond23f8222009-04-05 19:13:16 +00002944if test "$prefix" != "/"; then
2945 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
2950
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002951# We don't use PACKAGE_ variables, and they cause conflicts
2952# with other autoconf-based packages that include Python.h
2953grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2954rm confdefs.h
2955mv confdefs.h.new confdefs.h
2956
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002957
Ned Deily4829bc62016-09-12 17:29:04 -04002958VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002959
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002960# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002961
2962SOVERSION=1.0
2963
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964# The later defininition of _XOPEN_SOURCE disables certain features
2965# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2966
Matthias Kloseb9621712010-04-24 17:59:49 +00002967$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968
2969
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2972# them.
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975
2976
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982
2983
Martin v. Löwisd6320502004-08-12 13:45:08 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989
2990
2991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002994# Arguments passed to configure.
2995
2996CONFIG_ARGS="$ac_configure_args"
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2999$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003001if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003003 case $enableval in
3004 yes)
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003005 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003006 # information
3007 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003008 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003009 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3011 if test ! -d "${enableval}"
3012 then
3013 enableval=/
3014 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 ;;
3017 esac
3018 case $enableval in
3019 no)
3020 UNIVERSALSDK=
3021 enable_universalsdk=
3022 ;;
3023 *)
3024 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 if test ! -d "${UNIVERSALSDK}"
3026 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003027 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033else
3034
3035 UNIVERSALSDK=
3036 enable_universalsdk=
3037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003040if test -n "${UNIVERSALSDK}"
3041then
Matthias Kloseb9621712010-04-24 17:59:49 +00003042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3043$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044else
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3046$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deily87adb6e2013-10-18 21:09:56 -07003051ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deilycbfb9a52012-06-23 16:02:19 -07003053# For backward compatibility reasons we prefer to select '32-bit' if available,
3054# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003055UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056if test "`uname -s`" = "Darwin"
3057then
3058 if test -n "${UNIVERSALSDK}"
3059 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003060 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061 then
3062 UNIVERSAL_ARCHS="intel"
3063 fi
3064 fi
3065fi
3066
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003067
Matthias Kloseb9621712010-04-24 17:59:49 +00003068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3069$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070
3071# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 UNIVERSAL_ARCHS="$withval"
3075
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076fi
3077
Ned Deily87adb6e2013-10-18 21:09:56 -07003078if test -n "${UNIVERSALSDK}"
3079then
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3081$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3082else
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3084$as_echo "no" >&6; }
3085fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003087
3088# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003089if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090 withval=$with_framework_name;
3091 PYTHONFRAMEWORK=${withval}
3092 PYTHONFRAMEWORKDIR=${withval}.framework
3093 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3094
3095else
3096
3097 PYTHONFRAMEWORK=Python
3098 PYTHONFRAMEWORKDIR=Python.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3100
3101fi
3102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003106 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003107 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003108 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003109 esac
3110 case $enableval in
3111 no)
3112 PYTHONFRAMEWORK=
3113 PYTHONFRAMEWORKDIR=no-framework
3114 PYTHONFRAMEWORKPREFIX=
3115 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116 FRAMEWORKINSTALLFIRST=
3117 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003118 FRAMEWORKALTINSTALLFIRST=
3119 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003120 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003135 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003137
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003181 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3188
3189 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3190
Jack Jansene578a632001-08-15 01:27:14 +00003191 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Guido van Rossum563e7081996-09-10 18:20:48 +00003193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORKPREFIX=
3198 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 FRAMEWORKINSTALLFIRST=
3200 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 FRAMEWORKALTINSTALLFIRST=
3202 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003203 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212fi
3213
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
3215
Michael W. Hudson54241132001-12-07 15:38:26 +00003216
3217
3218
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221
3222
3223
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003224
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003225
Ned Deilyb8f944f2013-11-21 22:42:25 -08003226
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003227
3228cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003229#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230_ACEOF
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003234## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003235## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003236##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003237# Set name for machine-dependent library files
3238
Matthias Kloseb9621712010-04-24 17:59:49 +00003239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3240$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241if test -z "$MACHDEP"
3242then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 # avoid using uname for cross builds
3244 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003245 # ac_sys_system and ac_sys_release are used for setting
3246 # a lot of different things including 'define_xopen_source'
3247 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003249 *-*-linux-android*)
3250 ac_sys_system=Linux-android
3251 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 *-*-linux*)
3253 ac_sys_system=Linux
3254 ;;
3255 *-*-cygwin*)
3256 ac_sys_system=Cygwin
3257 ;;
3258 *)
3259 # for now, limit cross builds to known configurations
3260 MACHDEP="unknown"
3261 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3262 esac
3263 ac_sys_release=
3264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003266 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003267 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003272 fi
3273 ac_md_system=`echo $ac_sys_system |
3274 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3275 ac_md_release=`echo $ac_sys_release |
3276 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3277 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003278
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003280 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003281 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003282 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003283 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285fi
Guido van Rossum91922671997-10-09 20:24:13 +00003286
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003287
3288if test "$cross_compiling" = yes; then
3289 case "$host" in
3290 *-*-linux*)
3291 case "$host_cpu" in
3292 arm*)
3293 _host_cpu=arm
3294 ;;
3295 *)
3296 _host_cpu=$host_cpu
3297 esac
3298 ;;
3299 *-*-cygwin*)
3300 _host_cpu=
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3308fi
3309
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003310# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3311# disable features if it is defined, without any means to access these
3312# features as extensions. For these systems, we skip the definition of
3313# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3314# some feature, make sure there is no alternative way to access this
3315# feature. Also, when using wildcards, make sure you have verified the
3316# need for not defining _XOPEN_SOURCE on all systems matching the
3317# wildcard, and that the wildcard does not include future systems
3318# (which may remove their limitations).
3319case $ac_sys_system/$ac_sys_release in
3320 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3321 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003322 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003323 # In addition, Stefan Krah confirms that issue #1244610 exists through
3324 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003325 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003326 define_xopen_source=no
3327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Kloseb9621712010-04-24 17:59:49 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332
3333 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340
3341 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003342 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3343 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3344 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003345 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 +00003346 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003347 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3348 # request to enable features supported by the standard as a request
3349 # to disable features not supported by the standard. The best way
3350 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3351 # entirely and define __EXTENSIONS__ instead.
3352 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003353 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3355 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003356 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003357 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 define_xopen_source=no;;
3359 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003363 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3364 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3365 # identifies itself as Darwin/7.*
3366 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3367 # disables platform specific features beyond repair.
3368 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3369 # has no effect, don't bother defining them
3370 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003371 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003372 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003373 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003374 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3375 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3376 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003377 AIX/4)
3378 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003379 AIX/5)
3380 if test `uname -r` -eq 1; then
3381 define_xopen_source=no
3382 fi
3383 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003384 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3385 # defining NI_NUMERICHOST.
3386 QNX/6.3.2)
3387 define_xopen_source=no
3388 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003389
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003390esac
3391
3392if test $define_xopen_source = yes
3393then
Victor Stinner14d098d2011-09-07 22:29:43 +02003394 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003395
Victor Stinner14d098d2011-09-07 22:29:43 +02003396$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
3399 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3400 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3401 # several APIs are not declared. Since this is also needed in some
3402 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Matthias Kloseb9621712010-04-24 17:59:49 +00003404$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003408$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410fi
3411
Christian Heimes647cd872013-12-07 23:39:33 +01003412# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3413case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003414 hp*|HP*)
3415 define_stdc_a1=yes;;
3416 *)
3417 define_stdc_a1=no;;
3418esac
3419
3420if test $define_stdc_a1 = yes
3421then
Christian Heimes647cd872013-12-07 23:39:33 +01003422
3423$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3424
Christian Heimesb02bcae2013-12-08 15:21:08 +01003425fi
Christian Heimes647cd872013-12-07 23:39:33 +01003426
Jack Jansen6b08a402004-06-03 12:41:45 +00003427# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3428# it may influence the way we can build extensions, so distutils
3429# needs to check it
3430
Thomas Wouters477c8d52006-05-27 19:21:47 +00003431
Jack Jansen6b08a402004-06-03 12:41:45 +00003432CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003433EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003434
Guido van Rossum627b2d71993-12-24 10:39:16 +00003435# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003436
3437# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3438# for debug/optimization stuff. BASECFLAGS is for flags that are required
3439# just to get things to compile and link. Users are free to override OPT
3440# when running configure or make. The build should not break if they do.
3441# BASECFLAGS should generally not be messed with, however.
3442
3443# XXX shouldn't some/most/all of this code be merged with the stuff later
3444# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3446$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003449if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003451 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003452 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003453 without_gcc=yes;;
3454 yes) CC=gcc
3455 without_gcc=no;;
3456 *) CC=$withval
3457 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003458 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459else
Martin v. Löwis11437992002-04-12 09:54:03 +00003460
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003461 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003462 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003463 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003464 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003465 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466fi
3467
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3469$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003470
Zachary Ware5af85642015-12-21 12:09:17 -06003471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3472$as_echo_n "checking for --with-icc... " >&6; }
3473
3474# Check whether --with-icc was given.
3475if test "${with_icc+set}" = set; then :
3476 withval=$with_icc;
3477 case $withval in
3478 no) CC=${CC:-cc}
3479 with_icc=no;;
3480 yes) CC=icc
3481 CXX=icpc
3482 with_icc=yes;;
3483 *) CC=$withval
3484 with_icc=$withval;;
3485 esac
3486else
3487
3488 with_icc=no
3489fi
3490
3491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3492$as_echo "$with_icc" >&6; }
3493
Guido van Rossum8b131c51995-03-09 14:10:13 +00003494# If the user switches compilers, we can't believe the cache
3495if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3496then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003497 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003498(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003499fi
3500
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003501# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3502# when the compiler supports them, but we don't always want -O2, and
3503# we set -g later.
3504if test -z "$CFLAGS"; then
3505 CFLAGS=
3506fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003507
3508if test "$ac_sys_system" = "Darwin"
3509then
3510 # Compiler selection on MacOSX is more complicated than
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003511 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003512 # information
3513 if test -z "${CC}"
3514 then
3515 found_gcc=
3516 found_clang=
3517 as_save_IFS=$IFS; IFS=:
3518 for as_dir in $PATH
3519 do
3520 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003521 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003522 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003523 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524 fi
3525 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003526 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003528 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 fi
3530 fi
3531 done
3532 IFS=$as_save_IFS
3533
3534 if test -n "$found_gcc" -a -n "$found_clang"
3535 then
3536 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3537 then
3538 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3539$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3540 CC="$found_clang"
3541 CXX="$found_clang++"
3542 fi
3543
3544
3545 elif test -z "$found_gcc" -a -n "$found_clang"
3546 then
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3548$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3549 CC="$found_clang"
3550 CXX="$found_clang++"
3551
3552 elif test -z "$found_gcc" -a -z "$found_clang"
3553 then
3554 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3555 if test -n "${found_clang}"
3556 then
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3558$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3559 CC="${found_clang}"
3560 CXX="`/usr/bin/xcrun -find clang++`"
3561
3562 # else: use default behaviour
3563 fi
3564 fi
3565 fi
3566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003567ac_ext=c
3568ac_cpp='$CPP $CPPFLAGS'
3569ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3570ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3571ac_compiler_gnu=$ac_cv_c_compiler_gnu
3572if test -n "$ac_tool_prefix"; then
3573 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3574set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3576$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003577if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003579else
3580 if test -n "$CC"; then
3581 ac_cv_prog_CC="$CC" # Let the user override the test.
3582else
Martin v. Löwis11437992002-04-12 09:54:03 +00003583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3584for as_dir in $PATH
3585do
3586 IFS=$as_save_IFS
3587 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003588 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003589 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 $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 +00003592 break 2
3593 fi
3594done
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003597
Jack Jansendd19cf82001-12-06 22:36:17 +00003598fi
3599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003601if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3603$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003604else
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3606$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003607fi
3608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609
Martin v. Löwis11437992002-04-12 09:54:03 +00003610fi
3611if test -z "$ac_cv_prog_CC"; then
3612 ac_ct_CC=$CC
3613 # Extract the first word of "gcc", so it can be a program name with args.
3614set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3616$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003617if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003619else
3620 if test -n "$ac_ct_CC"; then
3621 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3622else
3623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3624for as_dir in $PATH
3625do
3626 IFS=$as_save_IFS
3627 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 $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 +00003632 break 2
3633 fi
3634done
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003637
3638fi
3639fi
3640ac_ct_CC=$ac_cv_prog_ac_ct_CC
3641if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3643$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644else
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3646$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003649 if test "x$ac_ct_CC" = x; then
3650 CC=""
3651 else
3652 case $cross_compiling:$ac_tool_warned in
3653yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656ac_tool_warned=yes ;;
3657esac
3658 CC=$ac_ct_CC
3659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003660else
3661 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003662fi
3663
Jack Jansendd19cf82001-12-06 22:36:17 +00003664if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665 if test -n "$ac_tool_prefix"; then
3666 # 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 +00003667set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3669$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003670if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003672else
3673 if test -n "$CC"; then
3674 ac_cv_prog_CC="$CC" # Let the user override the test.
3675else
Martin v. Löwis11437992002-04-12 09:54:03 +00003676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3677for as_dir in $PATH
3678do
3679 IFS=$as_save_IFS
3680 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 break 2
3686 fi
3687done
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003690
3691fi
3692fi
3693CC=$ac_cv_prog_CC
3694if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3696$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003697else
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3699$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003700fi
3701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705if test -z "$CC"; then
3706 # Extract the first word of "cc", so it can be a program name with args.
3707set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3709$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003710if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
3713 if test -n "$CC"; then
3714 ac_cv_prog_CC="$CC" # Let the user override the test.
3715else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3718for as_dir in $PATH
3719do
3720 IFS=$as_save_IFS
3721 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3725 ac_prog_rejected=yes
3726 continue
3727 fi
3728 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $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 +00003730 break 2
3731 fi
3732done
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003735
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736if test $ac_prog_rejected = yes; then
3737 # We found a bogon in the path, so make sure we never use it.
3738 set dummy $ac_cv_prog_CC
3739 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 # We chose a different compiler from the bogus one.
3742 # However, it has the same basename, so the bogon will be chosen
3743 # first if we set CC to just the basename; use the full file name.
3744 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003745 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746 fi
3747fi
3748fi
3749fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003750CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3753$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754else
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3756$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757fi
3758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
3761if test -z "$CC"; then
3762 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 do
3765 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3766set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3768$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003769if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003771else
3772 if test -n "$CC"; then
3773 ac_cv_prog_CC="$CC" # Let the user override the test.
3774else
Martin v. Löwis11437992002-04-12 09:54:03 +00003775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3776for as_dir in $PATH
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $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 +00003784 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786done
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003789
3790fi
3791fi
3792CC=$ac_cv_prog_CC
3793if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3795$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796else
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003799fi
3800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 test -n "$CC" && break
3803 done
3804fi
3805if test -z "$CC"; then
3806 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003808do
3809 # Extract the first word of "$ac_prog", so it can be a program name with args.
3810set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3812$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003813if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003815else
3816 if test -n "$ac_ct_CC"; then
3817 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3818else
3819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820for as_dir in $PATH
3821do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003826 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 $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 +00003828 break 2
3829 fi
3830done
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003833
Martin v. Löwis11437992002-04-12 09:54:03 +00003834fi
3835fi
3836ac_ct_CC=$ac_cv_prog_ac_ct_CC
3837if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3839$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003840else
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3842$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003843fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845
Martin v. Löwis11437992002-04-12 09:54:03 +00003846 test -n "$ac_ct_CC" && break
3847done
Michael W. Hudson54241132001-12-07 15:38:26 +00003848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 if test "x$ac_ct_CC" = x; then
3850 CC=""
3851 else
3852 case $cross_compiling:$ac_tool_warned in
3853yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856ac_tool_warned=yes ;;
3857esac
3858 CC=$ac_ct_CC
3859 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
3861
3862fi
3863
3864
Matthias Kloseb9621712010-04-24 17:59:49 +00003865test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003867as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003868See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003869
3870# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003871$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3872set X $ac_compile
3873ac_compiler=$2
3874for ac_option in --version -v -V -qversion; do
3875 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876case "(($ac_try" in
3877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3878 *) ac_try_echo=$ac_try;;
3879esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3881$as_echo "$ac_try_echo"; } >&5
3882 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 if test -s conftest.err; then
3885 sed '10a\
3886... rest of stderr output deleted ...
3887 10q' conftest.err >conftest.er1
3888 cat conftest.er1 >&5
3889 fi
3890 rm -f conftest.er1 conftest.err
3891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3892 test $ac_status = 0; }
3893done
Martin v. Löwis11437992002-04-12 09:54:03 +00003894
Matthias Kloseb9621712010-04-24 17:59:49 +00003895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003896/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898int
3899main ()
3900{
3901
3902 ;
3903 return 0;
3904}
3905_ACEOF
3906ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003907ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908# Try to create an executable without -o first, disregard a.out.
3909# It will help us diagnose broken compilers, and finding out an intuition
3910# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3912$as_echo_n "checking whether the C compiler works... " >&6; }
3913ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3914
3915# The possible output files:
3916ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918ac_rmfiles=
3919for ac_file in $ac_files
3920do
3921 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3924 esac
3925done
3926rm -f $ac_rmfiles
3927
Matthias Kloseb9621712010-04-24 17:59:49 +00003928if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929case "(($ac_try" in
3930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3931 *) ac_try_echo=$ac_try;;
3932esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3934$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3940# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3941# in a Makefile. We should not override ac_cv_exeext if it was cached,
3942# so that the user can short-circuit this test for compilers unknown to
3943# Autoconf.
3944for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003945do
3946 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003949 ;;
3950 [ab].out )
3951 # We found the default executable, but exeext='' is most
3952 # certainly right.
3953 break;;
3954 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 then :; else
3957 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3958 fi
3959 # We set ac_cv_exeext here because the later test for it is not
3960 # safe: cross compilers may not add the suffix if given an `-o'
3961 # argument, so we may need to know it at that point already.
3962 # Even if this section looks crufty: it has the advantage of
3963 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 break;;
3965 * )
3966 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 esac
3968done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969test "$ac_cv_exeext" = no && ac_cv_exeext=
3970
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003971else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 ac_file=''
3973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003974if test -z "$ac_file"; then :
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3976$as_echo "no" >&6; }
3977$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003978sed 's/^/| /' conftest.$ac_ext >&5
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003982as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003983See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003984else
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3986$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3989$as_echo_n "checking for C compiler default output file name... " >&6; }
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3991$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993
Matthias Kloseb9621712010-04-24 17:59:49 +00003994rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3997$as_echo_n "checking for suffix of executables... " >&6; }
3998if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999case "(($ac_try" in
4000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4001 *) ac_try_echo=$ac_try;;
4002esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4004$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004006 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4008 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4010# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4011# work properly (i.e., refer to `conftest.exe'), while it won't with
4012# `rm'.
4013for ac_file in conftest.exe conftest conftest.*; do
4014 test -f "$ac_file" || continue
4015 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004017 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4018 break;;
4019 * ) break;;
4020 esac
4021done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004022else
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004025as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004026See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004028rm -f conftest conftest$ac_cv_exeext
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4030$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031
4032rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004033EXEEXT=$ac_cv_exeext
4034ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4036/* end confdefs.h. */
4037#include <stdio.h>
4038int
4039main ()
4040{
4041FILE *f = fopen ("conftest.out", "w");
4042 return ferror (f) || fclose (f) != 0;
4043
4044 ;
4045 return 0;
4046}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004048ac_clean_files="$ac_clean_files conftest.out"
4049# Check that the compiler produces executables we can run. If not, either
4050# the compiler is broken, or we cross compile.
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4052$as_echo_n "checking whether we are cross compiling... " >&6; }
4053if test "$cross_compiling" != yes; then
4054 { { ac_try="$ac_link"
4055case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
4059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
4061 (eval "$ac_link") 2>&5
4062 ac_status=$?
4063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }
4065 if { ac_try='./conftest$ac_cv_exeext'
4066 { { case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
4070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071$as_echo "$ac_try_echo"; } >&5
4072 (eval "$ac_try") 2>&5
4073 ac_status=$?
4074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075 test $ac_status = 0; }; }; then
4076 cross_compiling=no
4077 else
4078 if test "$cross_compiling" = maybe; then
4079 cross_compiling=yes
4080 else
4081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004083as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004084If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004085See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 fi
4087 fi
4088fi
4089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4090$as_echo "$cross_compiling" >&6; }
4091
4092rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4093ac_clean_files=$ac_clean_files_save
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4095$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004096if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo_n "(cached) " >&6
4098else
4099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004100/* end confdefs.h. */
4101
4102int
4103main ()
4104{
4105
4106 ;
4107 return 0;
4108}
4109_ACEOF
4110rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004111if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112case "(($ac_try" in
4113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114 *) ac_try_echo=$ac_try;;
4115esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122 for ac_file in conftest.o conftest.obj conftest.*; do
4123 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4127 break;;
4128 esac
4129done
4130else
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004132sed 's/^/| /' conftest.$ac_ext >&5
4133
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004136as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004137See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004138fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004139rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4142$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004143OBJEXT=$ac_cv_objext
4144ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4146$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004147if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004149else
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004152
Martin v. Löwis11437992002-04-12 09:54:03 +00004153int
4154main ()
4155{
4156#ifndef __GNUC__
4157 choke me
4158#endif
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 ac_compiler_gnu=yes
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004170ac_cv_c_compiler_gnu=$ac_compiler_gnu
4171
4172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4174$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4175if test $ac_compiler_gnu = yes; then
4176 GCC=yes
4177else
4178 GCC=
4179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004180ac_test_CFLAGS=${CFLAGS+set}
4181ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4183$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004184if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004186else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187 ac_save_c_werror_flag=$ac_c_werror_flag
4188 ac_c_werror_flag=yes
4189 ac_cv_prog_cc_g=no
4190 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004193
Martin v. Löwis11437992002-04-12 09:54:03 +00004194int
4195main ()
4196{
4197
4198 ;
4199 return 0;
4200}
4201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004202if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004203 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204else
Matthias Kloseb9621712010-04-24 17:59:49 +00004205 CFLAGS=""
4206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207/* end confdefs.h. */
4208
4209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218
Matthias Kloseb9621712010-04-24 17:59:49 +00004219else
4220 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241 ac_c_werror_flag=$ac_save_c_werror_flag
4242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4244$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004245if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004246 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004247elif test $ac_cv_prog_cc_g = yes; then
4248 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004249 CFLAGS="-g -O2"
4250 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252 fi
4253else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254 if test "$GCC" = yes; then
4255 CFLAGS="-O2"
4256 else
4257 CFLAGS=
4258 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4261$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004262if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004263 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004264else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004266ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004268/* end confdefs.h. */
4269#include <stdarg.h>
4270#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004271struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004272/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4273struct buf { int x; };
4274FILE * (*rcsopen) (struct buf *, struct stat *, int);
4275static char *e (p, i)
4276 char **p;
4277 int i;
4278{
4279 return p[i];
4280}
4281static char *f (char * (*g) (char **, int), char **p, ...)
4282{
4283 char *s;
4284 va_list v;
4285 va_start (v,p);
4286 s = g (p, va_arg (v,int));
4287 va_end (v);
4288 return s;
4289}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004290
4291/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4292 function prototypes and stuff, but not '\xHH' hex character constants.
4293 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4296 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004298int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4301 inside strings and character constants. */
4302#define FOO(x) 'x'
4303int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4304
Skip Montanaro6dead952003-09-25 14:50:04 +00004305int test (int i, double x);
4306struct s1 {int (*f) (int a);};
4307struct s2 {int (*f) (double a);};
4308int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4309int argc;
4310char **argv;
4311int
4312main ()
4313{
4314return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4315 ;
4316 return 0;
4317}
4318_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4320 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004321do
4322 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326rm -f core conftest.err conftest.$ac_objext
4327 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004328done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004330CC=$ac_save_CC
4331
4332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333# AC_CACHE_VAL
4334case "x$ac_cv_prog_cc_c89" in
4335 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4337$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4340$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004341 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4344$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004345esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004346if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004347
Matthias Kloseb9621712010-04-24 17:59:49 +00004348fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Martin v. Löwis11437992002-04-12 09:54:03 +00004350ac_ext=c
4351ac_cpp='$CPP $CPPFLAGS'
4352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4354ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004356ac_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
4361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4362$as_echo_n "checking how to run the C preprocessor... " >&6; }
4363# On Suns, sometimes $CPP names a directory.
4364if test -n "$CPP" && test -d "$CPP"; then
4365 CPP=
4366fi
4367if test -z "$CPP"; then
4368 if ${ac_cv_prog_CPP+:} false; then :
4369 $as_echo_n "(cached) " >&6
4370else
4371 # Double quotes because CPP needs to be expanded
4372 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4373 do
4374 ac_preproc_ok=false
4375for ac_c_preproc_warn_flag in '' yes
4376do
4377 # Use a header file that comes with gcc, so configuring glibc
4378 # with a fresh cross-compiler works.
4379 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4380 # <limits.h> exists even on freestanding compilers.
4381 # On the NeXT, cc -E runs the code through the compiler's parser,
4382 # not just through cpp. "Syntax error" is here to catch this case.
4383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4384/* end confdefs.h. */
4385#ifdef __STDC__
4386# include <limits.h>
4387#else
4388# include <assert.h>
4389#endif
4390 Syntax error
4391_ACEOF
4392if ac_fn_c_try_cpp "$LINENO"; then :
4393
4394else
4395 # Broken: fails on valid input.
4396continue
4397fi
4398rm -f conftest.err conftest.i conftest.$ac_ext
4399
4400 # OK, works on sane cases. Now check whether nonexistent headers
4401 # can be detected and how.
4402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403/* end confdefs.h. */
4404#include <ac_nonexistent.h>
4405_ACEOF
4406if ac_fn_c_try_cpp "$LINENO"; then :
4407 # Broken: success on invalid input.
4408continue
4409else
4410 # Passes both tests.
4411ac_preproc_ok=:
4412break
4413fi
4414rm -f conftest.err conftest.i conftest.$ac_ext
4415
4416done
4417# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4418rm -f conftest.i conftest.err conftest.$ac_ext
4419if $ac_preproc_ok; then :
4420 break
4421fi
4422
4423 done
4424 ac_cv_prog_CPP=$CPP
4425
4426fi
4427 CPP=$ac_cv_prog_CPP
4428else
4429 ac_cv_prog_CPP=$CPP
4430fi
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4432$as_echo "$CPP" >&6; }
4433ac_preproc_ok=false
4434for ac_c_preproc_warn_flag in '' yes
4435do
4436 # Use a header file that comes with gcc, so configuring glibc
4437 # with a fresh cross-compiler works.
4438 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4439 # <limits.h> exists even on freestanding compilers.
4440 # On the NeXT, cc -E runs the code through the compiler's parser,
4441 # not just through cpp. "Syntax error" is here to catch this case.
4442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4443/* end confdefs.h. */
4444#ifdef __STDC__
4445# include <limits.h>
4446#else
4447# include <assert.h>
4448#endif
4449 Syntax error
4450_ACEOF
4451if ac_fn_c_try_cpp "$LINENO"; then :
4452
4453else
4454 # Broken: fails on valid input.
4455continue
4456fi
4457rm -f conftest.err conftest.i conftest.$ac_ext
4458
4459 # OK, works on sane cases. Now check whether nonexistent headers
4460 # can be detected and how.
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462/* end confdefs.h. */
4463#include <ac_nonexistent.h>
4464_ACEOF
4465if ac_fn_c_try_cpp "$LINENO"; then :
4466 # Broken: success on invalid input.
4467continue
4468else
4469 # Passes both tests.
4470ac_preproc_ok=:
4471break
4472fi
4473rm -f conftest.err conftest.i conftest.$ac_ext
4474
4475done
4476# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4477rm -f conftest.i conftest.err conftest.$ac_ext
4478if $ac_preproc_ok; then :
4479
4480else
4481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4483as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4484See \`config.log' for more details" "$LINENO" 5; }
4485fi
4486
4487ac_ext=c
4488ac_cpp='$CPP $CPPFLAGS'
4489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4491ac_compiler_gnu=$ac_cv_c_compiler_gnu
4492
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4494$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4495if ${ac_cv_path_GREP+:} false; then :
4496 $as_echo_n "(cached) " >&6
4497else
4498 if test -z "$GREP"; then
4499 ac_path_GREP_found=false
4500 # Loop through the user's path and test for each of PROGNAME-LIST
4501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4502for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4503do
4504 IFS=$as_save_IFS
4505 test -z "$as_dir" && as_dir=.
4506 for ac_prog in grep ggrep; do
4507 for ac_exec_ext in '' $ac_executable_extensions; do
4508 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4509 as_fn_executable_p "$ac_path_GREP" || continue
4510# Check for GNU ac_path_GREP and select it if it is found.
4511 # Check for GNU $ac_path_GREP
4512case `"$ac_path_GREP" --version 2>&1` in
4513*GNU*)
4514 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4515*)
4516 ac_count=0
4517 $as_echo_n 0123456789 >"conftest.in"
4518 while :
4519 do
4520 cat "conftest.in" "conftest.in" >"conftest.tmp"
4521 mv "conftest.tmp" "conftest.in"
4522 cp "conftest.in" "conftest.nl"
4523 $as_echo 'GREP' >> "conftest.nl"
4524 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4525 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4526 as_fn_arith $ac_count + 1 && ac_count=$as_val
4527 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4528 # Best one so far, save it but keep looking for a better one
4529 ac_cv_path_GREP="$ac_path_GREP"
4530 ac_path_GREP_max=$ac_count
4531 fi
4532 # 10*(2^10) chars as input seems more than enough
4533 test $ac_count -gt 10 && break
4534 done
4535 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4536esac
4537
4538 $ac_path_GREP_found && break 3
4539 done
4540 done
4541 done
4542IFS=$as_save_IFS
4543 if test -z "$ac_cv_path_GREP"; then
4544 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4545 fi
4546else
4547 ac_cv_path_GREP=$GREP
4548fi
4549
4550fi
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4552$as_echo "$ac_cv_path_GREP" >&6; }
4553 GREP="$ac_cv_path_GREP"
4554
4555
Łukasz Langaa785c872016-09-09 17:37:37 -07004556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4557$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4558if ${ac_cv_path_SED+:} false; then :
4559 $as_echo_n "(cached) " >&6
4560else
4561 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4562 for ac_i in 1 2 3 4 5 6 7; do
4563 ac_script="$ac_script$as_nl$ac_script"
4564 done
4565 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4566 { ac_script=; unset ac_script;}
4567 if test -z "$SED"; then
4568 ac_path_SED_found=false
4569 # Loop through the user's path and test for each of PROGNAME-LIST
4570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4571for as_dir in $PATH
4572do
4573 IFS=$as_save_IFS
4574 test -z "$as_dir" && as_dir=.
4575 for ac_prog in sed gsed; do
4576 for ac_exec_ext in '' $ac_executable_extensions; do
4577 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4578 as_fn_executable_p "$ac_path_SED" || continue
4579# Check for GNU ac_path_SED and select it if it is found.
4580 # Check for GNU $ac_path_SED
4581case `"$ac_path_SED" --version 2>&1` in
4582*GNU*)
4583 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4584*)
4585 ac_count=0
4586 $as_echo_n 0123456789 >"conftest.in"
4587 while :
4588 do
4589 cat "conftest.in" "conftest.in" >"conftest.tmp"
4590 mv "conftest.tmp" "conftest.in"
4591 cp "conftest.in" "conftest.nl"
4592 $as_echo '' >> "conftest.nl"
4593 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4594 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4595 as_fn_arith $ac_count + 1 && ac_count=$as_val
4596 if test $ac_count -gt ${ac_path_SED_max-0}; then
4597 # Best one so far, save it but keep looking for a better one
4598 ac_cv_path_SED="$ac_path_SED"
4599 ac_path_SED_max=$ac_count
4600 fi
4601 # 10*(2^10) chars as input seems more than enough
4602 test $ac_count -gt 10 && break
4603 done
4604 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4605esac
4606
4607 $ac_path_SED_found && break 3
4608 done
4609 done
4610 done
4611IFS=$as_save_IFS
4612 if test -z "$ac_cv_path_SED"; then
4613 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4614 fi
4615else
4616 ac_cv_path_SED=$SED
4617fi
4618
4619fi
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4621$as_echo "$ac_cv_path_SED" >&6; }
4622 SED="$ac_cv_path_SED"
4623 rm -f conftest.sed
4624
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004625
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004626
4627
Matthias Kloseb9621712010-04-24 17:59:49 +00004628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4629$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004632if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004633 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004634
4635 case $withval in
4636 no) with_cxx_main=no
4637 MAINCC='$(CC)';;
4638 yes) with_cxx_main=yes
4639 MAINCC='$(CXX)';;
4640 *) with_cxx_main=yes
4641 MAINCC=$withval
4642 if test -z "$CXX"
4643 then
4644 CXX=$withval
4645 fi;;
4646 esac
4647else
4648
4649 with_cxx_main=no
4650 MAINCC='$(CC)'
4651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004652fi
4653
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4655$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004656
4657preset_cxx="$CXX"
4658if test -z "$CXX"
4659then
4660 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004661 gcc) if test -n "$ac_tool_prefix"; then
4662 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4663set dummy ${ac_tool_prefix}g++; ac_word=$2
4664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4665$as_echo_n "checking for $ac_word... " >&6; }
4666if ${ac_cv_path_CXX+:} false; then :
4667 $as_echo_n "(cached) " >&6
4668else
4669 case $CXX in
4670 [\\/]* | ?:[\\/]*)
4671 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4672 ;;
4673 *)
4674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4675for as_dir in notfound
4676do
4677 IFS=$as_save_IFS
4678 test -z "$as_dir" && as_dir=.
4679 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4683 break 2
4684 fi
4685done
4686 done
4687IFS=$as_save_IFS
4688
4689 ;;
4690esac
4691fi
4692CXX=$ac_cv_path_CXX
4693if test -n "$CXX"; then
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4695$as_echo "$CXX" >&6; }
4696else
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4698$as_echo "no" >&6; }
4699fi
4700
4701
4702fi
4703if test -z "$ac_cv_path_CXX"; then
4704 ac_pt_CXX=$CXX
4705 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004709if ${ac_cv_path_ac_pt_CXX+:} false; then :
4710 $as_echo_n "(cached) " >&6
4711else
4712 case $ac_pt_CXX in
4713 [\\/]* | ?:[\\/]*)
4714 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4715 ;;
4716 *)
4717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in notfound
4719do
4720 IFS=$as_save_IFS
4721 test -z "$as_dir" && as_dir=.
4722 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004724 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726 break 2
4727 fi
4728done
4729 done
4730IFS=$as_save_IFS
4731
4732 ;;
4733esac
4734fi
4735ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4736if test -n "$ac_pt_CXX"; then
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4738$as_echo "$ac_pt_CXX" >&6; }
4739else
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744 if test "x$ac_pt_CXX" = x; then
4745 CXX="g++"
4746 else
4747 case $cross_compiling:$ac_tool_warned in
4748yes:)
4749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4751ac_tool_warned=yes ;;
4752esac
4753 CXX=$ac_pt_CXX
4754 fi
4755else
4756 CXX="$ac_cv_path_CXX"
4757fi
4758 ;;
4759 cc) if test -n "$ac_tool_prefix"; then
4760 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4761set dummy ${ac_tool_prefix}c++; ac_word=$2
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4763$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004764if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766else
4767 case $CXX in
4768 [\\/]* | ?:[\\/]*)
4769 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4770 ;;
4771 *)
4772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773for as_dir in notfound
4774do
4775 IFS=$as_save_IFS
4776 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004777 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781 break 2
4782 fi
4783done
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004785IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787 ;;
4788esac
4789fi
4790CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4793$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794else
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004798
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799
4800fi
4801if test -z "$ac_cv_path_CXX"; then
4802 ac_pt_CXX=$CXX
4803 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004807if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004808 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 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 +00004813 ;;
4814 *)
4815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816for as_dir in notfound
4817do
4818 IFS=$as_save_IFS
4819 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 break 2
4825 fi
4826done
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004828IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 ;;
4831esac
4832fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4834if test -n "$ac_pt_CXX"; then
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4836$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004837else
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004841
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004842 if test "x$ac_pt_CXX" = x; then
4843 CXX="c++"
4844 else
4845 case $cross_compiling:$ac_tool_warned in
4846yes:)
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4848$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4849ac_tool_warned=yes ;;
4850esac
4851 CXX=$ac_pt_CXX
4852 fi
4853else
4854 CXX="$ac_cv_path_CXX"
4855fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004856 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004857 clang|*/clang) if test -n "$ac_tool_prefix"; then
4858 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4859set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861$as_echo_n "checking for $ac_word... " >&6; }
4862if ${ac_cv_path_CXX+:} false; then :
4863 $as_echo_n "(cached) " >&6
4864else
4865 case $CXX in
4866 [\\/]* | ?:[\\/]*)
4867 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4868 ;;
4869 *)
4870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in notfound
4872do
4873 IFS=$as_save_IFS
4874 test -z "$as_dir" && as_dir=.
4875 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004877 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879 break 2
4880 fi
4881done
4882 done
4883IFS=$as_save_IFS
4884
Ned Deilycbfb9a52012-06-23 16:02:19 -07004885 ;;
4886esac
4887fi
4888CXX=$ac_cv_path_CXX
4889if test -n "$CXX"; then
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4891$as_echo "$CXX" >&6; }
4892else
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004897
4898fi
4899if test -z "$ac_cv_path_CXX"; then
4900 ac_pt_CXX=$CXX
4901 # Extract the first word of "clang++", so it can be a program name with args.
4902set dummy clang++; ac_word=$2
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904$as_echo_n "checking for $ac_word... " >&6; }
4905if ${ac_cv_path_ac_pt_CXX+:} false; then :
4906 $as_echo_n "(cached) " >&6
4907else
4908 case $ac_pt_CXX in
4909 [\\/]* | ?:[\\/]*)
4910 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4911 ;;
4912 *)
4913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in notfound
4915do
4916 IFS=$as_save_IFS
4917 test -z "$as_dir" && as_dir=.
4918 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004920 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922 break 2
4923 fi
4924done
4925 done
4926IFS=$as_save_IFS
4927
4928 ;;
4929esac
4930fi
4931ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4932if test -n "$ac_pt_CXX"; then
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4934$as_echo "$ac_pt_CXX" >&6; }
4935else
4936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937$as_echo "no" >&6; }
4938fi
4939
4940 if test "x$ac_pt_CXX" = x; then
4941 CXX="clang++"
4942 else
4943 case $cross_compiling:$ac_tool_warned in
4944yes:)
4945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4947ac_tool_warned=yes ;;
4948esac
4949 CXX=$ac_pt_CXX
4950 fi
4951else
4952 CXX="$ac_cv_path_CXX"
4953fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004954 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004955 icc|*/icc) if test -n "$ac_tool_prefix"; then
4956 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4957set dummy ${ac_tool_prefix}icpc; ac_word=$2
4958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4959$as_echo_n "checking for $ac_word... " >&6; }
4960if ${ac_cv_path_CXX+:} false; then :
4961 $as_echo_n "(cached) " >&6
4962else
4963 case $CXX in
4964 [\\/]* | ?:[\\/]*)
4965 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4966 ;;
4967 *)
4968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4969for as_dir in notfound
4970do
4971 IFS=$as_save_IFS
4972 test -z "$as_dir" && as_dir=.
4973 for ac_exec_ext in '' $ac_executable_extensions; do
4974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4977 break 2
4978 fi
4979done
4980 done
4981IFS=$as_save_IFS
4982
4983 ;;
4984esac
4985fi
4986CXX=$ac_cv_path_CXX
4987if test -n "$CXX"; then
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4989$as_echo "$CXX" >&6; }
4990else
4991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
4993fi
4994
4995
4996fi
4997if test -z "$ac_cv_path_CXX"; then
4998 ac_pt_CXX=$CXX
4999 # Extract the first word of "icpc", so it can be a program name with args.
5000set dummy icpc; ac_word=$2
5001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if ${ac_cv_path_ac_pt_CXX+:} false; then :
5004 $as_echo_n "(cached) " >&6
5005else
5006 case $ac_pt_CXX in
5007 [\\/]* | ?:[\\/]*)
5008 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5009 ;;
5010 *)
5011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in notfound
5013do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
5016 for ac_exec_ext in '' $ac_executable_extensions; do
5017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020 break 2
5021 fi
5022done
5023 done
5024IFS=$as_save_IFS
5025
5026 ;;
5027esac
5028fi
5029ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5030if test -n "$ac_pt_CXX"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5032$as_echo "$ac_pt_CXX" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038 if test "x$ac_pt_CXX" = x; then
5039 CXX="icpc"
5040 else
5041 case $cross_compiling:$ac_tool_warned in
5042yes:)
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5045ac_tool_warned=yes ;;
5046esac
5047 CXX=$ac_pt_CXX
5048 fi
5049else
5050 CXX="$ac_cv_path_CXX"
5051fi
5052 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005053 esac
5054 if test "$CXX" = "notfound"
5055 then
5056 CXX=""
5057 fi
5058fi
5059if test -z "$CXX"
5060then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005061 if test -n "$ac_tool_prefix"; then
5062 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5063 do
5064 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005068if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005070else
5071 if test -n "$CXX"; then
5072 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5073else
5074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077 IFS=$as_save_IFS
5078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005081 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083 break 2
5084 fi
5085done
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088
5089fi
5090fi
5091CXX=$ac_cv_prog_CXX
5092if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5094$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095else
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005098fi
5099
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005101 test -n "$CXX" && break
5102 done
5103fi
5104if test -z "$CXX"; then
5105 ac_ct_CXX=$CXX
5106 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5107do
5108 # Extract the first word of "$ac_prog", so it can be a program name with args.
5109set dummy $ac_prog; ac_word=$2
5110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111$as_echo_n "checking for $ac_word... " >&6; }
5112if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5113 $as_echo_n "(cached) " >&6
5114else
5115 if test -n "$ac_ct_CXX"; then
5116 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5117else
5118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5119for as_dir in $PATH
5120do
5121 IFS=$as_save_IFS
5122 test -z "$as_dir" && as_dir=.
5123 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005125 ac_cv_prog_ac_ct_CXX="$ac_prog"
5126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5127 break 2
5128 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005130 done
5131IFS=$as_save_IFS
5132
5133fi
5134fi
5135ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5136if test -n "$ac_ct_CXX"; then
5137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5138$as_echo "$ac_ct_CXX" >&6; }
5139else
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141$as_echo "no" >&6; }
5142fi
5143
5144
5145 test -n "$ac_ct_CXX" && break
5146done
5147
5148 if test "x$ac_ct_CXX" = x; then
5149 CXX="notfound"
5150 else
5151 case $cross_compiling:$ac_tool_warned in
5152yes:)
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5155ac_tool_warned=yes ;;
5156esac
5157 CXX=$ac_ct_CXX
5158 fi
5159fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005160
5161 if test "$CXX" = "notfound"
5162 then
5163 CXX=""
5164 fi
5165fi
5166if test "$preset_cxx" != "$CXX"
5167then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005168 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005169
5170 By default, distutils will build C++ extension modules with \"$CXX\".
5171 If this is not intended, then set CXX on the configure command line.
5172 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005173$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005174
5175 By default, distutils will build C++ extension modules with \"$CXX\".
5176 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005177 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178fi
5179
5180
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005181MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5182
5183
5184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5185$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5186cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005187#undef bfin
5188#undef cris
5189#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005190#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005191#undef hppa
5192#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005193#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005195#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005196#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005198#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005199 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005200#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005201# if defined(__x86_64__) && defined(__LP64__)
5202 x86_64-linux-gnu
5203# elif defined(__x86_64__) && defined(__ILP32__)
5204 x86_64-linux-gnux32
5205# elif defined(__i386__)
5206 i386-linux-gnu
5207# elif defined(__aarch64__) && defined(__AARCH64EL__)
5208# if defined(__ILP32__)
5209 aarch64_ilp32-linux-gnu
5210# else
5211 aarch64-linux-gnu
5212# endif
5213# elif defined(__aarch64__) && defined(__AARCH64EB__)
5214# if defined(__ILP32__)
5215 aarch64_be_ilp32-linux-gnu
5216# else
5217 aarch64_be-linux-gnu
5218# endif
5219# elif defined(__alpha__)
5220 alpha-linux-gnu
5221# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5222# if defined(__ARMEL__)
5223 arm-linux-gnueabihf
5224# else
5225 armeb-linux-gnueabihf
5226# endif
5227# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5228# if defined(__ARMEL__)
5229 arm-linux-gnueabi
5230# else
5231 armeb-linux-gnueabi
5232# endif
5233# elif defined(__hppa__)
5234 hppa-linux-gnu
5235# elif defined(__ia64__)
5236 ia64-linux-gnu
5237# elif defined(__m68k__) && !defined(__mcoldfire__)
5238 m68k-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005239# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5240# if _MIPS_SIM == _ABIO32
5241 mipsisa32r6el-linux-gnu
5242# elif _MIPS_SIM == _ABIN32
5243 mipsisa64r6el-linux-gnuabin32
5244# elif _MIPS_SIM == _ABI64
5245 mipsisa64r6el-linux-gnuabi64
5246# else
5247# error unknown platform triplet
5248# endif
5249# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5250# if _MIPS_SIM == _ABIO32
5251 mipsisa32r6-linux-gnu
5252# elif _MIPS_SIM == _ABIN32
5253 mipsisa64r6-linux-gnuabin32
5254# elif _MIPS_SIM == _ABI64
5255 mipsisa64r6-linux-gnuabi64
5256# else
5257# error unknown platform triplet
5258# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005259# elif defined(__mips_hard_float) && defined(_MIPSEL)
5260# if _MIPS_SIM == _ABIO32
5261 mipsel-linux-gnu
5262# elif _MIPS_SIM == _ABIN32
5263 mips64el-linux-gnuabin32
5264# elif _MIPS_SIM == _ABI64
5265 mips64el-linux-gnuabi64
5266# else
5267# error unknown platform triplet
5268# endif
5269# elif defined(__mips_hard_float)
5270# if _MIPS_SIM == _ABIO32
5271 mips-linux-gnu
5272# elif _MIPS_SIM == _ABIN32
5273 mips64-linux-gnuabin32
5274# elif _MIPS_SIM == _ABI64
5275 mips64-linux-gnuabi64
5276# else
5277# error unknown platform triplet
5278# endif
5279# elif defined(__or1k__)
5280 or1k-linux-gnu
5281# elif defined(__powerpc__) && defined(__SPE__)
5282 powerpc-linux-gnuspe
5283# elif defined(__powerpc64__)
5284# if defined(__LITTLE_ENDIAN__)
5285 powerpc64le-linux-gnu
5286# else
5287 powerpc64-linux-gnu
5288# endif
5289# elif defined(__powerpc__)
5290 powerpc-linux-gnu
5291# elif defined(__s390x__)
5292 s390x-linux-gnu
5293# elif defined(__s390__)
5294 s390-linux-gnu
5295# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5296 sh4-linux-gnu
5297# elif defined(__sparc__) && defined(__arch64__)
5298 sparc64-linux-gnu
5299# elif defined(__sparc__)
5300 sparc-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005301# elif defined(__riscv)
5302# if __riscv_xlen == 32
5303 riscv32-linux-gnu
5304# elif __riscv_xlen == 64
5305 riscv64-linux-gnu
5306# else
5307# error unknown platform triplet
5308# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005309# else
5310# error unknown platform triplet
5311# endif
5312#elif defined(__FreeBSD_kernel__)
5313# if defined(__LP64__)
5314 x86_64-kfreebsd-gnu
5315# elif defined(__i386__)
5316 i386-kfreebsd-gnu
5317# else
5318# error unknown platform triplet
5319# endif
5320#elif defined(__gnu_hurd__)
5321 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005322#elif defined(__APPLE__)
5323 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005324#else
5325# error unknown platform triplet
5326#endif
5327
5328EOF
5329
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005330if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005331 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5333$as_echo "$PLATFORM_TRIPLET" >&6; }
5334else
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5336$as_echo "none" >&6; }
5337fi
5338rm -f conftest.c conftest.out
5339
5340if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5341 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5342 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5343 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005344elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5345 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005347
doko@ubuntu.com55532312016-06-14 08:55:19 +02005348if test x$MULTIARCH != x; then
5349 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5350fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005351
5352
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5354$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5355save_LDFLAGS="$LDFLAGS"
5356LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005357
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359/* end confdefs.h. */
5360
5361int
5362main ()
5363{
5364
5365 ;
5366 return 0;
5367}
5368_ACEOF
5369if ac_fn_c_try_link "$LINENO"; then :
5370 NO_AS_NEEDED="-Wl,--no-as-needed"
5371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5372$as_echo "yes" >&6; }
5373else
5374 NO_AS_NEEDED=""
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376$as_echo "no" >&6; }
5377fi
5378rm -f core conftest.err conftest.$ac_objext \
5379 conftest$ac_exeext conftest.$ac_ext
5380LDFLAGS="$save_LDFLAGS"
5381
5382
5383
5384# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385
Matthias Kloseb9621712010-04-24 17:59:49 +00005386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5387$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005388if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390else
5391 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5392 then ac_cv_path_EGREP="$GREP -E"
5393 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 # Loop through the user's path and test for each of PROGNAME-LIST
5397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5399do
5400 IFS=$as_save_IFS
5401 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 for ac_prog in egrep; do
5403 for ac_exec_ext in '' $ac_executable_extensions; do
5404 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005405 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005406# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407 # Check for GNU $ac_path_EGREP
5408case `"$ac_path_EGREP" --version 2>&1` in
5409*GNU*)
5410 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5411*)
5412 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 while :
5415 do
5416 cat "conftest.in" "conftest.in" >"conftest.tmp"
5417 mv "conftest.tmp" "conftest.in"
5418 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5421 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5424 # Best one so far, save it but keep looking for a better one
5425 ac_cv_path_EGREP="$ac_path_EGREP"
5426 ac_path_EGREP_max=$ac_count
5427 fi
5428 # 10*(2^10) chars as input seems more than enough
5429 test $ac_count -gt 10 && break
5430 done
5431 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5432esac
5433
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $ac_path_EGREP_found && break 3
5435 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005440 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 +00005441 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442else
5443 ac_cv_path_EGREP=$EGREP
5444fi
5445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446 fi
5447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5449$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005450 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005451
5452
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5454$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005455if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 $as_echo_n "(cached) " >&6
5457else
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005459/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005460#include <stdlib.h>
5461#include <stdarg.h>
5462#include <string.h>
5463#include <float.h>
5464
5465int
5466main ()
5467{
5468
5469 ;
5470 return 0;
5471}
5472_ACEOF
5473if ac_fn_c_try_compile "$LINENO"; then :
5474 ac_cv_header_stdc=yes
5475else
5476 ac_cv_header_stdc=no
5477fi
5478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5479
5480if test $ac_cv_header_stdc = yes; then
5481 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483/* end confdefs.h. */
5484#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005485
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005486_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005490else
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005492fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005493rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494
Matthias Kloseb9621712010-04-24 17:59:49 +00005495fi
5496
5497if test $ac_cv_header_stdc = yes; then
5498 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5500/* end confdefs.h. */
5501#include <stdlib.h>
5502
5503_ACEOF
5504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5505 $EGREP "free" >/dev/null 2>&1; then :
5506
5507else
5508 ac_cv_header_stdc=no
5509fi
5510rm -f conftest*
5511
5512fi
5513
5514if test $ac_cv_header_stdc = yes; then
5515 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5516 if test "$cross_compiling" = yes; then :
5517 :
5518else
5519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5520/* end confdefs.h. */
5521#include <ctype.h>
5522#include <stdlib.h>
5523#if ((' ' & 0x0FF) == 0x020)
5524# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5525# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5526#else
5527# define ISLOWER(c) \
5528 (('a' <= (c) && (c) <= 'i') \
5529 || ('j' <= (c) && (c) <= 'r') \
5530 || ('s' <= (c) && (c) <= 'z'))
5531# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5532#endif
5533
5534#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5535int
5536main ()
5537{
5538 int i;
5539 for (i = 0; i < 256; i++)
5540 if (XOR (islower (i), ISLOWER (i))
5541 || toupper (i) != TOUPPER (i))
5542 return 2;
5543 return 0;
5544}
5545_ACEOF
5546if ac_fn_c_try_run "$LINENO"; then :
5547
5548else
5549 ac_cv_header_stdc=no
5550fi
5551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5552 conftest.$ac_objext conftest.beam conftest.$ac_ext
5553fi
5554
5555fi
5556fi
5557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5558$as_echo "$ac_cv_header_stdc" >&6; }
5559if test $ac_cv_header_stdc = yes; then
5560
5561$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5562
5563fi
5564
5565# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5566for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5567 inttypes.h stdint.h unistd.h
5568do :
5569 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5570ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5571"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005572if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 cat >>confdefs.h <<_ACEOF
5574#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5575_ACEOF
5576
5577fi
5578
5579done
5580
5581
5582
5583 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 +02005584if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005585 MINIX=yes
5586else
5587 MINIX=
5588fi
5589
5590
5591 if test "$MINIX" = yes; then
5592
5593$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5594
5595
5596$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5597
5598
5599$as_echo "#define _MINIX 1" >>confdefs.h
5600
5601 fi
5602
5603
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5605$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005606if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005607 $as_echo_n "(cached) " >&6
5608else
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610/* end confdefs.h. */
5611
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005612# define __EXTENSIONS__ 1
5613 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005614int
5615main ()
5616{
5617
5618 ;
5619 return 0;
5620}
5621_ACEOF
5622if ac_fn_c_try_compile "$LINENO"; then :
5623 ac_cv_safe_to_define___extensions__=yes
5624else
5625 ac_cv_safe_to_define___extensions__=no
5626fi
5627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5628fi
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5630$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5631 test $ac_cv_safe_to_define___extensions__ = yes &&
5632 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5633
5634 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5635
5636 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5637
5638 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5639
5640 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5641
5642
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643
Xavier de Gaye95750b12016-07-09 11:05:42 +02005644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5645$as_echo_n "checking for the Android API level... " >&6; }
5646cat >> conftest.c <<EOF
5647#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005648android_api = __ANDROID_API__
5649arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005650#else
5651#error not Android
5652#endif
5653EOF
5654
5655if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005656 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5657 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5659$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005660 if test -z "$ANDROID_API_LEVEL"; then
5661 echo 'Fatal: you must define __ANDROID_API__'
5662 exit 1
5663 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005664
5665cat >>confdefs.h <<_ACEOF
5666#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5667_ACEOF
5668
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005669
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5671$as_echo_n "checking for the Android arm ABI... " >&6; }
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5673$as_echo "$_arm_arch" >&6; }
5674 if test "$_arm_arch" = 7; then
5675 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5676 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5677 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005678else
5679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5680$as_echo "not Android" >&6; }
5681fi
5682rm -f conftest.c conftest.out
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684# Check for unsupported systems
5685case $ac_sys_system/$ac_sys_release in
5686atheos*|Linux*/1*)
5687 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5688 echo See README for details.
5689 exit 1;;
5690esac
5691
5692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5694$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
5696# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005697if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 withval=$with_suffix;
5699 case $withval in
5700 no) EXEEXT=;;
5701 yes) EXEEXT=.exe;;
5702 *) EXEEXT=$withval;;
5703 esac
5704fi
5705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5707$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709# Test whether we're running on a non-case-sensitive system, in which
5710# case we give a warning if no ext is given
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5713$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714if test ! -d CaseSensitiveTestDir; then
5715mkdir CaseSensitiveTestDir
5716fi
5717
5718if test -d casesensitivetestdir
5719then
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5721$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722 BUILDEXEEXT=.exe
5723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 BUILDEXEEXT=$EXEEXT
5727fi
5728rmdir CaseSensitiveTestDir
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730case $ac_sys_system in
5731hp*|HP*)
5732 case $CC in
5733 cc|*/cc) CC="$CC -Ae";;
5734 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735esac
5736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5739$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LIBRARY"
5741then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005742 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5745$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# LDLIBRARY is the name of the library to link against (as opposed to the
5748# name of the library into which to insert object files). BLDLIBRARY is also
5749# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5750# is blank as the main program is not linked directly against LDLIBRARY.
5751# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5752# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5753# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5754# DLLLIBRARY is the shared (i.e., DLL) library.
5755#
5756# RUNSHARED is used to run shared python without installed libraries
5757#
5758# INSTSONAME is the name of the shared library that will be use to install
5759# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005760#
5761# LDVERSION is the shared library version number, normally the Python version
5762# with the ABI build flags appended.
5763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764
5765
5766
5767
5768
5769
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771LDLIBRARY="$LIBRARY"
5772BLDLIBRARY='$(LDLIBRARY)'
5773INSTSONAME='$(LDLIBRARY)'
5774DLLLIBRARY=''
5775LDLIBRARYDIR=''
5776RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005777LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779# LINKCC is the command that links the python executable -- default is $(CC).
5780# If CXX is set, and if it is needed to link a main function that was
5781# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5782# python might then depend on the C++ runtime
5783# This is altered for AIX in order to build the export list before
5784# linking.
5785
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5787$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788if test -z "$LINKCC"
5789then
5790 LINKCC='$(PURIFY) $(MAINCC)'
5791 case $ac_sys_system in
5792 AIX*)
5793 exp_extra="\"\""
5794 if test $ac_sys_release -ge 5 -o \
5795 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5796 exp_extra="."
5797 fi
5798 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 QNX*)
5800 # qcc must be used because the other compilers do not
5801 # support -N.
5802 LINKCC=qcc;;
5803 esac
5804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5806$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807
5808# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5809# make sure we default having it set to "no": this is used by
5810# distutils.unixccompiler to know if it should add --enable-new-dtags
5811# to linker command lines, and failing to detect GNU ld simply results
5812# in the same bahaviour as before.
5813
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5815$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816ac_prog=ld
5817if test "$GCC" = yes; then
5818 ac_prog=`$CC -print-prog-name=ld`
5819fi
5820case `"$ac_prog" -V 2>&1 < /dev/null` in
5821 *GNU*)
5822 GNULD=yes;;
5823 *)
5824 GNULD=no;;
5825esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5827$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5830$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005832if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833 enableval=$enable_shared;
5834fi
5835
5836
5837if test -z "$enable_shared"
5838then
5839 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005840 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841 enable_shared="yes";;
5842 *)
5843 enable_shared="no";;
5844 esac
5845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5847$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5850$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005852if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005853 enableval=$enable_profiling;
5854fi
5855
5856if test "x$enable_profiling" = xyes; then
5857 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005858 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860/* end confdefs.h. */
5861int main() { return 0; }
5862_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005863if ac_fn_c_try_link "$LINENO"; then :
5864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868rm -f core conftest.err conftest.$ac_objext \
5869 conftest$ac_exeext conftest.$ac_ext
5870 CC="$ac_save_cc"
5871else
5872 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5875$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
doko@ubuntu.comba015832012-06-30 16:52:05 +02005877if test "x$enable_profiling" = xyes; then
5878 BASECFLAGS="-pg $BASECFLAGS"
5879 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
5881
Matthias Kloseb9621712010-04-24 17:59:49 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5883$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884
5885# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5886# library that we build, but we do not want to link against it (we
5887# will find it with a -framework option). For this reason there is an
5888# extra variable BLDLIBRARY against which Python and the extension
5889# modules are linked, BLDLIBRARY. This is normally the same as
5890# LDLIBRARY, but empty for MacOSX framework builds.
5891if test "$enable_framework"
5892then
5893 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005894 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 BLDLIBRARY=''
5896else
5897 BLDLIBRARY='$(LDLIBRARY)'
5898fi
5899
5900# Other platforms follow
5901if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005902 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
Matthias Kloseb9621712010-04-24 17:59:49 +00005904$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
5906 case $ac_sys_system in
5907 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).dll.a'
5909 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
5911 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).so'
5913 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005916 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005917 then
5918 PY3LIBRARY=libpython3.so
5919 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005921 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).so'
5923 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005926 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005927 then
5928 PY3LIBRARY=libpython3.so
5929 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 ;;
5931 hp*|HP*)
5932 case `uname -m` in
5933 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005940 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005941 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005944 LDLIBRARY='libpython$(LDVERSION).dylib'
5945 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005948 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005950 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005951 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
5953 esac
5954else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005955 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 case $ac_sys_system in
5957 CYGWIN*)
5958 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005959 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
5961 esac
5962fi
5963
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005964if test "$cross_compiling" = yes; then
5965 RUNSHARED=
5966fi
5967
Matthias Kloseb9621712010-04-24 17:59:49 +00005968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5969$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005972if test -n "$ac_tool_prefix"; then
5973 for ac_prog in ar aal
5974 do
5975 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5976set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005979if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 if test -n "$AR"; then
5983 ac_cv_prog_AR="$AR" # Let the user override the test.
5984else
5985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988 IFS=$as_save_IFS
5989 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005992 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 break 2
5995 fi
5996done
Matthias Kloseb9621712010-04-24 17:59:49 +00005997 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998IFS=$as_save_IFS
5999
6000fi
6001fi
6002AR=$ac_cv_prog_AR
6003if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6005$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006else
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009fi
6010
6011
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006012 test -n "$AR" && break
6013 done
6014fi
6015if test -z "$AR"; then
6016 ac_ct_AR=$AR
6017 for ac_prog in ar aal
6018do
6019 # Extract the first word of "$ac_prog", so it can be a program name with args.
6020set dummy $ac_prog; ac_word=$2
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6022$as_echo_n "checking for $ac_word... " >&6; }
6023if ${ac_cv_prog_ac_ct_AR+:} false; then :
6024 $as_echo_n "(cached) " >&6
6025else
6026 if test -n "$ac_ct_AR"; then
6027 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6028else
6029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6030for as_dir in $PATH
6031do
6032 IFS=$as_save_IFS
6033 test -z "$as_dir" && as_dir=.
6034 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006036 ac_cv_prog_ac_ct_AR="$ac_prog"
6037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6038 break 2
6039 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006041 done
6042IFS=$as_save_IFS
6043
6044fi
6045fi
6046ac_ct_AR=$ac_cv_prog_ac_ct_AR
6047if test -n "$ac_ct_AR"; then
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6049$as_echo "$ac_ct_AR" >&6; }
6050else
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6052$as_echo "no" >&6; }
6053fi
6054
6055
6056 test -n "$ac_ct_AR" && break
6057done
6058
6059 if test "x$ac_ct_AR" = x; then
6060 AR="ar"
6061 else
6062 case $cross_compiling:$ac_tool_warned in
6063yes:)
6064{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6065$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6066ac_tool_warned=yes ;;
6067esac
6068 AR=$ac_ct_AR
6069 fi
6070fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071
6072
6073# tweak ARFLAGS only if the user didn't set it on the command line
6074
6075if test -z "$ARFLAGS"
6076then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006077 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078fi
6079
doko@ubuntu.com58844492012-06-30 18:25:32 +02006080if test -n "$ac_tool_prefix"; then
6081 for ac_prog in readelf
6082 do
6083 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6084set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
6087if ${ac_cv_prog_READELF+:} false; then :
6088 $as_echo_n "(cached) " >&6
6089else
6090 if test -n "$READELF"; then
6091 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6092else
6093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096 IFS=$as_save_IFS
6097 test -z "$as_dir" && as_dir=.
6098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006100 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6102 break 2
6103 fi
6104done
6105 done
6106IFS=$as_save_IFS
6107
6108fi
6109fi
6110READELF=$ac_cv_prog_READELF
6111if test -n "$READELF"; then
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6113$as_echo "$READELF" >&6; }
6114else
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6116$as_echo "no" >&6; }
6117fi
6118
6119
6120 test -n "$READELF" && break
6121 done
6122fi
6123if test -z "$READELF"; then
6124 ac_ct_READELF=$READELF
6125 for ac_prog in readelf
6126do
6127 # Extract the first word of "$ac_prog", so it can be a program name with args.
6128set dummy $ac_prog; ac_word=$2
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6130$as_echo_n "checking for $ac_word... " >&6; }
6131if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6132 $as_echo_n "(cached) " >&6
6133else
6134 if test -n "$ac_ct_READELF"; then
6135 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6136else
6137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
6142 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006144 ac_cv_prog_ac_ct_READELF="$ac_prog"
6145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146 break 2
6147 fi
6148done
6149 done
6150IFS=$as_save_IFS
6151
6152fi
6153fi
6154ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6155if test -n "$ac_ct_READELF"; then
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6157$as_echo "$ac_ct_READELF" >&6; }
6158else
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
6161fi
6162
6163
6164 test -n "$ac_ct_READELF" && break
6165done
6166
6167 if test "x$ac_ct_READELF" = x; then
6168 READELF=":"
6169 else
6170 case $cross_compiling:$ac_tool_warned in
6171yes:)
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6173$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6174ac_tool_warned=yes ;;
6175esac
6176 READELF=$ac_ct_READELF
6177 fi
6178fi
6179
6180if test "$cross_compiling" = yes; then
6181 case "$READELF" in
6182 readelf|:)
6183 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6184 ;;
6185 esac
6186fi
6187
6188
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006191hp*|HP*)
6192 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193 if test -z "$INSTALL"
6194 then
6195 INSTALL="${srcdir}/install-sh -c"
6196 fi
6197esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198# Find a good install program. We prefer a C program (faster),
6199# so one script is as good as another. But avoid the broken or
6200# incompatible versions:
6201# SysV /etc/install, /usr/sbin/install
6202# SunOS /usr/etc/install
6203# IRIX /sbin/install
6204# AIX /bin/install
6205# AmigaOS /C/install, which installs bootblocks on floppy discs
6206# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6207# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6208# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6209# OS/2's system install, which has a completely different semantic
6210# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006211# Reject install programs that cannot install multiple files.
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6213$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006215if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217else
6218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221 IFS=$as_save_IFS
6222 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 # Account for people who put trailing slashes in PATH elements.
6224case $as_dir/ in #((
6225 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006227 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 /usr/ucb/* ) ;;
6229 *)
6230 # OSF1 and SCO ODT 3.0 have their own names for install.
6231 # Don't use installbsd from OSF since it installs stuff as root
6232 # by default.
6233 for ac_prog in ginstall scoinst install; do
6234 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006235 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 if test $ac_prog = install &&
6237 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6238 # AIX install. It has an incompatible calling convention.
6239 :
6240 elif test $ac_prog = install &&
6241 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6242 # program-specific install script used by HP pwplus--don't use.
6243 :
6244 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 rm -rf conftest.one conftest.two conftest.dir
6246 echo one > conftest.one
6247 echo two > conftest.two
6248 mkdir conftest.dir
6249 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6250 test -s conftest.one && test -s conftest.two &&
6251 test -s conftest.dir/conftest.one &&
6252 test -s conftest.dir/conftest.two
6253 then
6254 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6255 break 3
6256 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257 fi
6258 fi
6259 done
6260 done
6261 ;;
6262esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006263
6264 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265IFS=$as_save_IFS
6266
Matthias Kloseb9621712010-04-24 17:59:49 +00006267rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268
6269fi
6270 if test "${ac_cv_path_install+set}" = set; then
6271 INSTALL=$ac_cv_path_install
6272 else
6273 # As a last resort, use the slow shell script. Don't cache a
6274 # value for INSTALL within a source directory, because that will
6275 # break other packages using the cache if that directory is
6276 # removed, or if the value is a relative name.
6277 INSTALL=$ac_install_sh
6278 fi
6279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6281$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282
6283# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6284# It thinks the first close brace ends the variable substitution.
6285test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6286
6287test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6288
6289test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6290
Matthias Klose93a0ef12012-03-15 18:08:34 +01006291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6292$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6293if test -z "$MKDIR_P"; then
6294 if ${ac_cv_path_mkdir+:} false; then :
6295 $as_echo_n "(cached) " >&6
6296else
6297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6298for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6299do
6300 IFS=$as_save_IFS
6301 test -z "$as_dir" && as_dir=.
6302 for ac_prog in mkdir gmkdir; do
6303 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006304 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006305 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6306 'mkdir (GNU coreutils) '* | \
6307 'mkdir (coreutils) '* | \
6308 'mkdir (fileutils) '4.1*)
6309 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6310 break 3;;
6311 esac
6312 done
6313 done
6314 done
6315IFS=$as_save_IFS
6316
6317fi
6318
6319 test -d ./--version && rmdir ./--version
6320 if test "${ac_cv_path_mkdir+set}" = set; then
6321 MKDIR_P="$ac_cv_path_mkdir -p"
6322 else
6323 # As a last resort, use the slow shell script. Don't cache a
6324 # value for MKDIR_P within a source directory, because that will
6325 # break other packages using the cache if that directory is
6326 # removed, or if the value is a relative name.
6327 MKDIR_P="$ac_install_sh -d"
6328 fi
6329fi
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6331$as_echo "$MKDIR_P" >&6; }
6332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333
6334# Not every filesystem supports hard links
6335
6336if test -z "$LN" ; then
6337 case $ac_sys_system in
6338 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 *) LN=ln;;
6340 esac
6341fi
6342
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006343# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006344
6345ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006346
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6349$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350
6351# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006352if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353 withval=$with_pydebug;
6354if test "$withval" != no
6355then
6356
Matthias Kloseb9621712010-04-24 17:59:49 +00006357$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6360$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006362 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006363else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365fi
6366else
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6368$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369fi
6370
6371
T. Woutersddbfa2c2017-05-23 01:30:49 +02006372# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6373# the ABI. This allows enabling assertions without changing the ABI.
6374assertions='false'
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6376$as_echo_n "checking for --with-assertions... " >&6; }
6377
6378# Check whether --with-assertions was given.
6379if test "${with_assertions+set}" = set; then :
6380 withval=$with_assertions;
6381if test "$withval" != no
6382then
6383 assertions='true'
6384fi
6385fi
6386
6387if test "$assertions" = 'true'; then
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6389$as_echo "yes" >&6; }
6390elif test "$Py_DEBUG" = 'true'; then
6391 assertions='true'
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6393$as_echo "implied by --with-pydebug" >&6; }
6394else
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
Brett Cannon63d98bc2016-09-06 17:12:40 -07006399# Enable optimization flags
6400
6401
6402Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6404$as_echo_n "checking for --enable-optimizations... " >&6; }
6405# Check whether --enable-optimizations was given.
6406if test "${enable_optimizations+set}" = set; then :
6407 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006408if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006409then
6410 Py_OPT='true'
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6412$as_echo "yes" >&6; };
6413else
6414 Py_OPT='false'
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; };
6417fi
6418else
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
6421fi
6422
6423if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006424 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6425 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006426 # 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 +00006427 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006428 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006429 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006430 DEF_MAKE_RULE="build_all"
6431else
6432 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006433 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006434 DEF_MAKE_RULE="all"
6435fi
6436
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006437# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6438# normal names in the default $PATH (ie: Ubuntu). They exist under the
6439# non-suffixed name in their versioned llvm directory.
6440
6441llvm_bin_dir=''
6442llvm_path="${PATH}"
6443if test "${CC}" = "clang"
6444then
6445 clang_bin=`which clang`
6446 # Some systems install clang elsewhere as a symlink to the real path
6447 # which is where the related llvm tools are located.
6448 if test -L "${clang_bin}"
6449 then
6450 clang_dir=`dirname "${clang_bin}"`
6451 clang_bin=`readlink "${clang_bin}"`
6452 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6453 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6454 fi
6455fi
6456
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006457# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6459$as_echo_n "checking for --with-lto... " >&6; }
6460
6461# Check whether --with-lto was given.
6462if test "${with_lto+set}" = set; then :
6463 withval=$with_lto;
6464if test "$withval" != no
6465then
6466 Py_LTO='true'
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6468$as_echo "yes" >&6; };
6469else
6470 Py_LTO='false'
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; };
6473fi
6474else
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479if test "$Py_LTO" = 'true' ; then
6480 case $CC in
6481 *clang*)
Miss Islington (bot)1bb9dd32018-06-22 00:10:20 -07006482
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006484$as_echo_n "checking target system type... " >&6; }
6485if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006486 $as_echo_n "(cached) " >&6
6487else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006488 if test "x$target_alias" = x; then
6489 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006490else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006491 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6492 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6493fi
6494
6495fi
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6497$as_echo "$ac_cv_target" >&6; }
6498case $ac_cv_target in
6499*-*-*) ;;
6500*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6501esac
6502target=$ac_cv_target
6503ac_save_IFS=$IFS; IFS='-'
6504set x $ac_cv_target
6505shift
6506target_cpu=$1
6507target_vendor=$2
6508shift; shift
6509# Remember, the first character of IFS is used to create $*,
6510# except with old shells:
6511target_os=$*
6512IFS=$ac_save_IFS
6513case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6514
6515
6516# The aliases save the names the user supplied, while $host etc.
6517# will get canonicalized.
6518test -n "$target_alias" &&
6519 test "$program_prefix$program_suffix$program_transform_name" = \
6520 NONENONEs,x,x, &&
6521 program_prefix=${target_alias}-
Miss Islington (bot)69a3f152018-10-24 17:32:04 -07006522# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6523set dummy $target_alias-llvm-ar; ac_word=$2
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525$as_echo_n "checking for $ac_word... " >&6; }
6526if ${ac_cv_path_LLVM_AR+:} false; then :
6527 $as_echo_n "(cached) " >&6
6528else
6529 case $LLVM_AR in
6530 [\\/]* | ?:[\\/]*)
6531 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6532 ;;
6533 *)
6534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6535for as_dir in ${llvm_path}
6536do
6537 IFS=$as_save_IFS
6538 test -z "$as_dir" && as_dir=.
6539 for ac_exec_ext in '' $ac_executable_extensions; do
6540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6541 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6543 break 2
6544 fi
6545done
6546 done
6547IFS=$as_save_IFS
6548
6549 ;;
6550esac
6551fi
6552LLVM_AR=$ac_cv_path_LLVM_AR
6553if test -n "$LLVM_AR"; then
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6555$as_echo "$LLVM_AR" >&6; }
6556else
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6558$as_echo "no" >&6; }
6559fi
6560
6561
6562if test -z "$ac_cv_path_LLVM_AR"; then
6563 if test "$build" = "$target"; then
6564 ac_pt_LLVM_AR=$LLVM_AR
6565 # Extract the first word of "llvm-ar", so it can be a program name with args.
6566set dummy llvm-ar; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6570 $as_echo_n "(cached) " >&6
6571else
6572 case $ac_pt_LLVM_AR in
6573 [\\/]* | ?:[\\/]*)
6574 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6575 ;;
6576 *)
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in ${llvm_path}
6579do
6580 IFS=$as_save_IFS
6581 test -z "$as_dir" && as_dir=.
6582 for ac_exec_ext in '' $ac_executable_extensions; do
6583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586 break 2
6587 fi
6588done
6589 done
6590IFS=$as_save_IFS
6591
6592 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6593 ;;
6594esac
6595fi
6596ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6597if test -n "$ac_pt_LLVM_AR"; then
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6599$as_echo "$ac_pt_LLVM_AR" >&6; }
6600else
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602$as_echo "no" >&6; }
6603fi
6604
6605 LLVM_AR=$ac_pt_LLVM_AR
6606 else
6607 LLVM_AR="''"
6608 fi
6609else
6610 LLVM_AR="$ac_cv_path_LLVM_AR"
6611fi
6612
6613
6614 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6615 then
6616 LLVM_AR_FOUND="found"
6617 else
6618 LLVM_AR_FOUND="not-found"
6619 fi
6620 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6621 then
6622 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6623 if test -n "${found_llvm_ar}"
6624 then
6625 LLVM_AR='/usr/bin/xcrun llvm-ar'
6626 LLVM_AR_FOUND=found
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6628$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6629 fi
6630 fi
6631 if test $LLVM_AR_FOUND = not-found
6632 then
6633 LLVM_PROFR_ERR=yes
6634 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6635 else
6636 LLVM_AR_ERR=no
6637 fi
6638 AR="${LLVM_AR}"
6639 case $ac_sys_system in
6640 Darwin*)
6641 # Any changes made here should be reflected in the GCC+Darwin case below
6642 LTOFLAGS="-flto -Wl,-export_dynamic"
6643 ;;
6644 *)
6645 LTOFLAGS="-flto"
6646 ;;
6647 esac
6648 ;;
6649 *gcc*)
6650 case $ac_sys_system in
6651 Darwin*)
6652 LTOFLAGS="-flto -Wl,-export_dynamic"
6653 ;;
6654 *)
6655 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6656 ;;
6657 esac
6658 ;;
6659 esac
6660
6661 if test "$ac_cv_prog_cc_g" = "yes"
6662 then
6663 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6664 # to get debug symbols.
6665 LTOFLAGS="$LTOFLAGS -g"
6666 fi
6667
6668 BASECFLAGS="$BASECFLAGS $LTOFLAGS"
6669 LDFLAGS="$LDFLAGS $LTOFLAGS"
6670fi
6671
6672# Enable PGO flags.
6673
6674
6675
6676
6677
6678
Gregory P. Smith799520c2016-09-07 16:10:00 -07006679# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6680set dummy $target_alias-llvm-profdata; ac_word=$2
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6682$as_echo_n "checking for $ac_word... " >&6; }
6683if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6684 $as_echo_n "(cached) " >&6
6685else
6686 case $LLVM_PROFDATA in
6687 [\\/]* | ?:[\\/]*)
6688 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6689 ;;
6690 *)
6691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6692for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006693do
6694 IFS=$as_save_IFS
6695 test -z "$as_dir" && as_dir=.
6696 for ac_exec_ext in '' $ac_executable_extensions; do
6697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006698 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6700 break 2
6701 fi
6702done
6703 done
6704IFS=$as_save_IFS
6705
Gregory P. Smith799520c2016-09-07 16:10:00 -07006706 ;;
6707esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006708fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006709LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6710if test -n "$LLVM_PROFDATA"; then
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6712$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006713else
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718
Gregory P. Smith799520c2016-09-07 16:10:00 -07006719if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6720 if test "$build" = "$target"; then
6721 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6722 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6723set dummy llvm-profdata; ac_word=$2
6724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6725$as_echo_n "checking for $ac_word... " >&6; }
6726if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6727 $as_echo_n "(cached) " >&6
6728else
6729 case $ac_pt_LLVM_PROFDATA in
6730 [\\/]* | ?:[\\/]*)
6731 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6732 ;;
6733 *)
6734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6735for as_dir in ${llvm_path}
6736do
6737 IFS=$as_save_IFS
6738 test -z "$as_dir" && as_dir=.
6739 for ac_exec_ext in '' $ac_executable_extensions; do
6740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6741 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6743 break 2
6744 fi
6745done
6746 done
6747IFS=$as_save_IFS
6748
6749 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6750 ;;
6751esac
6752fi
6753ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6754if test -n "$ac_pt_LLVM_PROFDATA"; then
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6756$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6757else
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6759$as_echo "no" >&6; }
6760fi
6761
6762 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6763 else
6764 LLVM_PROFDATA="''"
6765 fi
6766else
6767 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6768fi
6769
6770
6771if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6772then
6773 LLVM_PROF_FOUND="found"
6774else
6775 LLVM_PROF_FOUND="not-found"
6776fi
6777if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6778then
6779 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6780 if test -n "${found_llvm_profdata}"
6781 then
6782 # llvm-profdata isn't directly in $PATH in some cases.
6783 # https://apple.stackexchange.com/questions/197053/
6784 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6785 LLVM_PROF_FOUND=found
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6787$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6788 fi
6789fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006790LLVM_PROF_ERR=no
6791case $CC in
6792 *clang*)
6793 # Any changes made here should be reflected in the GCC+Darwin case below
6794 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6795 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006796 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006797 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6798 if test $LLVM_PROF_FOUND = not-found
6799 then
6800 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006801 if test "${REQUIRE_PGO}" = "yes"
6802 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006803 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 -07006804 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 fi
6806 ;;
6807 *gcc*)
6808 case $ac_sys_system in
6809 Darwin*)
6810 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6811 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006812 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006813 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006814 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006815 then
6816 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006817 if test "${REQUIRE_PGO}" = "yes"
6818 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006819 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 -07006820 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006821 fi
6822 ;;
6823 *)
6824 PGO_PROF_GEN_FLAG="-fprofile-generate"
6825 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6826 LLVM_PROF_MERGER="true"
6827 LLVM_PROF_FILE=""
6828 ;;
6829 esac
6830 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006831 *icc*)
6832 PGO_PROF_GEN_FLAG="-prof-gen"
6833 PGO_PROF_USE_FLAG="-prof-use"
6834 LLVM_PROF_MERGER="true"
6835 LLVM_PROF_FILE=""
6836 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006837esac
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6840# merged with this chunk of code?
6841
6842# Optimizer/debugger flags
6843# ------------------------
6844# (The following bit of code is complicated enough - please keep things
6845# indented properly. Just pretend you're editing Python code. ;-)
6846
6847# There are two parallel sets of case statements below, one that checks to
6848# see if OPT was set and one that does BASECFLAGS setting based upon
6849# compiler and platform. BASECFLAGS tweaks need to be made even if the
6850# user set OPT.
6851
6852# tweak OPT based on compiler and platform, only if the user didn't set
6853# it on the command line
6854
Victor Stinner9ed34a82017-05-02 22:35:58 +02006855
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006856if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857then
6858 case $GCC in
6859 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6861 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6862 WRAP="-fwrapv"
6863 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006864
Stefan Krahaf04ff22011-12-08 22:20:31 +01006865 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006866 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006867 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006868 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006869 *)
6870 if $CC --version 2>&1 | grep -q clang
6871 then
6872 cc_is_clang=1
6873 else
6874 cc_is_clang=
6875 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006876 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006877
Victor Stinner35f3d242017-04-21 12:35:24 +02006878 if test -n "${cc_is_clang}"
6879 then
6880 # Clang also needs -fwrapv
6881 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006882 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6883 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006884 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006885 fi
6886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 case $ac_cv_prog_cc_g in
6888 yes)
6889 if test "$Py_DEBUG" = 'true' ; then
6890 # Optimization messes up debuggers, so turn it off for
6891 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006892 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006893 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006894 else
Victor Stinner28205b22017-04-21 11:24:34 +02006895 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006896 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 else
Victor Stinner28205b22017-04-21 11:24:34 +02006898 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899 fi
6900 ;;
6901 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006902 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903 ;;
6904 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906 case $ac_sys_system in
6907 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6908 ;;
6909 esac
6910 ;;
6911
6912 *)
6913 OPT="-O"
6914 ;;
6915 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916fi
6917
6918
6919
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921# The -arch flags for universal builds on OSX
6922UNIVERSAL_ARCH_FLAGS=
6923
6924
6925# tweak BASECFLAGS based on compiler and platform
6926case $GCC in
6927yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006928 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006929
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6931$as_echo_n "checking for -Wextra... " >&6; }
6932 ac_save_cc="$CC"
6933 CC="$CC -Wextra -Werror"
6934 if ${ac_cv_extra_warnings+:} false; then :
6935 $as_echo_n "(cached) " >&6
6936else
6937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6938/* end confdefs.h. */
6939
6940
6941int
6942main ()
6943{
6944
6945 ;
6946 return 0;
6947}
6948
6949_ACEOF
6950if ac_fn_c_try_compile "$LINENO"; then :
6951
6952 ac_cv_extra_warnings=yes
6953
6954else
6955
6956 ac_cv_extra_warnings=no
6957
6958fi
6959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960fi
6961
6962 CC="$ac_save_cc"
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6964$as_echo "$ac_cv_extra_warnings" >&6; }
6965
6966 if test $ac_cv_extra_warnings = yes
6967 then
6968 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6969 fi
6970
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971 # Python doesn't violate C99 aliasing rules, but older versions of
6972 # GCC produce warnings for legal Python code. Enable
6973 # -fno-strict-aliasing on versions of GCC that support but produce
6974 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6976$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977 ac_save_cc="$CC"
6978 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006979 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006980 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006982else
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006985
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006987int
6988main ()
6989{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006990
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006991 ;
6992 return 0;
6993}
Matthias Kloseb159a552010-04-25 21:00:44 +00006994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006996if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006997
6998 CC="$ac_save_cc -fstrict-aliasing"
6999 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001/* end confdefs.h. */
7002
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007003 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007004int
7005main ()
7006{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007007double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008 ;
7009 return 0;
7010}
Matthias Kloseb159a552010-04-25 21:00:44 +00007011
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007013if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
7015 ac_cv_no_strict_aliasing=no
7016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017else
Matthias Kloseb159a552010-04-25 21:00:44 +00007018
7019 ac_cv_no_strict_aliasing=yes
7020
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007023
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007024else
Matthias Kloseb159a552010-04-25 21:00:44 +00007025
7026 ac_cv_no_strict_aliasing=no
7027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007030fi
7031
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007032 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7035$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007036 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007037 then
7038 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7039 fi
7040
Zachary Ware5af85642015-12-21 12:09:17 -06007041 # ICC doesn't recognize the option, but only emits a warning
7042 ## XXX does it emit an unused result warning and can it be disabled?
7043 case "$CC" in
7044 *icc*)
7045 ac_cv_disable_unused_result_warning=no
7046 ;;
7047 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7049$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7050 ac_save_cc="$CC"
7051 CC="$CC -Wunused-result -Werror"
7052 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007053 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007054 $as_echo_n "(cached) " >&6
7055else
7056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h. */
7058
7059
7060int
7061main ()
7062{
7063
7064 ;
7065 return 0;
7066}
7067
7068_ACEOF
7069if ac_fn_c_try_compile "$LINENO"; then :
7070
7071 ac_cv_disable_unused_result_warning=yes
7072
7073else
7074
7075 ac_cv_disable_unused_result_warning=no
7076
7077fi
7078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7079fi
7080
7081 CFLAGS="$save_CFLAGS"
7082 CC="$ac_save_cc"
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7084$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007085 ;;
7086 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007087
7088 if test $ac_cv_disable_unused_result_warning = yes
7089 then
7090 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007091 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7092 fi
7093
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7095$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7096 ac_save_cc="$CC"
7097 CC="$CC -Wunused-parameter -Werror"
7098 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7099 $as_echo_n "(cached) " >&6
7100else
7101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7102/* end confdefs.h. */
7103
7104
7105int
7106main ()
7107{
7108
7109 ;
7110 return 0;
7111}
7112
7113_ACEOF
7114if ac_fn_c_try_compile "$LINENO"; then :
7115
7116 ac_cv_disable_unused_parameter_warning=yes
7117
7118else
7119
7120 ac_cv_disable_unused_parameter_warning=no
7121
7122fi
7123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7124fi
7125
7126 CC="$ac_save_cc"
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7128$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7129
7130 if test $ac_cv_disable_unused_parameter_warning = yes
7131 then
7132 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7133 fi
7134
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7136$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7137 ac_save_cc="$CC"
7138 CC="$CC -Wmissing-field-initializers -Werror"
7139 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7140 $as_echo_n "(cached) " >&6
7141else
7142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7143/* end confdefs.h. */
7144
7145
7146int
7147main ()
7148{
7149
7150 ;
7151 return 0;
7152}
7153
7154_ACEOF
7155if ac_fn_c_try_compile "$LINENO"; then :
7156
7157 ac_cv_disable_missing_field_initializers=yes
7158
7159else
7160
7161 ac_cv_disable_missing_field_initializers=no
7162
7163fi
7164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7165fi
7166
7167 CC="$ac_save_cc"
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7169$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7170
7171 if test $ac_cv_disable_missing_field_initializers = yes
7172 then
7173 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007174 fi
7175
Serhiy Storchakaef91dde2018-05-25 13:16:51 +03007176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
7177$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
7178 ac_save_cc="$CC"
7179 CC="$CC -Wcast-function-type -Werror"
7180 if ${ac_cv_disable_cast_function_type+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184/* end confdefs.h. */
7185
7186
7187int
7188main ()
7189{
7190
7191 ;
7192 return 0;
7193}
7194
7195_ACEOF
7196if ac_fn_c_try_compile "$LINENO"; then :
7197
7198 ac_cv_disable_cast_function_type=yes
7199
7200else
7201
7202 ac_cv_disable_cast_function_type=no
7203
7204fi
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206fi
7207
7208 CC="$ac_save_cc"
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
7210$as_echo "$ac_cv_disable_cast_function_type" >&6; }
7211
7212 if test $ac_cv_disable_cast_function_type = yes
7213 then
7214 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
7215 fi
7216
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7218$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7219 ac_save_cc="$CC"
7220 CC="$CC -Wsign-compare"
7221 save_CFLAGS="$CFLAGS"
7222 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7223 $as_echo_n "(cached) " >&6
7224else
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226/* end confdefs.h. */
7227
7228
7229int
7230main ()
7231{
7232
7233 ;
7234 return 0;
7235}
7236
7237_ACEOF
7238if ac_fn_c_try_compile "$LINENO"; then :
7239
7240 ac_cv_enable_sign_compare_warning=yes
7241
7242else
7243
7244 ac_cv_enable_sign_compare_warning=no
7245
7246fi
7247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7248fi
7249
7250 CFLAGS="$save_CFLAGS"
7251 CC="$ac_save_cc"
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7253$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7254
7255 if test $ac_cv_enable_sign_compare_warning = yes
7256 then
7257 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7258 fi
7259
7260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7261$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7262 ac_save_cc="$CC"
7263 CC="$CC -Wunreachable-code"
7264 save_CFLAGS="$CFLAGS"
7265 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7266 $as_echo_n "(cached) " >&6
7267else
7268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7269/* end confdefs.h. */
7270
7271
7272int
7273main ()
7274{
7275
7276 ;
7277 return 0;
7278}
7279
7280_ACEOF
7281if ac_fn_c_try_compile "$LINENO"; then :
7282
7283 ac_cv_enable_unreachable_code_warning=yes
7284
7285else
7286
7287 ac_cv_enable_unreachable_code_warning=no
7288
7289fi
7290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7291fi
7292
7293 CFLAGS="$save_CFLAGS"
7294 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007295
7296 # Don't enable unreachable code warning in debug mode, since it usually
7297 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007298 # Issue #24324: Unfortunately, the unreachable code warning does not work
7299 # correctly on gcc and has been silently removed from the compiler.
7300 # It is supported on clang but on OS X systems gcc may be an alias
7301 # for clang. Try to determine if the compiler is not really gcc and,
7302 # if so, only then enable the warning.
7303 if test $ac_cv_enable_unreachable_code_warning = yes && \
7304 test "$Py_DEBUG" != "true" && \
7305 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007306 then
7307 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007308 else
7309 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007310 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7312$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007313
Miss Islington (bot)d6e789c2018-06-05 17:12:06 -07007314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7315$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7316 ac_save_cc="$CC"
7317 CC="$CC -Werror -Wstrict-prototypes"
7318 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7319 $as_echo_n "(cached) " >&6
7320else
7321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7322/* end confdefs.h. */
7323
7324
7325int
7326main ()
7327{
7328
7329 ;
7330 return 0;
7331}
7332
7333_ACEOF
7334if ac_fn_c_try_compile "$LINENO"; then :
7335
7336 ac_cv_enable_strict_prototypes_warning=yes
7337
7338else
7339
7340 ac_cv_enable_strict_prototypes_warning=no
7341
7342fi
7343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7344fi
7345
7346 CC="$ac_save_cc"
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7348$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7349
7350 if test $ac_cv_enable_strict_prototypes_warning = yes
7351 then
7352 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7353 fi
7354
Victor Stinner193ee0a2017-02-06 14:24:00 +01007355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7356$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7357 ac_save_cc="$CC"
7358 CC="$CC -Werror=implicit-function-declaration"
7359 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7360 $as_echo_n "(cached) " >&6
7361else
7362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7363/* end confdefs.h. */
7364
7365
7366int
7367main ()
7368{
7369
7370 ;
7371 return 0;
7372}
7373
7374_ACEOF
7375if ac_fn_c_try_compile "$LINENO"; then :
7376
7377 ac_cv_enable_implicit_function_declaration_error=yes
7378
7379else
7380
7381 ac_cv_enable_implicit_function_declaration_error=no
7382
7383fi
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385fi
7386
7387 CC="$ac_save_cc"
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7389$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7390
7391 if test $ac_cv_enable_implicit_function_declaration_error = yes
7392 then
7393 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7394 fi
7395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7397 # support. Without this, treatment of subnormals doesn't follow
7398 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007399 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400 alpha*)
7401 BASECFLAGS="$BASECFLAGS -mieee"
7402 ;;
7403 esac
7404
7405 case $ac_sys_system in
7406 SCO_SV*)
7407 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7408 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007409
7410 # is there any other compiler on Darwin besides gcc?
7411 Darwin*)
7412 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7413 # used to be here, but non-Apple gcc doesn't accept them.
7414 if test "${CC}" = gcc
7415 then
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007417$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007418 case "${UNIVERSALSDK}" in
7419 */MacOSX10.4u.sdk)
7420 # Build using 10.4 SDK, force usage of gcc when the
7421 # compiler is gcc, otherwise the user will get very
7422 # confusing error messages when building on OSX 10.6
7423 CC=gcc-4.0
7424 CPP=cpp-4.0
7425 ;;
7426 esac
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007428$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 if test "${enable_universalsdk}"
7432 then
7433 case "$UNIVERSAL_ARCHS" in
7434 32-bit)
7435 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7436 LIPO_32BIT_FLAGS=""
7437 ARCH_RUN_32BIT=""
7438 ;;
7439 64-bit)
7440 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7441 LIPO_32BIT_FLAGS=""
7442 ARCH_RUN_32BIT="true"
7443 ;;
7444 all)
7445 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7446 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7447 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7448 ;;
7449 intel)
7450 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7451 LIPO_32BIT_FLAGS="-extract i386"
7452 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7453 ;;
7454 intel-32)
7455 UNIVERSAL_ARCH_FLAGS="-arch i386"
7456 LIPO_32BIT_FLAGS=""
7457 ARCH_RUN_32BIT=""
7458 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007459 intel-64)
7460 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7461 LIPO_32BIT_FLAGS=""
7462 ARCH_RUN_32BIT="true"
7463 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007464 3-way)
7465 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7466 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7467 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7468 ;;
7469 *)
7470 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7471 ;;
7472 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473
Ned Deily87adb6e2013-10-18 21:09:56 -07007474 if test "${UNIVERSALSDK}" != "/"
7475 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007476 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7477 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007478 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007479 else
7480 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7481 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007482 fi
7483 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484
Ned Deily87adb6e2013-10-18 21:09:56 -07007485 # Calculate an appropriate deployment target for this build:
7486 # The deployment target value is used explicitly to enable certain
7487 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007488 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007489 # component of the string returned by distutils.get_platform().
7490 #
7491 # Use the value from:
7492 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7493 # 2. the operating system version of the build machine if >= 10.6
7494 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7495 # below to pick either 10.3, 10.4, or 10.5 as the target.
7496 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497
Ned Deily87adb6e2013-10-18 21:09:56 -07007498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7499$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007500 cur_target_major=`sw_vers -productVersion | \
7501 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7502 cur_target_minor=`sw_vers -productVersion | \
7503 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7504 cur_target="${cur_target_major}.${cur_target_minor}"
7505 if test ${cur_target_major} -eq 10 && \
7506 test ${cur_target_minor} -ge 3 && \
7507 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007508 then
Ned Deily36820b62014-06-25 13:44:22 -07007509 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007510 cur_target=10.3
7511 if test ${enable_universalsdk}
7512 then
7513 case "$UNIVERSAL_ARCHS" in
7514 all|3-way|intel|64-bit)
7515 # These configurations were first supported in 10.5
7516 cur_target='10.5'
7517 ;;
7518 esac
7519 else
7520 if test `/usr/bin/arch` = "i386"
7521 then
7522 # 10.4 was the first release to support Intel archs
7523 cur_target="10.4"
7524 fi
7525 fi
7526 fi
7527 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007528
Ned Deily87adb6e2013-10-18 21:09:56 -07007529 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7530 # environment with a value that is the same as what we'll use
7531 # in the Makefile to ensure that we'll get the same compiler
7532 # environment during configure and build time.
7533 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7534 export MACOSX_DEPLOYMENT_TARGET
7535 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7537$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007538
Ned Deily87adb6e2013-10-18 21:09:56 -07007539 # end of Darwin* tests
7540 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541 esac
7542 ;;
7543
7544*)
7545 case $ac_sys_system in
7546 OpenUNIX*|UnixWare*)
7547 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7548 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549 SCO_SV*)
7550 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7551 ;;
7552 esac
7553 ;;
7554esac
7555
Zachary Ware5af85642015-12-21 12:09:17 -06007556# ICC needs -fp-model strict or floats behave badly
7557case "$CC" in
7558*icc*)
7559 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7560 ;;
7561esac
7562
T. Woutersddbfa2c2017-05-23 01:30:49 +02007563if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564 :
7565else
7566 OPT="-DNDEBUG $OPT"
7567fi
7568
7569if test "$ac_arch_flags"
7570then
7571 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7572fi
7573
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574# On some compilers, pthreads are available without further options
7575# (e.g. MacOS X). On some of these systems, the compiler will not
7576# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7577# So we have to see first whether pthreads are available without
7578# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7580$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007581if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585 ac_cv_pthread_is_default=no
7586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588/* end confdefs.h. */
7589
Stefan Krah7dba5942012-11-22 22:49:11 +01007590#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591#include <pthread.h>
7592
7593void* routine(void* p){return NULL;}
7594
7595int main(){
7596 pthread_t p;
7597 if(pthread_create(&p,NULL,routine,NULL)!=0)
7598 return 1;
7599 (void)pthread_detach(p);
7600 return 0;
7601}
7602
7603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007604if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605
7606 ac_cv_pthread_is_default=yes
7607 ac_cv_kthread=no
7608 ac_cv_pthread=no
7609
7610else
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615fi
7616
7617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618fi
7619
Matthias Kloseb9621712010-04-24 17:59:49 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7621$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622
7623
7624if test $ac_cv_pthread_is_default = yes
7625then
7626 ac_cv_kpthread=no
7627else
7628# -Kpthread, if available, provides the right #defines
7629# and linker options to make pthread_create available
7630# Some compilers won't report that they do not support -Kpthread,
7631# so we need to run a program to see whether it really made the
7632# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7634$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007635if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637else
7638 ac_save_cc="$CC"
7639CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007640if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641 ac_cv_kpthread=no
7642else
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644/* end confdefs.h. */
7645
Stefan Krah7dba5942012-11-22 22:49:11 +01007646#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647#include <pthread.h>
7648
7649void* routine(void* p){return NULL;}
7650
7651int main(){
7652 pthread_t p;
7653 if(pthread_create(&p,NULL,routine,NULL)!=0)
7654 return 1;
7655 (void)pthread_detach(p);
7656 return 0;
7657}
7658
7659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007660if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661 ac_cv_kpthread=yes
7662else
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7666 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007667fi
7668
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669CC="$ac_save_cc"
7670fi
7671
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7673$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674fi
7675
7676if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7677then
7678# -Kthread, if available, provides the right #defines
7679# and linker options to make pthread_create available
7680# Some compilers won't report that they do not support -Kthread,
7681# so we need to run a program to see whether it really made the
7682# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7684$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007685if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687else
7688 ac_save_cc="$CC"
7689CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007690if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691 ac_cv_kthread=no
7692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007694/* end confdefs.h. */
7695
Stefan Krah7dba5942012-11-22 22:49:11 +01007696#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697#include <pthread.h>
7698
7699void* routine(void* p){return NULL;}
7700
7701int main(){
7702 pthread_t p;
7703 if(pthread_create(&p,NULL,routine,NULL)!=0)
7704 return 1;
7705 (void)pthread_detach(p);
7706 return 0;
7707}
7708
7709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711 ac_cv_kthread=yes
7712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717fi
7718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007719CC="$ac_save_cc"
7720fi
7721
Matthias Kloseb9621712010-04-24 17:59:49 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7723$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007724fi
7725
7726if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7727then
7728# -pthread, if available, provides the right #defines
7729# and linker options to make pthread_create available
7730# Some compilers won't report that they do not support -pthread,
7731# so we need to run a program to see whether it really made the
7732# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7734$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007735if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737else
7738 ac_save_cc="$CC"
7739CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007740if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741 ac_cv_pthread=no
7742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744/* end confdefs.h. */
7745
Stefan Krah7dba5942012-11-22 22:49:11 +01007746#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747#include <pthread.h>
7748
7749void* routine(void* p){return NULL;}
7750
7751int main(){
7752 pthread_t p;
7753 if(pthread_create(&p,NULL,routine,NULL)!=0)
7754 return 1;
7755 (void)pthread_detach(p);
7756 return 0;
7757}
7758
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_pthread=yes
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767fi
7768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007769CC="$ac_save_cc"
7770fi
7771
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7773$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774fi
7775
7776# If we have set a CC compiler flag for thread support then
7777# check if it works for CXX, too.
7778ac_cv_cxx_thread=no
7779if test ! -z "$CXX"
7780then
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7782$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783ac_save_cxx="$CXX"
7784
7785if test "$ac_cv_kpthread" = "yes"
7786then
7787 CXX="$CXX -Kpthread"
7788 ac_cv_cxx_thread=yes
7789elif test "$ac_cv_kthread" = "yes"
7790then
7791 CXX="$CXX -Kthread"
7792 ac_cv_cxx_thread=yes
7793elif test "$ac_cv_pthread" = "yes"
7794then
7795 CXX="$CXX -pthread"
7796 ac_cv_cxx_thread=yes
7797fi
7798
7799if test $ac_cv_cxx_thread = yes
7800then
7801 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7802 $CXX -c conftest.$ac_ext 2>&5
7803 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7804 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7805 then
7806 ac_cv_cxx_thread=yes
7807 else
7808 ac_cv_cxx_thread=no
7809 fi
7810 rm -fr conftest*
7811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7813$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007814fi
7815CXX="$ac_save_cxx"
7816
7817
7818# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7820$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007821if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823else
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007825/* end confdefs.h. */
7826#include <stdlib.h>
7827#include <stdarg.h>
7828#include <string.h>
7829#include <float.h>
7830
7831int
7832main ()
7833{
7834
7835 ;
7836 return 0;
7837}
7838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007839if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840 ac_cv_header_stdc=yes
7841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7845
7846if test $ac_cv_header_stdc = yes; then
7847 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849/* end confdefs.h. */
7850#include <string.h>
7851
7852_ACEOF
7853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007854 $EGREP "memchr" >/dev/null 2>&1; then :
7855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007856else
7857 ac_cv_header_stdc=no
7858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007859rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007860
7861fi
7862
7863if test $ac_cv_header_stdc = yes; then
7864 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866/* end confdefs.h. */
7867#include <stdlib.h>
7868
7869_ACEOF
7870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 $EGREP "free" >/dev/null 2>&1; then :
7872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007873else
7874 ac_cv_header_stdc=no
7875fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007876rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007877
7878fi
7879
7880if test $ac_cv_header_stdc = yes; then
7881 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007883 :
7884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886/* end confdefs.h. */
7887#include <ctype.h>
7888#include <stdlib.h>
7889#if ((' ' & 0x0FF) == 0x020)
7890# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7891# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7892#else
7893# define ISLOWER(c) \
7894 (('a' <= (c) && (c) <= 'i') \
7895 || ('j' <= (c) && (c) <= 'r') \
7896 || ('s' <= (c) && (c) <= 'z'))
7897# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7898#endif
7899
7900#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7901int
7902main ()
7903{
7904 int i;
7905 for (i = 0; i < 256; i++)
7906 if (XOR (islower (i), ISLOWER (i))
7907 || toupper (i) != TOUPPER (i))
7908 return 2;
7909 return 0;
7910}
7911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007912if ac_fn_c_try_run "$LINENO"; then :
7913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007919fi
7920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007921fi
7922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7924$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007925if test $ac_cv_header_stdc = yes; then
7926
Matthias Kloseb9621712010-04-24 17:59:49 +00007927$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007928
7929fi
7930
stratakise768c862018-01-23 16:11:24 +01007931for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007932fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007933ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007934sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007935unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007936poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007937sys/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 +01007938sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007939sys/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 +01007940sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007941sys/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 -07007942libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007943linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007944sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007945do :
7946 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7947ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007948if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007949 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007950#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007951_ACEOF
7952
7953fi
7954
Guido van Rossum627b2d71993-12-24 10:39:16 +00007955done
7956
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007957ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007958for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7961$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007966/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007967#include <sys/types.h>
7968#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
7973if ((DIR *) 0)
7974return 0;
7975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986eval ac_res=\$$as_ac_Header
7987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7988$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007989if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007991#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007992_ACEOF
7993
7994ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997done
7998# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7999if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8001$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008002if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008004else
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009/* Override any GCC internal prototype to avoid an error.
8010 Use char because int might match the return type of a GCC
8011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012#ifdef __cplusplus
8013extern "C"
8014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008015char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008016int
8017main ()
8018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ;
8021 return 0;
8022}
8023_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024for ac_lib in '' dir; do
8025 if test -z "$ac_lib"; then
8026 ac_res="none required"
8027 else
8028 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008034rm -f core conftest.err conftest.$ac_objext \
8035 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008036 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039done
Victor Stinnere0be4232011-10-25 13:06:09 +02008040if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008042else
8043 ac_cv_search_opendir=no
8044fi
8045rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008046LIBS=$ac_func_search_save_LIBS
8047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8049$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008055
Michael W. Hudson54241132001-12-07 15:38:26 +00008056else
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8058$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008059if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008061else
8062 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066/* Override any GCC internal prototype to avoid an error.
8067 Use char because int might match the return type of a GCC
8068 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008069#ifdef __cplusplus
8070extern "C"
8071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008072char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008073int
8074main ()
8075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 ;
8078 return 0;
8079}
8080_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081for ac_lib in '' x; do
8082 if test -z "$ac_lib"; then
8083 ac_res="none required"
8084 else
8085 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008086 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091rm -f core conftest.err conftest.$ac_objext \
8092 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008093 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096done
Victor Stinnere0be4232011-10-25 13:06:09 +02008097if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099else
8100 ac_cv_search_opendir=no
8101fi
8102rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008103LIBS=$ac_func_search_save_LIBS
8104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8106$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008108if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008111fi
8112
8113fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8116$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008117if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008118 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008119else
Matthias Kloseb9621712010-04-24 17:59:49 +00008120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008122#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008123int
8124main ()
8125{
8126return makedev(0, 0);
8127 ;
8128 return 0;
8129}
8130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008132 ac_cv_header_sys_types_h_makedev=yes
8133else
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008136rm -f core conftest.err conftest.$ac_objext \
8137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008138
8139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8141$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008142
8143if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008144ac_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 +02008145if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008148
8149fi
8150
8151
8152
8153 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 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 +02008155if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008158
8159fi
8160
8161
8162 fi
8163fi
8164
Michael W. Hudson54241132001-12-07 15:38:26 +00008165
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008166# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8167# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8168SAVE_CFLAGS=$CFLAGS
8169CFLAGS="-std=c99 $CFLAGS"
8170for ac_header in bluetooth/bluetooth.h
8171do :
8172 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8173if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8174 cat >>confdefs.h <<_ACEOF
8175#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8176_ACEOF
8177
8178fi
8179
8180done
8181
8182CFLAGS=$SAVE_CFLAGS
8183
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008184# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8185for ac_header in net/if.h
8186do :
8187 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8188#ifdef STDC_HEADERS
8189# include <stdlib.h>
8190# include <stddef.h>
8191#else
8192# ifdef HAVE_STDLIB_H
8193# include <stdlib.h>
8194# endif
8195#endif
8196#ifdef HAVE_SYS_SOCKET_H
8197# include <sys/socket.h>
8198#endif
8199
8200"
Victor Stinnere0be4232011-10-25 13:06:09 +02008201if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008202 cat >>confdefs.h <<_ACEOF
8203#define HAVE_NET_IF_H 1
8204_ACEOF
8205
8206fi
8207
8208done
8209
8210
Martin v. Löwis11017b12006-01-14 18:12:57 +00008211# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008212for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008213do :
8214 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 +00008215#ifdef HAVE_ASM_TYPES_H
8216#include <asm/types.h>
8217#endif
8218#ifdef HAVE_SYS_SOCKET_H
8219#include <sys/socket.h>
8220#endif
8221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222"
Victor Stinnere0be4232011-10-25 13:06:09 +02008223if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008225#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008226_ACEOF
8227
8228fi
8229
8230done
8231
8232
caaveryeffc12f2017-09-06 18:18:10 -04008233for ac_header in linux/vm_sockets.h
8234do :
8235 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8236#ifdef HAVE_SYS_SOCKET_H
8237#include <sys/socket.h>
8238#endif
8239
8240"
8241if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8242 cat >>confdefs.h <<_ACEOF
8243#define HAVE_LINUX_VM_SOCKETS_H 1
8244_ACEOF
8245
8246fi
8247
8248done
8249
8250
Charles-François Natali47413c12011-10-06 19:47:44 +02008251# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008252for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008253do :
8254 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8255ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8256#ifdef HAVE_SYS_SOCKET_H
8257#include <sys/socket.h>
8258#endif
8259
8260"
8261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8262 cat >>confdefs.h <<_ACEOF
8263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8264_ACEOF
8265
8266fi
8267
8268done
8269
8270
Guido van Rossum627b2d71993-12-24 10:39:16 +00008271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008272was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8274$as_echo_n "checking for clock_t in time.h... " >&6; }
8275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008276/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008277#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008282 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008283else
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
8285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008287
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008288
Guido van Rossum627b2d71993-12-24 10:39:16 +00008289fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008290rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8293$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8296$as_echo_n "checking for makedev... " >&6; }
8297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008299
Jesus Cea740f53a2010-04-28 11:35:30 +00008300#if defined(MAJOR_IN_MKDEV)
8301#include <sys/mkdev.h>
8302#elif defined(MAJOR_IN_SYSMACROS)
8303#include <sys/sysmacros.h>
8304#else
8305#include <sys/types.h>
8306#endif
8307
Neal Norwitz11690112002-07-30 01:08:28 +00008308int
8309main ()
8310{
Jesus Cea740f53a2010-04-28 11:35:30 +00008311
8312 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008313 ;
8314 return 0;
8315}
Matthias Kloseb159a552010-04-25 21:00:44 +00008316
Neal Norwitz11690112002-07-30 01:08:28 +00008317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008318if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008319 ac_cv_has_makedev=yes
8320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323rm -f core conftest.err conftest.$ac_objext \
8324 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8326$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008327if test "$ac_cv_has_makedev" = "yes"; then
8328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008330
8331fi
8332
Christian Heimes985ecdc2013-11-20 11:46:18 +01008333# byte swapping
8334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8335$as_echo_n "checking for le64toh... " >&6; }
8336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8337/* end confdefs.h. */
8338
8339#ifdef HAVE_ENDIAN_H
8340#include <endian.h>
8341#elif defined(HAVE_SYS_ENDIAN_H)
8342#include <sys/endian.h>
8343#endif
8344
8345int
8346main ()
8347{
8348
8349 le64toh(1)
8350 ;
8351 return 0;
8352}
8353
8354_ACEOF
8355if ac_fn_c_try_link "$LINENO"; then :
8356 ac_cv_has_le64toh=yes
8357else
8358 ac_cv_has_le64toh=no
8359fi
8360rm -f core conftest.err conftest.$ac_objext \
8361 conftest$ac_exeext conftest.$ac_ext
8362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8363$as_echo "$ac_cv_has_le64toh" >&6; }
8364if test "$ac_cv_has_le64toh" = "yes"; then
8365
8366$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8367
8368fi
8369
Martin v. Löwis399a6892002-10-04 10:22:02 +00008370use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008371# Don't use largefile support for GNU/Hurd
8372case $ac_sys_system in GNU*)
8373 use_lfs=no
8374esac
8375
Martin v. Löwis399a6892002-10-04 10:22:02 +00008376if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008377# Two defines needed to enable largefile support on various platforms
8378# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008379case $ac_sys_system/$ac_sys_release in
8380AIX*)
8381
8382$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8383
8384 ;;
8385esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
8389
Matthias Kloseb9621712010-04-24 17:59:49 +00008390$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008391
Martin v. Löwis399a6892002-10-04 10:22:02 +00008392fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008393
Guido van Rossum84e7b241996-08-19 21:59:00 +00008394# Add some code to confdefs.h so that the test for off_t works on SCO
8395cat >> confdefs.h <<\EOF
8396#if defined(SCO_DS)
8397#undef _OFF_T
8398#endif
8399EOF
8400
Guido van Rossumef2255b2000-03-10 22:30:29 +00008401# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008402ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008403if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008404
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008405else
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
8407cat >>confdefs.h <<_ACEOF
8408#define mode_t int
8409_ACEOF
8410
8411fi
8412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008414if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008415
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008416else
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
8418cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008420_ACEOF
8421
8422fi
8423
Matthias Kloseb9621712010-04-24 17:59:49 +00008424ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008425if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008426
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008427else
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
8429cat >>confdefs.h <<_ACEOF
8430#define pid_t int
8431_ACEOF
8432
8433fi
8434
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008437#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008438_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008439
Matthias Kloseb9621712010-04-24 17:59:49 +00008440ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008441if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
8445cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008447_ACEOF
8448
8449fi
8450
Matthias Kloseb9621712010-04-24 17:59:49 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8452$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008453if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008459
8460_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463 ac_cv_type_uid_t=yes
8464else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008465 ac_cv_type_uid_t=no
8466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008467rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8471$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008472if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
8476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008478
8479fi
8480
Mark Dickinson983bc162012-12-02 12:11:38 +00008481
Matthias Kloseb9621712010-04-24 17:59:49 +00008482ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008483if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484
Matthias Kloseb9621712010-04-24 17:59:49 +00008485$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008486
8487fi
8488
Stefan Krah1919b7e2012-03-21 18:25:23 +01008489ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8490if test "x$ac_cv_type___uint128_t" = xyes; then :
8491
8492$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8493
8494fi
8495
Jack Jansendd19cf82001-12-06 22:36:17 +00008496
Michael W. Hudson54241132001-12-07 15:38:26 +00008497# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008498# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499# The cast to long int works around a bug in the HP C Compiler
8500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8502# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8504$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008505if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008507else
Matthias Kloseb9621712010-04-24 17:59:49 +00008508 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 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 if test "$ac_cv_type_int" = yes; then
8512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008514as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516 else
8517 ac_cv_sizeof_int=0
8518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8523$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008524
8525
8526
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008528#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008529_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008530
8531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532# The cast to long int works around a bug in the HP C Compiler
8533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8535# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8537$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008538if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008540else
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 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 +00008542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543else
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 if test "$ac_cv_type_long" = yes; then
8545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008547as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008548See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 else
8550 ac_cv_sizeof_long=0
8551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8556$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557
8558
8559
Martin v. Löwis11437992002-04-12 09:54:03 +00008560cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008561#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008562_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008563
8564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565# The cast to long int works around a bug in the HP C Compiler
8566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8568# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8570$as_echo_n "checking size of long long... " >&6; }
8571if ${ac_cv_sizeof_long_long+:} false; then :
8572 $as_echo_n "(cached) " >&6
8573else
8574 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8575
8576else
8577 if test "$ac_cv_type_long_long" = yes; then
8578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8580as_fn_error 77 "cannot compute sizeof (long long)
8581See \`config.log' for more details" "$LINENO" 5; }
8582 else
8583 ac_cv_sizeof_long_long=0
8584 fi
8585fi
8586
8587fi
8588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8589$as_echo "$ac_cv_sizeof_long_long" >&6; }
8590
8591
8592
8593cat >>confdefs.h <<_ACEOF
8594#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8595_ACEOF
8596
8597
8598# The cast to long int works around a bug in the HP C Compiler
8599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8603$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008604if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008606else
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 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 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 if test "$ac_cv_type_void_p" = yes; then
8611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008613as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008614See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 else
8616 ac_cv_sizeof_void_p=0
8617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8622$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623
8624
8625
Martin v. Löwis11437992002-04-12 09:54:03 +00008626cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008627#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008628_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008629
8630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631# The cast to long int works around a bug in the HP C Compiler
8632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8634# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8636$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008637if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 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 +00008641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642else
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 if test "$ac_cv_type_short" = yes; then
8644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008646as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008647See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648 else
8649 ac_cv_sizeof_short=0
8650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8655$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656
8657
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008660#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008661_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008662
8663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664# The cast to long int works around a bug in the HP C Compiler
8665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8667# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8669$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008670if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008672else
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 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 +00008674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 if test "$ac_cv_type_float" = yes; then
8677 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008679as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008680See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681 else
8682 ac_cv_sizeof_float=0
8683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8688$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689
8690
8691
Martin v. Löwis11437992002-04-12 09:54:03 +00008692cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008693#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008694_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008695
8696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697# The cast to long int works around a bug in the HP C Compiler
8698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8700# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8702$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008703if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008705else
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 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 +00008707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 if test "$ac_cv_type_double" = yes; then
8710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008712as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008713See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714 else
8715 ac_cv_sizeof_double=0
8716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8721$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722
8723
8724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008726#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008728
8729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730# The cast to long int works around a bug in the HP C Compiler
8731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8733# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8735$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008736if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008738else
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 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 +00008740
Martin v. Löwis11437992002-04-12 09:54:03 +00008741else
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 if test "$ac_cv_type_fpos_t" = yes; then
8743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008745as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008746See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008747 else
8748 ac_cv_sizeof_fpos_t=0
8749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751
Martin v. Löwis11437992002-04-12 09:54:03 +00008752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8754$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755
8756
8757
Martin v. Löwis11437992002-04-12 09:54:03 +00008758cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008759#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008760_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008761
Michael W. Hudson54241132001-12-07 15:38:26 +00008762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763# The cast to long int works around a bug in the HP C Compiler
8764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8766# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8768$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008769if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 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 +00008773
Martin v. Löwis18e16552006-02-15 17:27:45 +00008774else
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 if test "$ac_cv_type_size_t" = yes; then
8776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008778as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008779See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780 else
8781 ac_cv_sizeof_size_t=0
8782 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784
Martin v. Löwis18e16552006-02-15 17:27:45 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8787$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008788
8789
8790
Martin v. Löwis18e16552006-02-15 17:27:45 +00008791cat >>confdefs.h <<_ACEOF
8792#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8793_ACEOF
8794
8795
Christian Heimes400adb02008-02-01 08:12:03 +00008796# The cast to long int works around a bug in the HP C Compiler
8797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8799# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8801$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008802if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 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 +00008806
Christian Heimes400adb02008-02-01 08:12:03 +00008807else
Matthias Kloseb9621712010-04-24 17:59:49 +00008808 if test "$ac_cv_type_pid_t" = yes; then
8809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008811as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008812See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008813 else
8814 ac_cv_sizeof_pid_t=0
8815 fi
8816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008817
Christian Heimes400adb02008-02-01 08:12:03 +00008818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8820$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008821
8822
8823
8824cat >>confdefs.h <<_ACEOF
8825#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8826_ACEOF
8827
8828
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008829# The cast to long int works around a bug in the HP C Compiler
8830# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8831# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8832# This bug is HP SR number 8606223364.
8833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8834$as_echo_n "checking size of uintptr_t... " >&6; }
8835if ${ac_cv_sizeof_uintptr_t+:} false; then :
8836 $as_echo_n "(cached) " >&6
8837else
8838 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8839
8840else
8841 if test "$ac_cv_type_uintptr_t" = yes; then
8842 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8844as_fn_error 77 "cannot compute sizeof (uintptr_t)
8845See \`config.log' for more details" "$LINENO" 5; }
8846 else
8847 ac_cv_sizeof_uintptr_t=0
8848 fi
8849fi
8850
8851fi
8852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8853$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8854
8855
8856
8857cat >>confdefs.h <<_ACEOF
8858#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8859_ACEOF
8860
8861
Michael W. Hudson54241132001-12-07 15:38:26 +00008862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8864$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008865have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008867/* end confdefs.h. */
8868
8869int
8870main ()
8871{
8872long double x; x = (long double)0;
8873 ;
8874 return 0;
8875}
8876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008877if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008878
8879
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008881
8882 have_long_double=yes
8883
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008884fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8887$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008888if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008889# The cast to long int works around a bug in the HP C Compiler
8890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8894$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008895if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008897else
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 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 +00008899
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 if test "$ac_cv_type_long_double" = yes; then
8902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008904as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008905See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008906 else
8907 ac_cv_sizeof_long_double=0
8908 fi
8909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008910
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8913$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008914
8915
8916
8917cat >>confdefs.h <<_ACEOF
8918#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8919_ACEOF
8920
8921
8922fi
8923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924# The cast to long int works around a bug in the HP C Compiler
8925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8927# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8929$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008930if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008932else
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 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 +00008934
Thomas Woutersb2137042007-02-01 18:02:27 +00008935else
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 if test "$ac_cv_type__Bool" = yes; then
8937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008939as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008940See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941 else
8942 ac_cv_sizeof__Bool=0
8943 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008945
Thomas Woutersb2137042007-02-01 18:02:27 +00008946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8948$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008949
8950
8951
Thomas Woutersb2137042007-02-01 18:02:27 +00008952cat >>confdefs.h <<_ACEOF
8953#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8954_ACEOF
8955
8956
Thomas Woutersb2137042007-02-01 18:02:27 +00008957
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008958# The cast to long int works around a bug in the HP C Compiler
8959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8961# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8963$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008964if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008966else
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008968#ifdef HAVE_SYS_TYPES_H
8969#include <sys/types.h>
8970#endif
8971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974else
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 if test "$ac_cv_type_off_t" = yes; then
8976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008978as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008979See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980 else
8981 ac_cv_sizeof_off_t=0
8982 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8987$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008989
8990
Martin v. Löwis11437992002-04-12 09:54:03 +00008991cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008992#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008993_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008994
Michael W. Hudson54241132001-12-07 15:38:26 +00008995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8998$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008999if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009000 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009001
Matthias Kloseb9621712010-04-24 17:59:49 +00009002$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9005$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006else
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9008$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009009fi
9010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011# The cast to long int works around a bug in the HP C Compiler
9012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9014# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9016$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009017if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009018 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021#ifdef HAVE_SYS_TYPES_H
9022#include <sys/types.h>
9023#endif
9024#ifdef HAVE_TIME_H
9025#include <time.h>
9026#endif
9027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 if test "$ac_cv_type_time_t" = yes; then
9032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009034as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009035See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009036 else
9037 ac_cv_sizeof_time_t=0
9038 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009040
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9043$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009044
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045
9046
Martin v. Löwis11437992002-04-12 09:54:03 +00009047cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009048#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009050
Michael W. Hudson54241132001-12-07 15:38:26 +00009051
9052
Trent Mick635f6fb2000-08-23 21:33:05 +00009053# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009054ac_save_cc="$CC"
9055if test "$ac_cv_kpthread" = "yes"
9056then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009057elif test "$ac_cv_kthread" = "yes"
9058then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059elif test "$ac_cv_pthread" = "yes"
9060then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009061fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9064$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009065have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009068
9069 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009070int
9071main ()
9072{
Guido van Rossum12580492000-09-24 16:47:19 +00009073pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 ;
9075 return 0;
9076}
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009079if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009080 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9084$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009085if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9089# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9091$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009092if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094else
Matthias Kloseb9621712010-04-24 17:59:49 +00009095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009096#ifdef HAVE_PTHREAD_H
9097#include <pthread.h>
9098#endif
9099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009102else
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 if test "$ac_cv_type_pthread_t" = yes; then
9104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009106as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009107See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009108 else
9109 ac_cv_sizeof_pthread_t=0
9110 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009112
Trent Mick635f6fb2000-08-23 21:33:05 +00009113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9115$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009117
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009120#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009121_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009123
Trent Mick635f6fb2000-08-23 21:33:05 +00009124fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009125
9126# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9127# This checking will be unnecessary after removing deprecated TLS API.
9128# The cast to long int works around a bug in the HP C Compiler
9129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9131# This bug is HP SR number 8606223364.
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9133$as_echo_n "checking size of pthread_key_t... " >&6; }
9134if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9135 $as_echo_n "(cached) " >&6
9136else
9137 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9138"; then :
9139
9140else
9141 if test "$ac_cv_type_pthread_key_t" = yes; then
9142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9144as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9145See \`config.log' for more details" "$LINENO" 5; }
9146 else
9147 ac_cv_sizeof_pthread_key_t=0
9148 fi
9149fi
9150
9151fi
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9153$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9154
9155
9156
9157cat >>confdefs.h <<_ACEOF
9158#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9159_ACEOF
9160
9161
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9163$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9164if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166/* end confdefs.h. */
9167#include <pthread.h>
9168int
9169main ()
9170{
9171pthread_key_t k; k * 1;
9172 ;
9173 return 0;
9174}
9175_ACEOF
9176if ac_fn_c_try_compile "$LINENO"; then :
9177 ac_pthread_key_t_is_arithmetic_type=yes
9178else
9179 ac_pthread_key_t_is_arithmetic_type=no
9180
9181fi
9182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9184$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9185 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9186
9187$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9188
9189 fi
9190else
9191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009194CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009195
Michael W. Hudson54241132001-12-07 15:38:26 +00009196
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009197case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009198 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009199 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9200 ;;
9201 Darwin/*)
9202 OTHER_LIBTOOL_OPT=""
9203 ;;
9204esac
9205
9206
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009207
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009208case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009209 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009210 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9211 if test "${enable_universalsdk}"; then
9212 :
9213 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009214 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009215 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009216 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009217 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009218 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009219 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009220 if test ${gcc_version} '<' 4.0
9221 then
9222 LIBTOOL_CRUFT="-lcc_dynamic"
9223 else
9224 LIBTOOL_CRUFT=""
9225 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009226 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009227 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009228else
Matthias Kloseb9621712010-04-24 17:59:49 +00009229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009231
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232 #include <unistd.h>
9233 int main(int argc, char*argv[])
9234 {
9235 if (sizeof(long) == 4) {
9236 return 0;
9237 } else {
9238 return 1;
9239 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009240 }
9241
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009244 ac_osx_32bit=yes
9245else
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9249 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009250fi
9251
9252
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009254 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255 i386)
9256 MACOSX_DEFAULT_ARCH="i386"
9257 ;;
9258 ppc)
9259 MACOSX_DEFAULT_ARCH="ppc"
9260 ;;
9261 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009262 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009263 ;;
9264 esac
9265 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009266 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267 i386)
9268 MACOSX_DEFAULT_ARCH="x86_64"
9269 ;;
9270 ppc)
9271 MACOSX_DEFAULT_ARCH="ppc64"
9272 ;;
9273 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009274 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009275 ;;
9276 esac
9277
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009278 fi
9279
9280 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009281 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9285$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009286if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009288 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009290 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291
Matthias Kloseb9621712010-04-24 17:59:49 +00009292$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9295$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009296 if test $enable_shared = "yes"
9297 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009298 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 +00009299 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009300else
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009303fi
9304
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9306$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009307case $ac_sys_system/$ac_sys_release in
9308 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9313$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009314 ;;
9315 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009318 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009319esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009320
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009322
Michael W. Hudson54241132001-12-07 15:38:26 +00009323
9324
9325
9326
Benjamin Peterson99f03762010-04-11 22:15:28 +00009327
Thomas Wouters477c8d52006-05-27 19:21:47 +00009328
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009329# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9330# -- usually .so, .sl on HP-UX, .dll on Cygwin
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9332$as_echo_n "checking the extension of shared libraries... " >&6; }
9333if test -z "$SHLIB_SUFFIX"; then
9334 case $ac_sys_system in
9335 hp*|HP*)
9336 case `uname -m` in
9337 ia64) SHLIB_SUFFIX=.so;;
9338 *) SHLIB_SUFFIX=.sl;;
9339 esac
9340 ;;
9341 CYGWIN*) SHLIB_SUFFIX=.dll;;
9342 *) SHLIB_SUFFIX=.so;;
9343 esac
9344fi
9345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9346$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009347
Guido van Rossum0a516c91994-09-12 10:58:40 +00009348# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009349# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009350# (Shared libraries in this instance are shared modules to be loaded into
9351# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9353$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354if test -z "$LDSHARED"
9355then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009356 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009357 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009358 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009359 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009360 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009362 if test "$GCC" = "yes" ; then
9363 LDSHARED='$(CC) -shared'
9364 LDCXXSHARED='$(CXX) -shared'
9365 else
9366 LDSHARED='$(CC) -G'
9367 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009368 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009369 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009370 if test "$GCC" = "yes" ; then
9371 LDSHARED='$(CC) -shared'
9372 LDCXXSHARED='$(CXX) -shared'
9373 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009374 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009375 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009376 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009377 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009378 LDSHARED='$(CC) -bundle'
9379 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009380 if test "$enable_framework" ; then
9381 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009382 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9383 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009384 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009385 else
9386 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009387 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009388 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009389 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009390 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009391 LDSHARED='$(CC) -bundle'
9392 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009395 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009397 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009398 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009399 # No framework, use the Python app as bundle-loader
9400 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009401 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009402 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009403 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009404 Darwin/*)
9405 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9406 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009407
Ned Deily36820b62014-06-25 13:44:22 -07009408 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9409 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9410 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9411 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9412 if test ${dep_target_major} -eq 10 && \
9413 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009414 then
Ned Deily36820b62014-06-25 13:44:22 -07009415 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED='$(CC) -bundle'
9417 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009418 if test "$enable_framework" ; then
9419 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009420 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9421 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009422 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009423 else
9424 # No framework, use the Python app as bundle-loader
9425 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9426 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009428 fi
Ned Deily36820b62014-06-25 13:44:22 -07009429 else
9430 # building for OS X 10.3 and later
9431 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9432 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9433 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009434 fi
9435 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009436 Linux*|GNU*|QNX*)
9437 LDSHARED='$(CC) -shared'
9438 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009439 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009440 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009441 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009442 LDSHARED='$(CC) -shared'
9443 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009444 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009445 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009446 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009447 OpenBSD*)
9448 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9449 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009450 LDSHARED='$(CC) -shared $(CCSHARED)'
9451 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009452 else
9453 case `uname -r` in
9454 [01].* | 2.[0-7] | 2.[0-7].*)
9455 LDSHARED="ld -Bshareable ${LDFLAGS}"
9456 ;;
9457 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009458 LDSHARED='$(CC) -shared $(CCSHARED)'
9459 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009460 ;;
9461 esac
9462 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009463 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009464 LDSHARED='$(CC) -shared'
9465 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009466 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009467 if test "$GCC" = "yes" ; then
9468 LDSHARED='$(CC) -shared'
9469 LDCXXSHARED='$(CXX) -shared'
9470 else
9471 LDSHARED='$(CC) -G'
9472 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009473 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009474 SCO_SV*)
9475 LDSHARED='$(CC) -Wl,-G,-Bexport'
9476 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9477 CYGWIN*)
9478 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9479 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480 *) LDSHARED="ld";;
9481 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9484$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009485LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009486BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009487# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009488# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9490$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009491if test -z "$CCSHARED"
9492then
Guido van Rossum07397971997-04-29 21:49:50 +00009493 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009494 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009495 then CCSHARED="-fPIC";
9496 elif test `uname -p` = sparc;
9497 then CCSHARED="-xcode=pic32";
9498 else CCSHARED="-Kpic";
9499 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009500 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009501 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009502 else CCSHARED="+z";
9503 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009504 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009505 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009506 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009507 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009508 if test "$GCC" = "yes"
9509 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009510 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009511 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009512 SCO_SV*)
9513 if test "$GCC" = "yes"
9514 then CCSHARED="-fPIC"
9515 else CCSHARED="-Kpic -belf"
9516 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9520$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9524$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525if test -z "$LINKFORSHARED"
9526then
Guido van Rossum07397971997-04-29 21:49:50 +00009527 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009528 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009529 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009530 LINKFORSHARED="-Wl,-E -Wl,+s";;
9531# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009532 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009533 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009534 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009536 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009537
9538 # Issue #18075: the default maximum stack size (8MBytes) is too
9539 # small for the default recursion limit. Increase the stack size
9540 # to ensure that tests don't crash
9541 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9542
Jack Jansene578a632001-08-15 01:27:14 +00009543 if test "$enable_framework"
9544 then
Jack Jansenda49e192005-01-07 13:08:22 +00009545 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009546 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009547 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009548 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009549 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009550 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009551 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009552 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9553 then
9554 LINKFORSHARED="-Wl,--export-dynamic"
9555 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009556 SunOS/5*) case $CC in
9557 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009558 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009559 then
9560 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009561 fi;;
9562 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009563 CYGWIN*)
9564 if test $enable_shared = "no"
9565 then
9566 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9567 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009568 QNX*)
9569 # -Wl,-E causes the symbols to be added to the dynamic
9570 # symbol table so that they can be found when a module
9571 # is loaded. -N 2048K causes the stack size to be set
9572 # to 2048 kilobytes so that the stack doesn't overflow
9573 # when running test_compile.py.
9574 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009575 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9578$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009579
Michael W. Hudson54241132001-12-07 15:38:26 +00009580
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9583$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009584if test ! "$LIBRARY" = "$LDLIBRARY"
9585then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009586 case $ac_sys_system in
9587 CYGWIN*)
9588 # Cygwin needs CCSHARED when building extension DLLs
9589 # but not when building the interpreter DLL.
9590 CFLAGSFORSHARED='';;
9591 *)
9592 CFLAGSFORSHARED='$(CCSHARED)'
9593 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9596$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009597
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009598# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9599# library (with --enable-shared).
9600# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009601# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9602# if it is not required, since it creates a dependency of the shared library
9603# to LIBS. This, in turn, means that applications linking the shared libpython
9604# don't need to link LIBS explicitly. The default should be only changed
9605# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9608$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009609case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009610 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009611 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009612esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9614$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009615
9616
Guido van Rossum627b2d71993-12-24 10:39:16 +00009617# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9619$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009620if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009621 $as_echo_n "(cached) " >&6
9622else
9623 ac_check_lib_save_LIBS=$LIBS
9624LIBS="-lsendfile $LIBS"
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626/* end confdefs.h. */
9627
9628/* Override any GCC internal prototype to avoid an error.
9629 Use char because int might match the return type of a GCC
9630 builtin and then its argument prototype would still apply. */
9631#ifdef __cplusplus
9632extern "C"
9633#endif
9634char sendfile ();
9635int
9636main ()
9637{
9638return sendfile ();
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643if ac_fn_c_try_link "$LINENO"; then :
9644 ac_cv_lib_sendfile_sendfile=yes
9645else
9646 ac_cv_lib_sendfile_sendfile=no
9647fi
9648rm -f core conftest.err conftest.$ac_objext \
9649 conftest$ac_exeext conftest.$ac_ext
9650LIBS=$ac_check_lib_save_LIBS
9651fi
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9653$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009654if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009655 cat >>confdefs.h <<_ACEOF
9656#define HAVE_LIBSENDFILE 1
9657_ACEOF
9658
9659 LIBS="-lsendfile $LIBS"
9660
9661fi
9662
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9664$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009665if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009667else
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009669LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673/* Override any GCC internal prototype to avoid an error.
9674 Use char because int might match the return type of a GCC
9675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676#ifdef __cplusplus
9677extern "C"
9678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009679char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009680int
9681main ()
9682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693rm -f core conftest.err conftest.$ac_objext \
9694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9698$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009699if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 cat >>confdefs.h <<_ACEOF
9701#define HAVE_LIBDL 1
9702_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009704 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009706fi
9707 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9709$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009710if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718/* Override any GCC internal prototype to avoid an error.
9719 Use char because int might match the return type of a GCC
9720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721#ifdef __cplusplus
9722extern "C"
9723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009724char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ;
9730 return 0;
9731}
9732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009735else
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738rm -f core conftest.err conftest.$ac_objext \
9739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9743$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009744if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 cat >>confdefs.h <<_ACEOF
9746#define HAVE_LIBDLD 1
9747_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009749 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009751fi
9752 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009753
Michael Felt0d3ccb42017-12-30 22:39:20 +01009754# checks for uuid.h location
9755for ac_header in uuid/uuid.h uuid.h
9756do :
9757 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9758ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9759if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9760 cat >>confdefs.h <<_ACEOF
9761#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9762_ACEOF
9763
9764fi
9765
9766done
9767
9768
Berker Peksag9a10ff42017-11-08 23:09:16 +03009769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9770$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9772/* end confdefs.h. */
9773#include <uuid/uuid.h>
9774int
9775main ()
9776{
9777
9778#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009779void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009780#endif
9781
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786if ac_fn_c_try_compile "$LINENO"; then :
9787
9788$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9789
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9791$as_echo "yes" >&6; }
9792else
9793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9794$as_echo "no" >&6; }
9795
9796fi
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9798
Michael Felt0d3ccb42017-12-30 22:39:20 +01009799# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009800# FreeBSD and OpenBSD provides support as well
9801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9802$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9804/* end confdefs.h. */
9805#include <uuid.h>
9806int
9807main ()
9808{
9809
9810#ifndef uuid_create
9811void *x = uuid_create
9812#endif
9813
9814 ;
9815 return 0;
9816}
9817_ACEOF
9818if ac_fn_c_try_compile "$LINENO"; then :
9819
9820$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9821
9822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9823$as_echo "yes" >&6; }
9824else
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826$as_echo "no" >&6; }
9827
9828fi
9829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9830
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009831# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9832# stream in big-endian byte-order
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9834$as_echo_n "checking for uuid_enc_be... " >&6; }
9835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9836/* end confdefs.h. */
9837#include <uuid.h>
9838int
9839main ()
9840{
9841
9842#ifndef uuid_enc_be
Michael Felt20cd5c62018-06-09 15:59:02 -06009843void *x = uuid_enc_be
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009844#endif
9845
9846 ;
9847 return 0;
9848}
9849_ACEOF
9850if ac_fn_c_try_compile "$LINENO"; then :
9851
9852$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9853
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9855$as_echo "yes" >&6; }
9856else
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9858$as_echo "no" >&6; }
9859
9860fi
9861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9862
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009863# 'Real Time' functions on Solaris
9864# posix4 on Solaris 2.6
9865# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009867$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009870else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009871 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875/* Override any GCC internal prototype to avoid an error.
9876 Use char because int might match the return type of a GCC
9877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009878#ifdef __cplusplus
9879extern "C"
9880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009881char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009882int
9883main ()
9884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 ;
9887 return 0;
9888}
9889_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890for ac_lib in '' pthread rt posix4; do
9891 if test -z "$ac_lib"; then
9892 ac_res="none required"
9893 else
9894 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900rm -f core conftest.err conftest.$ac_objext \
9901 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009902 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905done
Victor Stinnere0be4232011-10-25 13:06:09 +02009906if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908else
9909 ac_cv_search_sem_init=no
9910fi
9911rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009912LIBS=$ac_func_search_save_LIBS
9913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9915$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009917if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009919
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009920fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009921
Martin v. Löwis519adae2003-09-20 10:47:47 +00009922
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9925$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009926if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009928else
9929 ac_check_lib_save_LIBS=$LIBS
9930LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934/* Override any GCC internal prototype to avoid an error.
9935 Use char because int might match the return type of a GCC
9936 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937#ifdef __cplusplus
9938extern "C"
9939#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009941int
9942main ()
9943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945 ;
9946 return 0;
9947}
9948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009949if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009950 ac_cv_lib_intl_textdomain=yes
9951else
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009954rm -f core conftest.err conftest.$ac_objext \
9955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009956LIBS=$ac_check_lib_save_LIBS
9957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9959$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009960if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009961
Matthias Kloseb9621712010-04-24 17:59:49 +00009962$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009963
Brett Cannonc6d936e2009-06-07 20:09:53 +00009964 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009965fi
9966
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009967
9968# checks for system dependent C++ extensions support
9969case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9971$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009973/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009974
Georg Brandl59e87bd2011-02-15 19:48:59 +00009975 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009976int
9977main ()
9978{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009979loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 ;
9981 return 0;
9982}
Matthias Kloseb159a552010-04-25 21:00:44 +00009983
Martin v. Löwis11437992002-04-12 09:54:03 +00009984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009985if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009986
Matthias Kloseb159a552010-04-25 21:00:44 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Matthias Kloseb159a552010-04-25 21:00:44 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009992
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009993else
Matthias Kloseb159a552010-04-25 21:00:44 +00009994
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009997
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009999rm -f core conftest.err conftest.$ac_objext \
10000 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010001 *) ;;
10002esac
10003
Christian Heimes985ecdc2013-11-20 11:46:18 +010010004# check for systems that require aligned memory access
10005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10006$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010007if ${ac_cv_aligned_required+:} false; then :
10008 $as_echo_n "(cached) " >&6
10009else
10010 if test "$cross_compiling" = yes; then :
10011 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012else
10013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10014/* end confdefs.h. */
10015
10016int main()
10017{
10018 char s[16];
10019 int i, *p1, *p2;
10020 for (i=0; i < 16; i++)
10021 s[i] = i;
10022 p1 = (int*)(s+1);
10023 p2 = (int*)(s+2);
10024 if (*p1 == *p2)
10025 return 1;
10026 return 0;
10027}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010028_ACEOF
10029if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010030 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010031else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010032 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010033fi
10034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10035 conftest.$ac_objext conftest.beam conftest.$ac_ext
10036fi
10037
10038
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010039fi
10040
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10042$as_echo "$ac_cv_aligned_required" >&6; }
10043if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010044
10045$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10046
10047fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010048
10049# str, bytes and memoryview hash algorithm
10050
10051
10052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10053$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10054
10055# Check whether --with-hash_algorithm was given.
10056if test "${with_hash_algorithm+set}" = set; then :
10057 withval=$with_hash_algorithm;
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10059$as_echo "$withval" >&6; }
10060case "$withval" in
10061 siphash24)
10062 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10063
10064 ;;
10065 fnv)
10066 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10067
10068 ;;
10069 *)
10070 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10071 ;;
10072esac
10073
10074else
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10076$as_echo "default" >&6; }
10077fi
10078
10079
Charles-François Natalid30b0222014-05-08 23:08:51 +010010080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10081$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10082
10083# Check whether --with-address_sanitizer was given.
10084if test "${with_address_sanitizer+set}" = set; then :
10085 withval=$with_address_sanitizer;
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10087$as_echo "$withval" >&6; }
10088BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10089LDFLAGS="-fsanitize=address $LDFLAGS"
10090
10091else
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
10094fi
10095
10096
Guido van Rossum70c7f481998-03-26 18:44:10 +000010097# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10099$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010100if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010102else
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010104LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108/* Override any GCC internal prototype to avoid an error.
10109 Use char because int might match the return type of a GCC
10110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010111#ifdef __cplusplus
10112extern "C"
10113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010114char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010115int
10116main ()
10117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ;
10120 return 0;
10121}
10122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010128rm -f core conftest.err conftest.$ac_objext \
10129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010130LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10133$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010134if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010135 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010136fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010137 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10139$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010140if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010142else
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010144LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010148/* Override any GCC internal prototype to avoid an error.
10149 Use char because int might match the return type of a GCC
10150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151#ifdef __cplusplus
10152extern "C"
10153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010154char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010155int
10156main ()
10157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 ;
10160 return 0;
10161}
10162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010165else
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168rm -f core conftest.err conftest.$ac_objext \
10169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010170LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10173$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010174if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010175 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010176fi
10177 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010178
Matthias Kloseb9621712010-04-24 17:59:49 +000010179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10180$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10186$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010187LIBS="$withval $LIBS"
10188
10189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192fi
10193
Guido van Rossum7f43da71994-08-01 12:15:30 +000010194
Victor Stinner8291b5e2015-03-20 16:03:14 +010010195
10196
10197
10198
10199
10200
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010201
Victor Stinner8291b5e2015-03-20 16:03:14 +010010202if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10203 if test -n "$ac_tool_prefix"; then
10204 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10205set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10207$as_echo_n "checking for $ac_word... " >&6; }
10208if ${ac_cv_path_PKG_CONFIG+:} false; then :
10209 $as_echo_n "(cached) " >&6
10210else
10211 case $PKG_CONFIG in
10212 [\\/]* | ?:[\\/]*)
10213 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10214 ;;
10215 *)
10216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10217for as_dir in $PATH
10218do
10219 IFS=$as_save_IFS
10220 test -z "$as_dir" && as_dir=.
10221 for ac_exec_ext in '' $ac_executable_extensions; do
10222 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10223 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10225 break 2
10226 fi
10227done
10228 done
10229IFS=$as_save_IFS
10230
10231 ;;
10232esac
10233fi
10234PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10235if test -n "$PKG_CONFIG"; then
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10237$as_echo "$PKG_CONFIG" >&6; }
10238else
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
10241fi
10242
10243
10244fi
10245if test -z "$ac_cv_path_PKG_CONFIG"; then
10246 ac_pt_PKG_CONFIG=$PKG_CONFIG
10247 # Extract the first word of "pkg-config", so it can be a program name with args.
10248set dummy pkg-config; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10252 $as_echo_n "(cached) " >&6
10253else
10254 case $ac_pt_PKG_CONFIG in
10255 [\\/]* | ?:[\\/]*)
10256 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10257 ;;
10258 *)
10259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262 IFS=$as_save_IFS
10263 test -z "$as_dir" && as_dir=.
10264 for ac_exec_ext in '' $ac_executable_extensions; do
10265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268 break 2
10269 fi
10270done
10271 done
10272IFS=$as_save_IFS
10273
10274 ;;
10275esac
10276fi
10277ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10278if test -n "$ac_pt_PKG_CONFIG"; then
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10280$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10281else
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286 if test "x$ac_pt_PKG_CONFIG" = x; then
10287 PKG_CONFIG=""
10288 else
10289 case $cross_compiling:$ac_tool_warned in
10290yes:)
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10292$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10293ac_tool_warned=yes ;;
10294esac
10295 PKG_CONFIG=$ac_pt_PKG_CONFIG
10296 fi
10297else
10298 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10299fi
10300
10301fi
10302if test -n "$PKG_CONFIG"; then
10303 _pkg_min_version=0.9.0
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10305$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10306 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10308$as_echo "yes" >&6; }
10309 else
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312 PKG_CONFIG=""
10313 fi
10314fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010315
10316# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10318$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010319
10320# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010322 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010323else
10324 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010325fi
10326
10327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10329$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010330
10331# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10333$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010334
10335# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010336if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010337 withval=$with_system_ffi;
10338fi
10339
10340
Zachary Waref40d4dd2016-09-17 01:25:24 -050010341if test "$ac_sys_system" = "Darwin"
10342then
10343 case "$with_system_ffi" in
10344 "")
10345 with_system_ffi="no"
10346 ;;
10347 yes|no)
10348 ;;
10349 *)
10350 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10351 ;;
10352 esac
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10354$as_echo "$with_system_ffi" >&6; }
10355else
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10357$as_echo "yes" >&6; }
10358 if test "$with_system_ffi" != ""
10359 then
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10361$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10362 fi
10363 with_system_ffi="yes"
10364fi
Zachary Ware935043d2016-09-09 17:01:21 -070010365
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010366if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010367 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10368else
10369 LIBFFI_INCLUDEDIR=""
10370fi
10371
10372
Stefan Krah60187b52012-03-23 19:06:27 +010010373# Check for use of the system libmpdec library
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10375$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10376
10377# Check whether --with-system_libmpdec was given.
10378if test "${with_system_libmpdec+set}" = set; then :
10379 withval=$with_system_libmpdec;
10380else
10381 with_system_libmpdec="no"
10382fi
10383
10384
10385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10386$as_echo "$with_system_libmpdec" >&6; }
10387
Benjamin Peterson076ed002010-10-31 17:11:02 +000010388# Check for support for loadable sqlite extensions
10389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10390$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10391# Check whether --enable-loadable-sqlite-extensions was given.
10392if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10393 enableval=$enable_loadable_sqlite_extensions;
10394else
10395 enable_loadable_sqlite_extensions="no"
10396fi
10397
10398
10399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10400$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10401
Ned Deilyd819b932013-09-06 01:07:05 -070010402# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10403
10404
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10406$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10407
10408# Check whether --with-tcltk-includes was given.
10409if test "${with_tcltk_includes+set}" = set; then :
10410 withval=$with_tcltk_includes;
10411else
10412 with_tcltk_includes="default"
10413fi
10414
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10416$as_echo "$with_tcltk_includes" >&6; }
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10418$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10419
10420# Check whether --with-tcltk-libs was given.
10421if test "${with_tcltk_libs+set}" = set; then :
10422 withval=$with_tcltk_libs;
10423else
10424 with_tcltk_libs="default"
10425fi
10426
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10428$as_echo "$with_tcltk_libs" >&6; }
10429if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10430then
10431 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10432 then
10433 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10434 fi
10435 TCLTK_INCLUDES=""
10436 TCLTK_LIBS=""
10437else
10438 TCLTK_INCLUDES="$with_tcltk_includes"
10439 TCLTK_LIBS="$with_tcltk_libs"
10440fi
10441
Matthias Klose55708cc2009-04-30 08:06:49 +000010442# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10444$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010445
10446# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010447if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010448 withval=$with_dbmliborder;
10449if test x$with_dbmliborder = xyes
10450then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010451as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010452else
10453 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10454 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10455 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010456 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010457 fi
10458 done
10459fi
10460fi
10461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10463$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465
Martin v. Löwis11437992002-04-12 09:54:03 +000010466
10467# Templates for things AC_DEFINEd more than once.
10468# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010469
10470
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010471if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010472then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010473 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010475
10476 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477elif test "$ac_cv_kpthread" = "yes"
10478then
10479 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010480 if test "$ac_cv_cxx_thread" = "yes"; then
10481 CXX="$CXX -Kpthread"
10482 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010483 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010484elif test "$ac_cv_kthread" = "yes"
10485then
10486 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010487 if test "$ac_cv_cxx_thread" = "yes"; then
10488 CXX="$CXX -Kthread"
10489 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010490 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010491elif test "$ac_cv_pthread" = "yes"
10492then
10493 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010494 if test "$ac_cv_cxx_thread" = "yes"; then
10495 CXX="$CXX -pthread"
10496 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010497 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010498else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010499 if test ! -z "$withval" -a -d "$withval"
10500 then LDFLAGS="$LDFLAGS -L$withval"
10501 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010502
10503 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010504 # define _POSIX_THREADS in unistd.h. Some apparently don't
10505 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10507$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010510
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010511#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010512#ifdef _POSIX_THREADS
10513yes
10514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010515
10516_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010519 unistd_defines_pthreads=yes
10520else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010521 unistd_defines_pthreads=no
10522fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010523rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010524
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10526$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010529
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010530 # Just looking for pthread_create in libpthread is not enough:
10531 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10532 # So we really have to include pthread.h, and then link.
10533 _libs=$LIBS
10534 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10536$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010539
10540#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010541#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010542
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010543void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010544int
10545main ()
10546{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010547
10548pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 ;
10550 return 0;
10551}
10552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010554
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10556$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010557 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010558
Guido van Rossum02a1c402000-02-25 19:26:31 +000010559else
Martin v. Löwis11437992002-04-12 09:54:03 +000010560
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010561 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010564
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010566
Guido van Rossumad678af1998-10-02 14:42:15 +000010567else
Guido van Rossumad678af1998-10-02 14:42:15 +000010568
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10570$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010571if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573else
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010575LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579/* Override any GCC internal prototype to avoid an error.
10580 Use char because int might match the return type of a GCC
10581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010582#ifdef __cplusplus
10583extern "C"
10584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010585char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010586int
10587main ()
10588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 ;
10591 return 0;
10592}
10593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010594if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010596else
Matthias Kloseb9621712010-04-24 17:59:49 +000010597 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010599rm -f core conftest.err conftest.$ac_objext \
10600 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010601LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10604$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010605if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010606
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010607 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010608 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010609
Greg Steinadf63d62000-07-05 10:38:09 +000010610else
Greg Steinadf63d62000-07-05 10:38:09 +000010611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10613$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010614if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010616else
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010618LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622/* Override any GCC internal prototype to avoid an error.
10623 Use char because int might match the return type of a GCC
10624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010625#ifdef __cplusplus
10626extern "C"
10627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010628char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010629int
10630main ()
10631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 ;
10634 return 0;
10635}
10636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010639else
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010642rm -f core conftest.err conftest.$ac_objext \
10643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010644LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10647$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010648if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010649
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010650 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010651 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010652
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010653else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010654
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10656$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010657if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010659else
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010661LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665/* Override any GCC internal prototype to avoid an error.
10666 Use char because int might match the return type of a GCC
10667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010668#ifdef __cplusplus
10669extern "C"
10670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010671char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010672int
10673main ()
10674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010682else
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010685rm -f core conftest.err conftest.$ac_objext \
10686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010687LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10690$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010691if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010694 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010695
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010696else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10699$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010700if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010702else
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010704LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708/* Override any GCC internal prototype to avoid an error.
10709 Use char because int might match the return type of a GCC
10710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010711#ifdef __cplusplus
10712extern "C"
10713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010714char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010715int
10716main ()
10717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010728rm -f core conftest.err conftest.$ac_objext \
10729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010730LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10733$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010734if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010735
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010736 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010737 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010738
Guido van Rossumb93a8621998-05-07 13:27:32 +000010739else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010740
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010741 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10742
Guido van Rossum2d38f911996-06-26 19:47:01 +000010743fi
10744
Guido van Rossum627b2d71993-12-24 10:39:16 +000010745
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010746fi
10747
Guido van Rossum0be3e491997-05-22 20:33:33 +000010748fi
10749
Guido van Rossum49545951997-12-02 19:28:29 +000010750fi
10751
Guido van Rossumb93a8621998-05-07 13:27:32 +000010752fi
10753
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10759$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010760if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010762else
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010764LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768/* Override any GCC internal prototype to avoid an error.
10769 Use char because int might match the return type of a GCC
10770 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010771#ifdef __cplusplus
10772extern "C"
10773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010774char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010775int
10776main ()
10777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 ;
10780 return 0;
10781}
10782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010783if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785else
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010788rm -f core conftest.err conftest.$ac_objext \
10789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010790LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10793$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010794if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010795
Martin v. Löwis130fb172001-07-19 11:00:41 +000010796 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010797
Guido van Rossum627b2d71993-12-24 10:39:16 +000010798fi
10799
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010800
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010801fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010802
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010803if test "$posix_threads" = "yes"; then
10804 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010807
10808 fi
10809
10810 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10811 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010812 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010813$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010814
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010815 ;;
10816 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010817$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818
10819 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010820 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010821$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010822
10823 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010824 esac
10825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10827$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010828 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010832 ac_cv_pthread_system_supported=no
10833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010835/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010836
10837 #include <stdio.h>
10838 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010839 void *foo(void *parm) {
10840 return NULL;
10841 }
10842 main() {
10843 pthread_attr_t attr;
10844 pthread_t id;
10845 if (pthread_attr_init(&attr)) exit(-1);
10846 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10847 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10848 exit(0);
10849 }
10850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010851if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852 ac_cv_pthread_system_supported=yes
10853else
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010858fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010860
Guido van Rossum627b2d71993-12-24 10:39:16 +000010861fi
10862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10864$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010865 if test "$ac_cv_pthread_system_supported" = "yes"; then
10866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868
10869 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 for ac_func in pthread_sigmask
10871do :
10872 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010873if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010874 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010875#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010877 case $ac_sys_system in
10878 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010879
Matthias Kloseb9621712010-04-24 17:59:49 +000010880$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010881
10882 ;;
10883 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884fi
10885done
10886
pdoxe14679c2017-10-05 00:01:56 -070010887 for ac_func in pthread_getcpuclockid
10888do :
10889 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10890if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10891 cat >>confdefs.h <<_ACEOF
10892#define HAVE_PTHREAD_GETCPUCLOCKID 1
10893_ACEOF
10894
10895fi
10896done
10897
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010898fi
10899
10900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10904$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010906if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010907 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911 ipv6=no
10912 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10914$as_echo "yes" >&6; }
10915 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916
10917 ipv6=yes
10918 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010920else
Martin v. Löwis11437992002-04-12 09:54:03 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924 /* AF_INET6 available check */
10925#include <sys/types.h>
10926#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010927int
10928main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010930int domain = AF_INET6;
10931 ;
10932 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933}
Martin v. Löwis11437992002-04-12 09:54:03 +000010934_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010935if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10938$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941else
Matthias Kloseb159a552010-04-25 21:00:44 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10944$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010946
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010950if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10952$as_echo_n "checking if RFC2553 API is available... " >&6; }
10953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010954/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010955
10956 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010957#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010958int
10959main ()
10960{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010961struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010962 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ;
10964 return 0;
10965}
Matthias Kloseb159a552010-04-25 21:00:44 +000010966
Martin v. Löwis11437992002-04-12 09:54:03 +000010967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010968if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010972 ipv6=yes
10973
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010974else
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010978 ipv6=no
10979
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010982fi
10983
10984if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010986
10987fi
10988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989fi
10990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991
10992ipv6type=unknown
10993ipv6lib=none
10994ipv6trylibc=no
10995
10996if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10998$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010999 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11000 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001 case $i in
11002 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011005
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006#include <netinet/in.h>
11007#ifdef IPV6_INRIA_VERSION
11008yes
11009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011010_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011011if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011013 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011014fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011015rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016
11017 ;;
11018 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011022#include <netinet/in.h>
11023#ifdef __KAME__
11024yes
11025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029 ipv6type=$i;
11030 ipv6lib=inet6
11031 ipv6libdir=/usr/local/v6/lib
11032 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011034rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035
11036 ;;
11037 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011039/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011040
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041#include <features.h>
11042#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11043yes
11044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011045_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048 ipv6type=$i;
11049 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011051rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052
11053 ;;
11054 linux-inet6)
11055 if test -d /usr/inet6; then
11056 ipv6type=$i
11057 ipv6lib=inet6
11058 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011059 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060 fi
11061 ;;
11062 solaris)
11063 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011064 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011065 ipv6type=$i
11066 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067 fi
11068 fi
11069 ;;
11070 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011073
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074#include <sys/param.h>
11075#ifdef _TOSHIBA_INET6
11076yes
11077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081 ipv6type=$i;
11082 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011083 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011084fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011085rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086
11087 ;;
11088 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092#include </usr/local/v6/include/sys/v6config.h>
11093#ifdef __V6D__
11094yes
11095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099 ipv6type=$i;
11100 ipv6lib=v6;
11101 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011102 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011104rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105
11106 ;;
11107 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011110
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111#include <sys/param.h>
11112#ifdef _ZETA_MINAMI_INET6
11113yes
11114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118 ipv6type=$i;
11119 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011120 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011121fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011122rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123
11124 ;;
11125 esac
11126 if test "$ipv6type" != "unknown"; then
11127 break
11128 fi
11129 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11131$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132fi
11133
11134if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11135 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11136 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11137 echo "using lib$ipv6lib"
11138 else
11139 if test $ipv6trylibc = "yes"; then
11140 echo "using libc"
11141 else
11142 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11143 echo "You need to fetch lib$ipv6lib.a from appropriate"
11144 echo 'ipv6 kit and compile beforehand.'
11145 exit 1
11146 fi
11147 fi
11148fi
11149
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11151$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11153/* end confdefs.h. */
11154 /* CAN_RAW_FD_FRAMES available check */
11155#include <linux/can/raw.h>
11156int
11157main ()
11158{
11159int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11160 ;
11161 return 0;
11162}
11163_ACEOF
11164if ac_fn_c_try_compile "$LINENO"; then :
11165
11166
11167$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11168
11169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11170$as_echo "yes" >&6; }
11171
11172else
11173
11174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175$as_echo "no" >&6; }
11176
11177fi
11178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11179
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011180# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11182$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011186 withval=$with_doc_strings;
11187fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011188
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011189
11190if test -z "$with_doc_strings"
11191then with_doc_strings="yes"
11192fi
11193if test "$with_doc_strings" != "no"
11194then
11195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011197
11198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11200$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011201
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011202# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11204$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011207if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208 withval=$with_pymalloc;
11209fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011210
Neil Schemenauera35c6882001-02-27 04:45:05 +000011211
Neil Schemenauer16c22972002-03-22 15:34:49 +000011212if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011213then
11214 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011215fi
11216if test "$with_pymalloc" != "no"
11217then
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Matthias Kloseb9621712010-04-24 17:59:49 +000011219$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011220
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011221 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11224$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011225
Nick Coghlan6ea41862017-06-11 13:16:15 +100011226# Check for --with-c-locale-coercion
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11228$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11229
11230# Check whether --with-c-locale-coercion was given.
11231if test "${with_c_locale_coercion+set}" = set; then :
11232 withval=$with_c_locale_coercion;
11233fi
11234
11235
11236if test -z "$with_c_locale_coercion"
11237then
11238 with_c_locale_coercion="yes"
11239fi
11240if test "$with_c_locale_coercion" != "no"
11241then
11242
11243$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11244
11245fi
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11247$as_echo "$with_c_locale_coercion" >&6; }
11248
Benjamin Peterson05159c42009-12-03 03:01:27 +000011249# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11251$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011252
11253# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011254if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011255 withval=$with_valgrind;
11256else
11257 with_valgrind=no
11258fi
11259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11261$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011262if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 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 +020011264if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011265
Matthias Kloseb9621712010-04-24 17:59:49 +000011266$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011267
11268else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011269 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011270
11271fi
11272
11273
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011274 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011275fi
11276
Łukasz Langaa785c872016-09-09 17:37:37 -070011277# Check for DTrace support
11278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11279$as_echo_n "checking for --with-dtrace... " >&6; }
11280
11281# Check whether --with-dtrace was given.
11282if test "${with_dtrace+set}" = set; then :
11283 withval=$with_dtrace;
11284else
11285 with_dtrace=no
11286fi
11287
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11289$as_echo "$with_dtrace" >&6; }
11290
11291
11292
11293
11294
11295DTRACE=
11296DFLAGS=
11297DTRACE_HEADERS=
11298DTRACE_OBJS=
11299
11300if test "$with_dtrace" = "yes"
11301then
11302 # Extract the first word of "dtrace", so it can be a program name with args.
11303set dummy dtrace; ac_word=$2
11304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11305$as_echo_n "checking for $ac_word... " >&6; }
11306if ${ac_cv_path_DTRACE+:} false; then :
11307 $as_echo_n "(cached) " >&6
11308else
11309 case $DTRACE in
11310 [\\/]* | ?:[\\/]*)
11311 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11312 ;;
11313 *)
11314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11315for as_dir in $PATH
11316do
11317 IFS=$as_save_IFS
11318 test -z "$as_dir" && as_dir=.
11319 for ac_exec_ext in '' $ac_executable_extensions; do
11320 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11321 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11323 break 2
11324 fi
11325done
11326 done
11327IFS=$as_save_IFS
11328
11329 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11330 ;;
11331esac
11332fi
11333DTRACE=$ac_cv_path_DTRACE
11334if test -n "$DTRACE"; then
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11336$as_echo "$DTRACE" >&6; }
11337else
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339$as_echo "no" >&6; }
11340fi
11341
11342
11343 if test "$DTRACE" = "not found"; then
11344 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11345 fi
11346
11347$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11348
11349 DTRACE_HEADERS="Include/pydtrace_probes.h"
11350
11351 # On OS X, DTrace providers do not need to be explicitly compiled and
11352 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11353 # generation flag '-G'. We check for presence of this flag, rather than
11354 # hardcoding support by OS, in the interest of robustness.
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11356$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11357if ${ac_cv_dtrace_link+:} false; then :
11358 $as_echo_n "(cached) " >&6
11359else
11360 ac_cv_dtrace_link=no
11361 echo 'BEGIN' > conftest.d
11362 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11363 ac_cv_dtrace_link=yes
11364
11365fi
11366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11367$as_echo "$ac_cv_dtrace_link" >&6; }
11368 if test "$ac_cv_dtrace_link" = "yes"; then
11369 DTRACE_OBJS="Python/pydtrace.o"
11370 fi
11371fi
11372
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011373# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011374
Guido van Rossum98935bf2001-09-05 19:13:16 +000011375DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011376
Guido van Rossume97ee181999-12-20 21:27:22 +000011377# the dlopen() function means we might want to use dynload_shlib.o. some
11378# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011379for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011380do :
11381 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011382if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011385_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011386
Guido van Rossume97ee181999-12-20 21:27:22 +000011387fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011388done
Guido van Rossume97ee181999-12-20 21:27:22 +000011389
Michael W. Hudson54241132001-12-07 15:38:26 +000011390
Guido van Rossume97ee181999-12-20 21:27:22 +000011391# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11392# loading of modules.
11393
Matthias Kloseb9621712010-04-24 17:59:49 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11395$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011396if test -z "$DYNLOADFILE"
11397then
11398 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011399 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11400 if test "$ac_cv_func_dlopen" = yes
11401 then DYNLOADFILE="dynload_shlib.o"
11402 else DYNLOADFILE="dynload_aix.o"
11403 fi
11404 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011405 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011406 *)
11407 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11408 # out any dynamic loading
11409 if test "$ac_cv_func_dlopen" = yes
11410 then DYNLOADFILE="dynload_shlib.o"
11411 else DYNLOADFILE="dynload_stub.o"
11412 fi
11413 ;;
11414 esac
11415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11417$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011418if test "$DYNLOADFILE" != "dynload_stub.o"
11419then
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Matthias Kloseb9621712010-04-24 17:59:49 +000011421$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011422
11423fi
11424
Neil Schemenauer4e425612001-06-19 15:44:15 +000011425# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11426
Michael W. Hudson54241132001-12-07 15:38:26 +000011427
Matthias Kloseb9621712010-04-24 17:59:49 +000011428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11429$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011430if test -z "$MACHDEP_OBJS"
11431then
Jack Jansene578a632001-08-15 01:27:14 +000011432 MACHDEP_OBJS=$extra_machdep_objs
11433else
11434 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011435fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011436if test -z "$MACHDEP_OBJS"; then
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11438$as_echo "none" >&6; }
11439else
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11441$as_echo "$MACHDEP_OBJS" >&6; }
11442fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011443
Guido van Rossum627b2d71993-12-24 10:39:16 +000011444# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011445for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011446 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011447 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011448 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011449 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011450 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011451 if_nameindex \
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011452 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011453 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011454 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011455 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011456 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011457 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011458 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011459 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011460 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11461 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011462 sigaction sigaltstack siginterrupt sigpending sigrelse \
11463 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011464 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011465 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011466 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011467do :
11468 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11469ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011470if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011472#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011473_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011474
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011475fi
11476done
11477
Michael W. Hudson54241132001-12-07 15:38:26 +000011478
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011479# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11480# links. Some libc implementations have a stub lchmod implementation that always
11481# returns an error.
11482if test "$MACHDEP" != linux; then
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011483 for ac_func in lchmod
11484do :
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011485 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11486if test "x$ac_cv_func_lchmod" = xyes; then :
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011487 cat >>confdefs.h <<_ACEOF
11488#define HAVE_LCHMOD 1
11489_ACEOF
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011490
11491fi
Miss Islington (bot)35c94c72018-09-12 22:33:02 -070011492done
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011493
11494fi
11495
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011496ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11497 #include <dirent.h>
11498"
11499if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11500
11501$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11502
11503fi
11504
11505
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011506# For some functions, having a definition is not sufficient, since
11507# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11509$as_echo_n "checking for chroot... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011512#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011513int
11514main ()
11515{
11516void *x=chroot
11517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011524
Matthias Kloseb159a552010-04-25 21:00:44 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011530
11531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11534$as_echo_n "checking for link... " >&6; }
11535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011536/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011537#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011538int
11539main ()
11540{
11541void *x=link
11542 ;
11543 return 0;
11544}
11545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011547
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011549
Matthias Kloseb159a552010-04-25 21:00:44 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011551$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011552else
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011555
11556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11559$as_echo_n "checking for symlink... " >&6; }
11560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011561/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011562#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011563int
11564main ()
11565{
11566void *x=symlink
11567 ;
11568 return 0;
11569}
11570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011574
Matthias Kloseb159a552010-04-25 21:00:44 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011576$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011577else
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011580
11581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11584$as_echo_n "checking for fchdir... " >&6; }
11585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011586/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011587#include <unistd.h>
11588int
11589main ()
11590{
11591void *x=fchdir
11592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011599
Matthias Kloseb159a552010-04-25 21:00:44 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011605
11606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11609$as_echo_n "checking for fsync... " >&6; }
11610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011612#include <unistd.h>
11613int
11614main ()
11615{
11616void *x=fsync
11617 ;
11618 return 0;
11619}
11620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011624
Matthias Kloseb159a552010-04-25 21:00:44 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011626$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11629$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011630
11631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11634$as_echo_n "checking for fdatasync... " >&6; }
11635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011637#include <unistd.h>
11638int
11639main ()
11640{
11641void *x=fdatasync
11642 ;
11643 return 0;
11644}
11645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011646if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647
Matthias Kloseb9621712010-04-24 17:59:49 +000011648$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011649
Matthias Kloseb159a552010-04-25 21:00:44 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011651$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11654$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011655
11656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11659$as_echo_n "checking for epoll... " >&6; }
11660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011661/* end confdefs.h. */
11662#include <sys/epoll.h>
11663int
11664main ()
11665{
11666void *x=epoll_create
11667 ;
11668 return 0;
11669}
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011672
Matthias Kloseb9621712010-04-24 17:59:49 +000011673$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011674
Matthias Kloseb159a552010-04-25 21:00:44 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011680
11681fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11684$as_echo_n "checking for epoll_create1... " >&6; }
11685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11686/* end confdefs.h. */
11687#include <sys/epoll.h>
11688int
11689main ()
11690{
11691void *x=epoll_create1
11692 ;
11693 return 0;
11694}
11695_ACEOF
11696if ac_fn_c_try_compile "$LINENO"; then :
11697
11698$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11699
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11701$as_echo "yes" >&6; }
11702else
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704$as_echo "no" >&6; }
11705
11706fi
11707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11709$as_echo_n "checking for kqueue... " >&6; }
11710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011711/* end confdefs.h. */
11712
11713#include <sys/types.h>
11714#include <sys/event.h>
11715
11716int
11717main ()
11718{
11719int x=kqueue()
11720 ;
11721 return 0;
11722}
11723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011724if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011727
Matthias Kloseb159a552010-04-25 21:00:44 +000011728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011729$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011730else
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011733
11734fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11737$as_echo_n "checking for prlimit... " >&6; }
11738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11739/* end confdefs.h. */
11740
11741#include <sys/time.h>
11742#include <sys/resource.h>
11743
11744int
11745main ()
11746{
11747void *x=prlimit
11748 ;
11749 return 0;
11750}
11751_ACEOF
11752if ac_fn_c_try_compile "$LINENO"; then :
11753
11754$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11755
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11757$as_echo "yes" >&6; }
11758else
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11760$as_echo "no" >&6; }
11761
11762fi
11763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11764
Martin v. Löwisd5843682002-11-21 20:41:28 +000011765# On some systems (eg. FreeBSD 5), we would find a definition of the
11766# functions ctermid_r, setgroups in the library, but no prototype
11767# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11768# address to avoid compiler warnings and potential miscompilations
11769# because of the missing prototypes.
11770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11772$as_echo_n "checking for ctermid_r... " >&6; }
11773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011774/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011775
Martin v. Löwisd5843682002-11-21 20:41:28 +000011776#include <stdio.h>
11777
Martin v. Löwisd5843682002-11-21 20:41:28 +000011778int
11779main ()
11780{
11781void* p = ctermid_r
11782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011789
Matthias Kloseb159a552010-04-25 21:00:44 +000011790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11794$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011795
11796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11798
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11800$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011802 $as_echo_n "(cached) " >&6
11803else
11804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011806#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011807int
11808main ()
11809{
11810void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011811
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011812 ;
11813 return 0;
11814}
11815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011816if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011817 ac_cv_flock_decl=yes
11818else
11819 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011820
11821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011823
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011824fi
11825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11826$as_echo "$ac_cv_flock_decl" >&6; }
11827if test "x${ac_cv_flock_decl}" = xyes; then
11828 for ac_func in flock
11829do :
11830 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011831if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011832 cat >>confdefs.h <<_ACEOF
11833#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011834_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011835
Antoine Pitroua3000072010-09-07 14:52:42 +000011836else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011838$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011839if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011840 $as_echo_n "(cached) " >&6
11841else
11842 ac_check_lib_save_LIBS=$LIBS
11843LIBS="-lbsd $LIBS"
11844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11845/* end confdefs.h. */
11846
11847/* Override any GCC internal prototype to avoid an error.
11848 Use char because int might match the return type of a GCC
11849 builtin and then its argument prototype would still apply. */
11850#ifdef __cplusplus
11851extern "C"
11852#endif
11853char flock ();
11854int
11855main ()
11856{
11857return flock ();
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862if ac_fn_c_try_link "$LINENO"; then :
11863 ac_cv_lib_bsd_flock=yes
11864else
11865 ac_cv_lib_bsd_flock=no
11866fi
11867rm -f core conftest.err conftest.$ac_objext \
11868 conftest$ac_exeext conftest.$ac_ext
11869LIBS=$ac_check_lib_save_LIBS
11870fi
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11872$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011873if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011874 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011875
11876
11877$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11878
11879
11880fi
11881
11882
11883fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011884done
11885
Antoine Pitroua3000072010-09-07 14:52:42 +000011886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011887
Matthias Kloseb9621712010-04-24 17:59:49 +000011888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11889$as_echo_n "checking for getpagesize... " >&6; }
11890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011891/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011892
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011893#include <unistd.h>
11894
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011895int
11896main ()
11897{
11898void* p = getpagesize
11899 ;
11900 return 0;
11901}
11902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011906
Matthias Kloseb159a552010-04-25 21:00:44 +000011907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011908$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011912
11913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011915
Victor Stinner984890f2011-11-24 13:53:38 +010011916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11917$as_echo_n "checking for broken unsetenv... " >&6; }
11918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11919/* end confdefs.h. */
11920
11921#include <stdlib.h>
11922
11923int
11924main ()
11925{
11926int res = unsetenv("DUMMY")
11927 ;
11928 return 0;
11929}
11930_ACEOF
11931if ac_fn_c_try_compile "$LINENO"; then :
11932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934else
11935
11936$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11937
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11939$as_echo "yes" >&6; }
11940
11941fi
11942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11943
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011944for ac_prog in true
11945do
11946 # Extract the first word of "$ac_prog", so it can be a program name with args.
11947set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11949$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011950if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011952else
11953 if test -n "$TRUE"; then
11954 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11955else
11956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11957for as_dir in $PATH
11958do
11959 IFS=$as_save_IFS
11960 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011963 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 $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 +000011965 break 2
11966 fi
11967done
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011969IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011970
11971fi
11972fi
11973TRUE=$ac_cv_prog_TRUE
11974if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11976$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011977else
Matthias Kloseb9621712010-04-24 17:59:49 +000011978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011980fi
11981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011983 test -n "$TRUE" && break
11984done
11985test -n "$TRUE" || TRUE="/bin/true"
11986
11987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11989$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011990if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011992else
11993 ac_check_lib_save_LIBS=$LIBS
11994LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011998/* Override any GCC internal prototype to avoid an error.
11999 Use char because int might match the return type of a GCC
12000 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012001#ifdef __cplusplus
12002extern "C"
12003#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012004char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012005int
12006main ()
12007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012009 ;
12010 return 0;
12011}
12012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012014 ac_cv_lib_c_inet_aton=yes
12015else
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012018rm -f core conftest.err conftest.$ac_objext \
12019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012020LIBS=$ac_check_lib_save_LIBS
12021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12023$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012024if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012025 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012026else
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12028$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012031else
12032 ac_check_lib_save_LIBS=$LIBS
12033LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012035/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012037/* Override any GCC internal prototype to avoid an error.
12038 Use char because int might match the return type of a GCC
12039 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012040#ifdef __cplusplus
12041extern "C"
12042#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012043char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044int
12045main ()
12046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012048 ;
12049 return 0;
12050}
12051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053 ac_cv_lib_resolv_inet_aton=yes
12054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012057rm -f core conftest.err conftest.$ac_objext \
12058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012059LIBS=$ac_check_lib_save_LIBS
12060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12062$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012063if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012064 cat >>confdefs.h <<_ACEOF
12065#define HAVE_LIBRESOLV 1
12066_ACEOF
12067
12068 LIBS="-lresolv $LIBS"
12069
12070fi
12071
12072
12073fi
12074
12075
Christian Heimesd0764e22007-12-04 15:00:33 +000012076# On Tru64, chflags seems to be present, but calling it will
12077# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12079$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012080if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012084 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012087/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012088
Christian Heimesd0764e22007-12-04 15:00:33 +000012089#include <sys/stat.h>
12090#include <unistd.h>
12091int main(int argc, char*argv[])
12092{
12093 if(chflags(argv[0], 0) != 0)
12094 return 1;
12095 return 0;
12096}
Ned Deily3eb67d52011-06-28 00:00:28 -070012097
Christian Heimesd0764e22007-12-04 15:00:33 +000012098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012099if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012100 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012106fi
12107
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12111$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012112if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012114if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012115 ac_cv_have_chflags="yes"
12116else
12117 ac_cv_have_chflags="no"
12118fi
12119
12120fi
12121if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012124
12125fi
12126
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12128$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012129if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012133 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012136/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012137
Christian Heimesd0764e22007-12-04 15:00:33 +000012138#include <sys/stat.h>
12139#include <unistd.h>
12140int main(int argc, char*argv[])
12141{
12142 if(lchflags(argv[0], 0) != 0)
12143 return 1;
12144 return 0;
12145}
Ned Deily3eb67d52011-06-28 00:00:28 -070012146
Christian Heimesd0764e22007-12-04 15:00:33 +000012147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012149 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012155fi
12156
12157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12160$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012161if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012163if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012164 ac_cv_have_lchflags="yes"
12165else
12166 ac_cv_have_lchflags="no"
12167fi
12168
12169fi
12170if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012173
12174fi
12175
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012176case $ac_sys_system/$ac_sys_release in
12177Darwin/*)
12178 _CUR_CFLAGS="${CFLAGS}"
12179 _CUR_LDFLAGS="${LDFLAGS}"
12180 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12181 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12182 ;;
12183esac
12184
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12186$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012187if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012189else
12190 ac_check_lib_save_LIBS=$LIBS
12191LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012193/* end confdefs.h. */
12194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195/* Override any GCC internal prototype to avoid an error.
12196 Use char because int might match the return type of a GCC
12197 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012198#ifdef __cplusplus
12199extern "C"
12200#endif
12201char inflateCopy ();
12202int
12203main ()
12204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012206 ;
12207 return 0;
12208}
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012211 ac_cv_lib_z_inflateCopy=yes
12212else
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215rm -f core conftest.err conftest.$ac_objext \
12216 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012217LIBS=$ac_check_lib_save_LIBS
12218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12220$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012224
12225fi
12226
12227
12228case $ac_sys_system/$ac_sys_release in
12229Darwin/*)
12230 CFLAGS="${_CUR_CFLAGS}"
12231 LDFLAGS="${_CUR_LDFLAGS}"
12232 ;;
12233esac
12234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12236$as_echo_n "checking for hstrerror... " >&6; }
12237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012239
Martin v. Löwise9416172003-05-03 10:12:45 +000012240#include <netdb.h>
12241
Martin v. Löwise9416172003-05-03 10:12:45 +000012242int
12243main ()
12244{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012245void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012246 ;
12247 return 0;
12248}
12249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012250if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012253
Matthias Kloseb159a552010-04-25 21:00:44 +000012254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012255$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012256else
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12258$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012259
12260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012261rm -f core conftest.err conftest.$ac_objext \
12262 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12265$as_echo_n "checking for inet_aton... " >&6; }
12266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012267/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012268
Martin v. Löwis86d66262006-02-17 08:40:11 +000012269#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012270#include <sys/socket.h>
12271#include <netinet/in.h>
12272#include <arpa/inet.h>
12273
Martin v. Löwise9416172003-05-03 10:12:45 +000012274int
12275main ()
12276{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012277void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012278 ;
12279 return 0;
12280}
12281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012283
Matthias Kloseb9621712010-04-24 17:59:49 +000012284$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012285
Matthias Kloseb159a552010-04-25 21:00:44 +000012286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012288else
Matthias Kloseb9621712010-04-24 17:59:49 +000012289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12290$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012291
12292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012293rm -f core conftest.err conftest.$ac_objext \
12294 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12297$as_echo_n "checking for inet_pton... " >&6; }
12298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012300
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012301#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012302#include <sys/socket.h>
12303#include <netinet/in.h>
12304#include <arpa/inet.h>
12305
Martin v. Löwise9416172003-05-03 10:12:45 +000012306int
12307main ()
12308{
12309void* p = inet_pton
12310 ;
12311 return 0;
12312}
12313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012317
Matthias Kloseb159a552010-04-25 21:00:44 +000012318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012320else
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12322$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012323
12324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012326
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012327# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12329$as_echo_n "checking for setgroups... " >&6; }
12330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012332
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012333#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012334#ifdef HAVE_GRP_H
12335#include <grp.h>
12336#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012337
Martin v. Löwisd5843682002-11-21 20:41:28 +000012338int
12339main ()
12340{
12341void* p = setgroups
12342 ;
12343 return 0;
12344}
12345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012349
Matthias Kloseb159a552010-04-25 21:00:44 +000012350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012355
12356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012359# check for openpty and forkpty
12360
12361for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012362do :
12363 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012367_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012369else
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12371$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012372if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012374else
Martin v. Löwis11437992002-04-12 09:54:03 +000012375 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012376LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380/* Override any GCC internal prototype to avoid an error.
12381 Use char because int might match the return type of a GCC
12382 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012383#ifdef __cplusplus
12384extern "C"
12385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012386char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012387int
12388main ()
12389{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ;
12392 return 0;
12393}
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400rm -f core conftest.err conftest.$ac_objext \
12401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012402LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012403fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12405$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012408 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12411$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012412if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012414else
12415 ac_check_lib_save_LIBS=$LIBS
12416LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012418/* end confdefs.h. */
12419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420/* Override any GCC internal prototype to avoid an error.
12421 Use char because int might match the return type of a GCC
12422 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012423#ifdef __cplusplus
12424extern "C"
12425#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012426char openpty ();
12427int
12428main ()
12429{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012431 ;
12432 return 0;
12433}
12434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012436 ac_cv_lib_bsd_openpty=yes
12437else
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012440rm -f core conftest.err conftest.$ac_objext \
12441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012442LIBS=$ac_check_lib_save_LIBS
12443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12445$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012446if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012448 LIBS="$LIBS -lbsd"
12449fi
12450
12451
12452fi
12453
Fred Drake8cef4cf2000-06-28 16:40:38 +000012454
12455fi
12456done
12457
12458for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012459do :
12460 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012461if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012464_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012465
Fred Drake8cef4cf2000-06-28 16:40:38 +000012466else
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12468$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012471else
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012473LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477/* Override any GCC internal prototype to avoid an error.
12478 Use char because int might match the return type of a GCC
12479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012480#ifdef __cplusplus
12481extern "C"
12482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012483char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012487return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ;
12489 return 0;
12490}
12491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012497rm -f core conftest.err conftest.$ac_objext \
12498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012499LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12502$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012503if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012505 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012506else
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12508$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012509if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012511else
12512 ac_check_lib_save_LIBS=$LIBS
12513LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012515/* end confdefs.h. */
12516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517/* Override any GCC internal prototype to avoid an error.
12518 Use char because int might match the return type of a GCC
12519 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012520#ifdef __cplusplus
12521extern "C"
12522#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012523char forkpty ();
12524int
12525main ()
12526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012528 ;
12529 return 0;
12530}
12531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012532if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012533 ac_cv_lib_bsd_forkpty=yes
12534else
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012537rm -f core conftest.err conftest.$ac_objext \
12538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012539LIBS=$ac_check_lib_save_LIBS
12540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12542$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012543if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012545 LIBS="$LIBS -lbsd"
12546fi
12547
12548
12549fi
12550
Fred Drake8cef4cf2000-06-28 16:40:38 +000012551
12552fi
12553done
12554
Jack Jansendd19cf82001-12-06 22:36:17 +000012555
Michael W. Hudson54241132001-12-07 15:38:26 +000012556# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012558do :
12559 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12560ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012561if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012562 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012563#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012564_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012565
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012566fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012567done
12568
Michael W. Hudson54241132001-12-07 15:38:26 +000012569
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012570ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012571if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012572 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012573
Martin v. Löwis1142de32002-03-29 16:28:31 +000012574else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012576 *" dup2.$ac_objext "* ) ;;
12577 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012579esac
12580
Martin v. Löwis1142de32002-03-29 16:28:31 +000012581fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012582
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012583ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012584if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012585 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12586
12587else
12588 case " $LIBOBJS " in
12589 *" strdup.$ac_objext "* ) ;;
12590 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12591 ;;
12592esac
12593
12594fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012595
12596
12597for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012598do :
12599 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012600if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012602#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012605/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012607int
12608main ()
12609{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 ;
12612 return 0;
12613}
12614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012618
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012621
Guido van Rossum627b2d71993-12-24 10:39:16 +000012622fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012623done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624
Jack Jansen150753c2003-03-29 22:07:47 +000012625for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012626do :
12627 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012628if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012629 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012633/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012634#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012635int
12636main ()
12637{
12638setpgrp(0,0);
12639 ;
12640 return 0;
12641}
12642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
Matthias Kloseb9621712010-04-24 17:59:49 +000012645$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012646
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012649
12650fi
12651done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012652
Thomas Wouters3a584202000-08-05 23:28:51 +000012653for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012654do :
12655 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012656if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012658#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012661/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012662#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012663int
12664main ()
12665{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 ;
12668 return 0;
12669}
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_compile "$LINENO"; then :
12672
Guido van Rossum627b2d71993-12-24 10:39:16 +000012673else
Skip Montanaro6dead952003-09-25 14:50:04 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012676
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Guido van Rossum627b2d71993-12-24 10:39:16 +000012678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012682done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683
Michael W. Hudson54241132001-12-07 15:38:26 +000012684
Victor Stinnere0be4232011-10-25 13:06:09 +020012685for ac_func in clock_gettime
12686do :
12687 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12688if test "x$ac_cv_func_clock_gettime" = xyes; then :
12689 cat >>confdefs.h <<_ACEOF
12690#define HAVE_CLOCK_GETTIME 1
12691_ACEOF
12692
12693else
12694
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12696$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12697if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12698 $as_echo_n "(cached) " >&6
12699else
12700 ac_check_lib_save_LIBS=$LIBS
12701LIBS="-lrt $LIBS"
12702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12703/* end confdefs.h. */
12704
12705/* Override any GCC internal prototype to avoid an error.
12706 Use char because int might match the return type of a GCC
12707 builtin and then its argument prototype would still apply. */
12708#ifdef __cplusplus
12709extern "C"
12710#endif
12711char clock_gettime ();
12712int
12713main ()
12714{
12715return clock_gettime ();
12716 ;
12717 return 0;
12718}
12719_ACEOF
12720if ac_fn_c_try_link "$LINENO"; then :
12721 ac_cv_lib_rt_clock_gettime=yes
12722else
12723 ac_cv_lib_rt_clock_gettime=no
12724fi
12725rm -f core conftest.err conftest.$ac_objext \
12726 conftest$ac_exeext conftest.$ac_ext
12727LIBS=$ac_check_lib_save_LIBS
12728fi
12729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12730$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12731if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12732
Victor Stinner7efb8332014-08-29 15:41:08 +020012733 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012734 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12735
12736
12737$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12738
12739
12740fi
12741
12742
12743fi
12744done
12745
12746
12747for ac_func in clock_getres
12748do :
12749 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12750if test "x$ac_cv_func_clock_getres" = xyes; then :
12751 cat >>confdefs.h <<_ACEOF
12752#define HAVE_CLOCK_GETRES 1
12753_ACEOF
12754
12755else
12756
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12758$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12759if ${ac_cv_lib_rt_clock_getres+:} false; then :
12760 $as_echo_n "(cached) " >&6
12761else
12762 ac_check_lib_save_LIBS=$LIBS
12763LIBS="-lrt $LIBS"
12764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12765/* end confdefs.h. */
12766
12767/* Override any GCC internal prototype to avoid an error.
12768 Use char because int might match the return type of a GCC
12769 builtin and then its argument prototype would still apply. */
12770#ifdef __cplusplus
12771extern "C"
12772#endif
12773char clock_getres ();
12774int
12775main ()
12776{
12777return clock_getres ();
12778 ;
12779 return 0;
12780}
12781_ACEOF
12782if ac_fn_c_try_link "$LINENO"; then :
12783 ac_cv_lib_rt_clock_getres=yes
12784else
12785 ac_cv_lib_rt_clock_getres=no
12786fi
12787rm -f core conftest.err conftest.$ac_objext \
12788 conftest$ac_exeext conftest.$ac_ext
12789LIBS=$ac_check_lib_save_LIBS
12790fi
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12792$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12793if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12794
12795 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12796
12797
12798fi
12799
12800
12801fi
12802done
12803
12804
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012805for ac_func in clock_settime
12806do :
12807 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12808if test "x$ac_cv_func_clock_settime" = xyes; then :
12809 cat >>confdefs.h <<_ACEOF
12810#define HAVE_CLOCK_SETTIME 1
12811_ACEOF
12812
12813else
12814
12815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12816$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12817if ${ac_cv_lib_rt_clock_settime+:} false; then :
12818 $as_echo_n "(cached) " >&6
12819else
12820 ac_check_lib_save_LIBS=$LIBS
12821LIBS="-lrt $LIBS"
12822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12823/* end confdefs.h. */
12824
12825/* Override any GCC internal prototype to avoid an error.
12826 Use char because int might match the return type of a GCC
12827 builtin and then its argument prototype would still apply. */
12828#ifdef __cplusplus
12829extern "C"
12830#endif
12831char clock_settime ();
12832int
12833main ()
12834{
12835return clock_settime ();
12836 ;
12837 return 0;
12838}
12839_ACEOF
12840if ac_fn_c_try_link "$LINENO"; then :
12841 ac_cv_lib_rt_clock_settime=yes
12842else
12843 ac_cv_lib_rt_clock_settime=no
12844fi
12845rm -f core conftest.err conftest.$ac_objext \
12846 conftest$ac_exeext conftest.$ac_ext
12847LIBS=$ac_check_lib_save_LIBS
12848fi
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12850$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12851if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12852
12853 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12854
12855
12856fi
12857
12858
12859fi
12860done
12861
12862
Matthias Kloseb9621712010-04-24 17:59:49 +000012863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12864$as_echo_n "checking for major... " >&6; }
12865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012866/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012867
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012868#if defined(MAJOR_IN_MKDEV)
12869#include <sys/mkdev.h>
12870#elif defined(MAJOR_IN_SYSMACROS)
12871#include <sys/sysmacros.h>
12872#else
12873#include <sys/types.h>
12874#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012875
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012876int
12877main ()
12878{
12879
12880 makedev(major(0),minor(0));
12881
12882 ;
12883 return 0;
12884}
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012887
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12892$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012893
12894else
Skip Montanaro6dead952003-09-25 14:50:04 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12897$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012898
12899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012900rm -f core conftest.err conftest.$ac_objext \
12901 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012902
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012903# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012904# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12906$as_echo_n "checking for getaddrinfo... " >&6; }
12907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012908/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012909
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012910#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012911#include <sys/socket.h>
12912#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012913#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914
Martin v. Löwis11437992002-04-12 09:54:03 +000012915int
12916main ()
12917{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012918getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012924 have_getaddrinfo=yes
12925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext conftest.$ac_ext
12930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12931$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012932if test $have_getaddrinfo = yes
12933then
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12935$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012936 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012938else
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012940
12941if test "${enable_ipv6+set}" = set; then
12942 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12943else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012944 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012945fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012949
Stefan Krah19c21392012-11-22 23:47:32 +010012950#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012951#include <sys/types.h>
12952#include <netdb.h>
12953#include <string.h>
12954#include <sys/socket.h>
12955#include <netinet/in.h>
12956
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012957int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012958{
12959 int passive, gaierr, inet4 = 0, inet6 = 0;
12960 struct addrinfo hints, *ai, *aitop;
12961 char straddr[INET6_ADDRSTRLEN], strport[16];
12962
12963 for (passive = 0; passive <= 1; passive++) {
12964 memset(&hints, 0, sizeof(hints));
12965 hints.ai_family = AF_UNSPEC;
12966 hints.ai_flags = passive ? AI_PASSIVE : 0;
12967 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012968 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012969 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12970 (void)gai_strerror(gaierr);
12971 goto bad;
12972 }
12973 for (ai = aitop; ai; ai = ai->ai_next) {
12974 if (ai->ai_addr == NULL ||
12975 ai->ai_addrlen == 0 ||
12976 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12977 straddr, sizeof(straddr), strport, sizeof(strport),
12978 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12979 goto bad;
12980 }
12981 switch (ai->ai_family) {
12982 case AF_INET:
12983 if (strcmp(strport, "54321") != 0) {
12984 goto bad;
12985 }
12986 if (passive) {
12987 if (strcmp(straddr, "0.0.0.0") != 0) {
12988 goto bad;
12989 }
12990 } else {
12991 if (strcmp(straddr, "127.0.0.1") != 0) {
12992 goto bad;
12993 }
12994 }
12995 inet4++;
12996 break;
12997 case AF_INET6:
12998 if (strcmp(strport, "54321") != 0) {
12999 goto bad;
13000 }
13001 if (passive) {
13002 if (strcmp(straddr, "::") != 0) {
13003 goto bad;
13004 }
13005 } else {
13006 if (strcmp(straddr, "::1") != 0) {
13007 goto bad;
13008 }
13009 }
13010 inet6++;
13011 break;
13012 case AF_UNSPEC:
13013 goto bad;
13014 break;
13015 default:
13016 /* another family support? */
13017 break;
13018 }
13019 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013020 freeaddrinfo(aitop);
13021 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013022 }
13023
13024 if (!(inet4 == 0 || inet4 == 2))
13025 goto bad;
13026 if (!(inet6 == 0 || inet6 == 2))
13027 goto bad;
13028
13029 if (aitop)
13030 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013031 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013032
13033 bad:
13034 if (aitop)
13035 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013036 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013037}
13038
Martin v. Löwis11437992002-04-12 09:54:03 +000013039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013040if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013041 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013049fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013050
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13054$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13055
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013056if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013057then
13058 if test $ipv6 = yes
13059 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060 echo 'Fatal: You must get working getaddrinfo() function.'
13061 echo ' or you can specify "--disable-ipv6"'.
13062 exit 1
13063 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013067
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013069
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013070for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013071do :
13072 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013073if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013077
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013078fi
13079done
13080
Michael W. Hudson54241132001-12-07 15:38:26 +000013081
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013082# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13084$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013085if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013087else
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090#include <sys/types.h>
13091#include <sys/time.h>
13092#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
Martin v. Löwis11437992002-04-12 09:54:03 +000013094int
13095main ()
13096{
13097if ((struct tm *) 0)
13098return 0;
13099 ;
13100 return 0;
13101}
13102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013104 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13111$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013112if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115
13116fi
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13119$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013120if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125#include <sys/types.h>
13126#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128int
13129main ()
13130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131struct tm tm;
13132 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 ;
13135 return 0;
13136}
13137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013138if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139 ac_cv_struct_tm=time.h
13140else
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13146$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013147if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
Matthias Kloseb9621712010-04-24 17:59:49 +000013149$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013150
13151fi
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153ac_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 +000013154#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156"
Victor Stinnere0be4232011-10-25 13:06:09 +020013157if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
13159cat >>confdefs.h <<_ACEOF
13160#define HAVE_STRUCT_TM_TM_ZONE 1
13161_ACEOF
13162
13163
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013165
Martin v. Löwis11437992002-04-12 09:54:03 +000013166if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013169
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13172"
Victor Stinnere0be4232011-10-25 13:06:09 +020013173if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177fi
13178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013179cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013180#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181_ACEOF
13182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13184$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013185if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013190#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191#if !HAVE_DECL_TZNAME
13192extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
Martin v. Löwis11437992002-04-12 09:54:03 +000013195int
13196main ()
13197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204 ac_cv_var_tzname=yes
13205else
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013208rm -f core conftest.err conftest.$ac_objext \
13209 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13212$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013213 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013216
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217 fi
13218fi
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220ac_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 +020013221if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
13223cat >>confdefs.h <<_ACEOF
13224#define HAVE_STRUCT_STAT_ST_RDEV 1
13225_ACEOF
13226
13227
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013228fi
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230ac_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 +020013231if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233cat >>confdefs.h <<_ACEOF
13234#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13235_ACEOF
13236
13237
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013238fi
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240ac_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 +020013241if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013242
13243cat >>confdefs.h <<_ACEOF
13244#define HAVE_STRUCT_STAT_ST_FLAGS 1
13245_ACEOF
13246
13247
13248fi
13249
Matthias Kloseb9621712010-04-24 17:59:49 +000013250ac_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 +020013251if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013252
13253cat >>confdefs.h <<_ACEOF
13254#define HAVE_STRUCT_STAT_ST_GEN 1
13255_ACEOF
13256
13257
13258fi
13259
Matthias Kloseb9621712010-04-24 17:59:49 +000013260ac_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 +020013261if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013262
13263cat >>confdefs.h <<_ACEOF
13264#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13265_ACEOF
13266
13267
13268fi
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270ac_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 +020013271if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273cat >>confdefs.h <<_ACEOF
13274#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13275_ACEOF
13276
13277
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013278fi
13279
Stefan Krah267b6392016-04-26 01:09:18 +020013280ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13281 #include <sys/types.h>
13282 #include <pwd.h>
13283
13284"
13285if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13286
13287cat >>confdefs.h <<_ACEOF
13288#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13289_ACEOF
13290
13291
13292fi
13293ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13294 #include <sys/types.h>
13295 #include <pwd.h>
13296
13297"
13298if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13299
13300cat >>confdefs.h <<_ACEOF
13301#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13302_ACEOF
13303
13304
13305fi
13306
Zachary Ware6a6967e2016-10-01 00:47:27 -050013307# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13308ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13309"
13310if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13311
13312cat >>confdefs.h <<_ACEOF
13313#define HAVE_SIGINFO_T_SI_BAND 1
13314_ACEOF
13315
13316
13317fi
13318
Michael W. Hudson54241132001-12-07 15:38:26 +000013319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13321$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013322if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324else
Matthias Kloseb159a552010-04-25 21:00:44 +000013325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013327/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013328#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013329int
13330main ()
13331{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 ;
13334 return 0;
13335}
13336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013337if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338 ac_cv_header_time_altzone=yes
13339else
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344fi
13345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13347$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351
13352fi
13353
Guido van Rossumda88dad1995-01-26 00:46:29 +000013354was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13356$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013359
13360#include <sys/types.h>
13361#include <sys/select.h>
13362#include <sys/time.h>
13363
Martin v. Löwis11437992002-04-12 09:54:03 +000013364int
13365main ()
13366{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013367;
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 ;
13369 return 0;
13370}
13371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013377 was_it_defined=yes
13378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13382$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13385$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013386if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013391#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013392int
13393main ()
13394{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013395struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013396 ;
13397 return 0;
13398}
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013401 ac_cv_struct_addrinfo=yes
13402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13406fi
13407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13409$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013410if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013413
13414fi
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13417$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013418if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013422/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013423
13424# include <sys/types.h>
13425# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013426int
13427main ()
13428{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013429struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ;
13431 return 0;
13432}
13433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013435 ac_cv_struct_sockaddr_storage=yes
13436else
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13440fi
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13443$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013444if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013447
13448fi
13449
Christian Heimesdffa3942016-09-05 23:54:41 +020013450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13451$as_echo_n "checking for sockaddr_alg... " >&6; }
13452if ${ac_cv_struct_sockaddr_alg+:} false; then :
13453 $as_echo_n "(cached) " >&6
13454else
13455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13456/* end confdefs.h. */
13457
13458# include <sys/types.h>
13459# include <sys/socket.h>
13460# include <linux/if_alg.h>
13461int
13462main ()
13463{
13464struct sockaddr_alg s
13465 ;
13466 return 0;
13467}
13468_ACEOF
13469if ac_fn_c_try_compile "$LINENO"; then :
13470 ac_cv_struct_sockaddr_alg=yes
13471else
13472 ac_cv_struct_sockaddr_alg=no
13473fi
13474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13475fi
13476
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13478$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13479if test $ac_cv_struct_sockaddr_alg = yes; then
13480
13481$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13482
13483fi
13484
Guido van Rossum627b2d71993-12-24 10:39:16 +000013485# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13488$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013489if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013494$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013495int
13496main ()
13497{
13498static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013499test_array [0] = 0;
13500return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
13502 ;
13503 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013504}
Martin v. Löwis11437992002-04-12 09:54:03 +000013505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013506if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013507 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013508else
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13514$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517
13518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13521$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013522if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013526/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528int
13529main ()
13530{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013533 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013535 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537 char const *const *pcpcc;
13538 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 /* NEC SVR4.0.2 mips cc rejects this. */
13540 struct point {int x, y;};
13541 static struct point const zero = {0,0};
13542 /* AIX XL C 1.02.0.0 rejects this.
13543 It does not let you subtract one const X* pointer from another in
13544 an arm of an if-expression whose if-part is not a constant
13545 expression */
13546 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549 ++pcpcc;
13550 ppc = (char**) pcpcc;
13551 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013552 { /* SCO 3.2v4 cc rejects this sort of thing. */
13553 char tx;
13554 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013555 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 }
13560 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13561 int x[] = {25, 17};
13562 const int *foo = &x[0];
13563 ++foo;
13564 }
13565 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13566 typedef const int *iptr;
13567 iptr p = 0;
13568 ++p;
13569 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013570 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013571 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013572 struct s { int j; const int *ap[3]; } bx;
13573 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 }
13575 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13576 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013577 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013580#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581
Martin v. Löwis11437992002-04-12 09:54:03 +000013582 ;
13583 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013584}
Martin v. Löwis11437992002-04-12 09:54:03 +000013585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587 ac_cv_c_const=yes
13588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13594$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013595if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013598
13599fi
13600
Michael W. Hudson54241132001-12-07 15:38:26 +000013601
Guido van Rossumda88dad1995-01-26 00:46:29 +000013602works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13604$as_echo_n "checking for working signed char... " >&6; }
13605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013607
Martin v. Löwis11437992002-04-12 09:54:03 +000013608int
13609main ()
13610{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013611signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 ;
13613 return 0;
13614}
13615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013616if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013617 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013618else
Skip Montanaro6dead952003-09-25 14:50:04 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013621
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013622
Guido van Rossum7f43da71994-08-01 12:15:30 +000013623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13626$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013627
Guido van Rossumda88dad1995-01-26 00:46:29 +000013628have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13630$as_echo_n "checking for prototypes... " >&6; }
13631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013633int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013637return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ;
13639 return 0;
13640}
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
Matthias Kloseb159a552010-04-25 21:00:44 +000013646 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13650$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651
Guido van Rossumda88dad1995-01-26 00:46:29 +000013652works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13654$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013656/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013657
13658#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013659int foo(int x, ...) {
13660 va_list va;
13661 va_start(va, x);
13662 va_arg(va, int);
13663 va_arg(va, char *);
13664 va_arg(va, double);
13665 return 0;
13666}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013667
Martin v. Löwis11437992002-04-12 09:54:03 +000013668int
13669main ()
13670{
Guido van Rossum90eea071996-08-30 20:58:57 +000013671return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 ;
13673 return 0;
13674}
13675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
13678
Matthias Kloseb9621712010-04-24 17:59:49 +000013679$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013681 works=yes
13682
Guido van Rossum627b2d71993-12-24 10:39:16 +000013683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13686$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013687
Martin v. Löwisd6320502004-08-12 13:45:08 +000013688# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13690$as_echo_n "checking for socketpair... " >&6; }
13691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013692/* end confdefs.h. */
13693
13694#include <sys/types.h>
13695#include <sys/socket.h>
13696
13697int
13698main ()
13699{
13700void *x=socketpair
13701 ;
13702 return 0;
13703}
13704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013708
Matthias Kloseb159a552010-04-25 21:00:44 +000013709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013710$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13713$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013714
13715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013717
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013718# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13720$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013722/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013723#include <sys/types.h>
13724#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013725int
13726main ()
13727{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013728struct sockaddr x;
13729x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 ;
13731 return 0;
13732}
13733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013734if ac_fn_c_try_compile "$LINENO"; then :
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13736$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013739
13740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13742$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013743
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013747# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
13749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013751if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13756$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013757 OLD_CFLAGS=$CFLAGS
13758 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013760/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761
13762# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013763
Martin v. Löwis11437992002-04-12 09:54:03 +000013764int
13765main ()
13766{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013767
13768 char *name;
13769 struct hostent *he, *res;
13770 char buffer[2048];
13771 int buflen = 2048;
13772 int h_errnop;
13773
13774 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013775
13776 ;
13777 return 0;
13778}
13779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013780if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013783
Martin v. Löwis11437992002-04-12 09:54:03 +000013784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13788$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013789
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013790else
Skip Montanaro6dead952003-09-25 14:50:04 +000013791
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13793$as_echo "no" >&6; }
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13795$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013797/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013798
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Martin v. Löwis11437992002-04-12 09:54:03 +000013801int
13802main ()
13803{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013804
13805 char *name;
13806 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013807 char buffer[2048];
13808 int buflen = 2048;
13809 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810
Matthias Kloseb159a552010-04-25 21:00:44 +000013811 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013812
13813 ;
13814 return 0;
13815}
13816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013817if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013820
Martin v. Löwis11437992002-04-12 09:54:03 +000013821
Matthias Kloseb159a552010-04-25 21:00:44 +000013822$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013823
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13825$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013826
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013827else
Skip Montanaro6dead952003-09-25 14:50:04 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13830$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13832$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13834/* end confdefs.h. */
13835
13836# include <netdb.h>
13837
13838int
13839main ()
13840{
13841
13842 char *name;
13843 struct hostent *he;
13844 struct hostent_data data;
13845
13846 (void) gethostbyname_r(name, he, &data);
13847
13848 ;
13849 return 0;
13850}
13851_ACEOF
13852if ac_fn_c_try_compile "$LINENO"; then :
13853
13854 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13855
13856
13857$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13858
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13860$as_echo "yes" >&6; }
13861
13862else
13863
13864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13865$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013875 CFLAGS=$OLD_CFLAGS
13876
13877else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 for ac_func in gethostbyname
13880do :
13881 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013882if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013884#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013885_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013886
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013887fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013888done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013889
Michael W. Hudson54241132001-12-07 15:38:26 +000013890
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013891fi
13892
Michael W. Hudson54241132001-12-07 15:38:26 +000013893
13894
13895
13896
13897
13898
Guido van Rossum627b2d71993-12-24 10:39:16 +000013899# checks for system services
13900# (none yet)
13901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013902# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013903ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013904if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013905
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013906else
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13908$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013909if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013911else
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013913LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917/* Override any GCC internal prototype to avoid an error.
13918 Use char because int might match the return type of a GCC
13919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#ifdef __cplusplus
13921extern "C"
13922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013923char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013924int
13925main ()
13926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 ;
13929 return 0;
13930}
13931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013937rm -f core conftest.err conftest.$ac_objext \
13938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13942$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013943if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 cat >>confdefs.h <<_ACEOF
13945#define HAVE_LIBIEEE 1
13946_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013948 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013949
Guido van Rossum627b2d71993-12-24 10:39:16 +000013950fi
13951
Michael W. Hudson54241132001-12-07 15:38:26 +000013952
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013953fi
13954
Michael W. Hudson54241132001-12-07 15:38:26 +000013955
Guido van Rossum7f43da71994-08-01 12:15:30 +000013956# check for --with-libm=...
13957
Guido van Rossum563e7081996-09-10 18:20:48 +000013958case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013959Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013960*) LIBM=-lm
13961esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13963$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013966if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013968if test "$withval" = no
13969then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13971$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013972elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013973then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13975$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013976else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013977fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13980$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981fi
13982
Guido van Rossum7f43da71994-08-01 12:15:30 +000013983
13984# check for --with-libc=...
13985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13987$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013990if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013992if test "$withval" = no
13993then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13995$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013996elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013997then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13999$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014000else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014001fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014002else
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14004$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005fi
14006
Guido van Rossum7f43da71994-08-01 12:15:30 +000014007
Stefan Krah1919b7e2012-03-21 18:25:23 +010014008# **************************************
14009# * Check for gcc x64 inline assembler *
14010# **************************************
14011
14012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14013$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14015/* end confdefs.h. */
14016
14017int
14018main ()
14019{
14020
14021 __asm__ __volatile__ ("movq %rcx, %rax");
14022
14023 ;
14024 return 0;
14025}
14026_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014027if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014028 have_gcc_asm_for_x64=yes
14029else
14030 have_gcc_asm_for_x64=no
14031fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014032rm -f core conftest.err conftest.$ac_objext \
14033 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14035$as_echo "$have_gcc_asm_for_x64" >&6; }
14036if test "$have_gcc_asm_for_x64" = yes
14037then
14038
14039$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14040
14041fi
14042
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014043# **************************************************
14044# * Check for various properties of floating point *
14045# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014046
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
14048$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014049if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014051else
14052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014054 ac_cv_little_endian_double=no
14055else
Matthias Kloseb9621712010-04-24 17:59:49 +000014056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014057/* end confdefs.h. */
14058
14059#include <string.h>
14060int main() {
14061 double x = 9006104071832581.0;
14062 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
14063 return 0;
14064 else
14065 return 1;
14066}
14067
14068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014069if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014070 ac_cv_little_endian_double=yes
14071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014076fi
14077
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078fi
14079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
14081$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014082if test "$ac_cv_little_endian_double" = yes
14083then
14084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014086
14087fi
14088
Matthias Kloseb9621712010-04-24 17:59:49 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14090$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014091if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093else
14094
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014096 ac_cv_big_endian_double=no
14097else
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014099/* end confdefs.h. */
14100
14101#include <string.h>
14102int main() {
14103 double x = 9006104071832581.0;
14104 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14105 return 0;
14106 else
14107 return 1;
14108}
14109
14110_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014112 ac_cv_big_endian_double=yes
14113else
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14117 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014118fi
14119
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014120fi
14121
Matthias Kloseb9621712010-04-24 17:59:49 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14123$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014124if test "$ac_cv_big_endian_double" = yes
14125then
14126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014128
14129fi
14130
14131# Some ARM platforms use a mixed-endian representation for doubles.
14132# While Python doesn't currently have full support for these platforms
14133# (see e.g., issue 1762561), we can at least make sure that float <-> string
14134# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14136$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014137if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014139else
14140
Matthias Kloseb9621712010-04-24 17:59:49 +000014141if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014142 ac_cv_mixed_endian_double=no
14143else
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014145/* end confdefs.h. */
14146
14147#include <string.h>
14148int main() {
14149 double x = 9006104071832581.0;
14150 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14151 return 0;
14152 else
14153 return 1;
14154}
14155
14156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014157if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014158 ac_cv_mixed_endian_double=yes
14159else
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014164fi
14165
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014166fi
14167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14169$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014170if test "$ac_cv_mixed_endian_double" = yes
14171then
14172
Matthias Kloseb9621712010-04-24 17:59:49 +000014173$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014174
14175fi
14176
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014177# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014178# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014179# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014180# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014181# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014182# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014183
14184# This inline assembler syntax may also work for suncc and icc,
14185# so we try it on all platforms.
14186
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14188$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014190/* end confdefs.h. */
14191
14192int
14193main ()
14194{
14195
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014196 unsigned short cw;
14197 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14198 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014199
14200 ;
14201 return 0;
14202}
14203_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014204if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014205 have_gcc_asm_for_x87=yes
14206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014208fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014209rm -f core conftest.err conftest.$ac_objext \
14210 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14212$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014213if test "$have_gcc_asm_for_x87" = yes
14214then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014217
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014219
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14221$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14223/* end confdefs.h. */
14224
14225int
14226main ()
14227{
14228
14229 unsigned int fpcr;
14230 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14231 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14232
14233 ;
14234 return 0;
14235}
14236_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014237if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014238 have_gcc_asm_for_mc68881=yes
14239else
14240 have_gcc_asm_for_mc68881=no
14241fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014242rm -f core conftest.err conftest.$ac_objext \
14243 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14245$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14246if test "$have_gcc_asm_for_mc68881" = yes
14247then
14248
14249$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14250
14251fi
14252
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014253# Detect whether system arithmetic is subject to x87-style double
14254# rounding issues. The result of this test has little meaning on non
14255# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14256# mode is round-to-nearest and double rounding issues are present, and
14257# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14259$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014260# $BASECFLAGS may affect the result
14261ac_save_cc="$CC"
14262CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014263if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014264 ac_cv_x87_double_rounding=no
14265else
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014267/* end confdefs.h. */
14268
14269#include <stdlib.h>
14270#include <math.h>
14271int main() {
14272 volatile double x, y, z;
14273 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14274 x = 0.99999999999999989; /* 1-2**-53 */
14275 y = 1./x;
14276 if (y != 1.)
14277 exit(0);
14278 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14279 x = 1e16;
14280 y = 2.99999;
14281 z = x + y;
14282 if (z != 1e16+4.)
14283 exit(0);
14284 /* both tests show evidence of double rounding */
14285 exit(1);
14286}
14287
14288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014289if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014290 ac_cv_x87_double_rounding=no
14291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14295 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014296fi
14297
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014298CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14300$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014301if test "$ac_cv_x87_double_rounding" = yes
14302then
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014305
14306fi
14307
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308# ************************************
14309# * Check for mathematical functions *
14310# ************************************
14311
14312LIBS_SAVE=$LIBS
14313LIBS="$LIBS $LIBM"
14314
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014315for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14316do :
14317 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14318ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014319if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014320 cat >>confdefs.h <<_ACEOF
14321#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14322_ACEOF
14323
14324fi
14325done
14326
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014327for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014328do :
14329 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14330ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014331if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014332 cat >>confdefs.h <<_ACEOF
14333#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14334_ACEOF
14335
14336fi
14337done
14338
14339ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14340"
Victor Stinnere0be4232011-10-25 13:06:09 +020014341if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014342 ac_have_decl=1
14343else
14344 ac_have_decl=0
14345fi
14346
14347cat >>confdefs.h <<_ACEOF
14348#define HAVE_DECL_ISINF $ac_have_decl
14349_ACEOF
14350ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14351"
Victor Stinnere0be4232011-10-25 13:06:09 +020014352if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014353 ac_have_decl=1
14354else
14355 ac_have_decl=0
14356fi
14357
14358cat >>confdefs.h <<_ACEOF
14359#define HAVE_DECL_ISNAN $ac_have_decl
14360_ACEOF
14361ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14362"
Victor Stinnere0be4232011-10-25 13:06:09 +020014363if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014364 ac_have_decl=1
14365else
14366 ac_have_decl=0
14367fi
14368
14369cat >>confdefs.h <<_ACEOF
14370#define HAVE_DECL_ISFINITE $ac_have_decl
14371_ACEOF
14372
14373
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014374# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14375# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14377$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014378if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014380else
14381
Matthias Kloseb9621712010-04-24 17:59:49 +000014382if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014383 ac_cv_tanh_preserves_zero_sign=no
14384else
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014386/* end confdefs.h. */
14387
14388#include <math.h>
14389#include <stdlib.h>
14390int main() {
14391 /* return 0 if either negative zeros don't exist
14392 on this platform or if negative zeros exist
14393 and tanh(-0.) == -0. */
14394 if (atan2(0., -1.) == atan2(-0., -1.) ||
14395 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14396 else exit(1);
14397}
14398
14399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014401 ac_cv_tanh_preserves_zero_sign=yes
14402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014407fi
14408
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014409fi
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14412$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014413if test "$ac_cv_tanh_preserves_zero_sign" = yes
14414then
14415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014417
14418fi
14419
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014420if test "$ac_cv_func_log1p" = yes
14421then
14422 # On some versions of AIX, log1p(-0.) returns 0. instead of
14423 # -0. See issue #9920.
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14425$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014426 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014427 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014428else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014429
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014430 if test "$cross_compiling" = yes; then :
14431 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014432else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14434/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014435
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014436 #include <math.h>
14437 #include <stdlib.h>
14438 int main() {
14439 /* Fail if the signs of log1p(-0.) and -0. can be
14440 distinguished. */
14441 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14442 return 0;
14443 else
14444 return 1;
14445 }
14446
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014447_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014448if ac_fn_c_try_run "$LINENO"; then :
14449 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014450else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014451 ac_cv_log1p_drops_zero_sign=yes
14452fi
14453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014455fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014456
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014457fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014458
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14460$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14461fi
14462if test "$ac_cv_log1p_drops_zero_sign" = yes
14463then
14464
14465$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14466
14467fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014468
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014469LIBS=$LIBS_SAVE
14470
Mark Dickinsona614f042009-11-28 12:48:43 +000014471# For multiprocessing module, check that sem_open
14472# actually works. For FreeBSD versions <= 7.2,
14473# the kernel module that provides POSIX semaphores
14474# isn't loaded by default, so an attempt to call
14475# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14477$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014478if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014482 ac_cv_posix_semaphores_enabled=yes
14483else
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014485/* end confdefs.h. */
14486
14487#include <unistd.h>
14488#include <fcntl.h>
14489#include <stdio.h>
14490#include <semaphore.h>
14491#include <sys/stat.h>
14492
14493int main(void) {
14494 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14495 if (a == SEM_FAILED) {
14496 perror("sem_open");
14497 return 1;
14498 }
14499 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014500 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014501 return 0;
14502}
14503
14504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014505if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014506 ac_cv_posix_semaphores_enabled=yes
14507else
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014512fi
14513
14514
Mark Dickinsona614f042009-11-28 12:48:43 +000014515fi
14516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14518$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014519if test $ac_cv_posix_semaphores_enabled = no
14520then
14521
Matthias Kloseb9621712010-04-24 17:59:49 +000014522$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014523
14524fi
14525
Mark Dickinson10683072009-04-18 21:18:19 +000014526# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14528$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014529if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014531else
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014533 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014534else
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014536/* end confdefs.h. */
14537
14538#include <unistd.h>
14539#include <fcntl.h>
14540#include <stdio.h>
14541#include <semaphore.h>
14542#include <sys/stat.h>
14543
14544int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014545 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014546 int count;
14547 int res;
14548 if(a==SEM_FAILED){
14549 perror("sem_open");
14550 return 1;
14551
14552 }
14553 res = sem_getvalue(a, &count);
14554 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014555 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014556 return res==-1 ? 1 : 0;
14557}
14558
Mark Dickinson10683072009-04-18 21:18:19 +000014559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014560if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014561 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014562else
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014567fi
14568
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014569
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014570fi
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14573$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014574if test $ac_cv_broken_sem_getvalue = yes
14575then
14576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014578
14579fi
14580
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014581ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14582"
14583if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14584 ac_have_decl=1
14585else
14586 ac_have_decl=0
14587fi
14588
14589cat >>confdefs.h <<_ACEOF
14590#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14591_ACEOF
14592ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14593"
14594if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14595 ac_have_decl=1
14596else
14597 ac_have_decl=0
14598fi
14599
14600cat >>confdefs.h <<_ACEOF
14601#define HAVE_DECL_RTLD_NOW $ac_have_decl
14602_ACEOF
14603ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14604"
14605if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14606 ac_have_decl=1
14607else
14608 ac_have_decl=0
14609fi
14610
14611cat >>confdefs.h <<_ACEOF
14612#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14613_ACEOF
14614ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14615"
14616if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14617 ac_have_decl=1
14618else
14619 ac_have_decl=0
14620fi
14621
14622cat >>confdefs.h <<_ACEOF
14623#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14624_ACEOF
14625ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14626"
14627if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14628 ac_have_decl=1
14629else
14630 ac_have_decl=0
14631fi
14632
14633cat >>confdefs.h <<_ACEOF
14634#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14635_ACEOF
14636ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14637"
14638if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14639 ac_have_decl=1
14640else
14641 ac_have_decl=0
14642fi
14643
14644cat >>confdefs.h <<_ACEOF
14645#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14646_ACEOF
14647ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14648"
14649if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14650 ac_have_decl=1
14651else
14652 ac_have_decl=0
14653fi
14654
14655cat >>confdefs.h <<_ACEOF
14656#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14657_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014658ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14659"
14660if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14661 ac_have_decl=1
14662else
14663 ac_have_decl=0
14664fi
14665
14666cat >>confdefs.h <<_ACEOF
14667#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14668_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014669
14670
Mark Dickinsonbd792642009-03-18 20:06:12 +000014671# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14673$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014674# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014675if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014676 enableval=$enable_big_digits; case $enable_big_digits in
14677yes)
14678 enable_big_digits=30 ;;
14679no)
14680 enable_big_digits=15 ;;
1468115|30)
14682 ;;
14683*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014684 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 +000014685esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14687$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014688
14689cat >>confdefs.h <<_ACEOF
14690#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14691_ACEOF
14692
14693
14694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14696$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014697fi
14698
14699
Guido van Rossumef2255b2000-03-10 22:30:29 +000014700# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014701ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014702if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
14704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014707 wchar_h="yes"
14708
Guido van Rossumef2255b2000-03-10 22:30:29 +000014709else
Martin v. Löwis11437992002-04-12 09:54:03 +000014710 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711
14712fi
14713
Michael W. Hudson54241132001-12-07 15:38:26 +000014714
Martin v. Löwis11437992002-04-12 09:54:03 +000014715
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014716# determine wchar_t size
14717if test "$wchar_h" = yes
14718then
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14724$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014725if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14729"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 if test "$ac_cv_type_wchar_t" = yes; then
14733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014735as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737 else
14738 ac_cv_sizeof_wchar_t=0
14739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014741
Martin v. Löwis11437992002-04-12 09:54:03 +000014742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14744$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745
14746
14747
Martin v. Löwis11437992002-04-12 09:54:03 +000014748cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014749#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014750_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014751
Michael W. Hudson54241132001-12-07 15:38:26 +000014752
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014753fi
14754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14756$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014757have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014759/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014760
14761#include <tcl.h>
14762#if TCL_UTF_MAX != 6
14763# error "NOT UCS4_TCL"
14764#endif
14765int
14766main ()
14767{
14768
14769 ;
14770 return 0;
14771}
14772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014774
14775
Matthias Kloseb9621712010-04-24 17:59:49 +000014776$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014777
14778 have_ucs4_tcl=yes
14779
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14783$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014784
Skip Montanaro6dead952003-09-25 14:50:04 +000014785# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014786if test "$wchar_h" = yes
14787then
14788 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14790$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014791 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014793else
14794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014796 ac_cv_wchar_t_signed=yes
14797else
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014799/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014800
14801 #include <wchar.h>
14802 int main()
14803 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014804 /* Success: exit code 0 */
14805 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014806 }
14807
14808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014809if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014810 ac_cv_wchar_t_signed=yes
14811else
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014816fi
14817
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014818fi
14819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14821$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822fi
14823
Miss Islington (bot)4973f762018-08-24 12:36:30 -040014824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14825$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014826# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014827if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014828 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014829then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014830
Matthias Kloseb9621712010-04-24 17:59:49 +000014831$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
Miss Islington (bot)4973f762018-08-24 12:36:30 -040014833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14834$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014835else
Miss Islington (bot)4973f762018-08-24 12:36:30 -040014836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14837$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014838fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014839
14840# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14842$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014843if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014845else
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 ac_cv_c_bigendian=unknown
14847 # See if we're dealing with a universal compiler.
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849/* end confdefs.h. */
14850#ifndef __APPLE_CC__
14851 not a universal capable compiler
14852 #endif
14853 typedef int dummy;
14854
Skip Montanaro6dead952003-09-25 14:50:04 +000014855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014856if ac_fn_c_try_compile "$LINENO"; then :
14857
14858 # Check for potential -arch flags. It is not universal unless
14859 # there are at least two -arch flags with different values.
14860 ac_arch=
14861 ac_prev=
14862 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14863 if test -n "$ac_prev"; then
14864 case $ac_word in
14865 i?86 | x86_64 | ppc | ppc64)
14866 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14867 ac_arch=$ac_word
14868 else
14869 ac_cv_c_bigendian=universal
14870 break
14871 fi
14872 ;;
14873 esac
14874 ac_prev=
14875 elif test "x$ac_word" = "x-arch"; then
14876 ac_prev=arch
14877 fi
14878 done
14879fi
14880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14881 if test $ac_cv_c_bigendian = unknown; then
14882 # See if sys/param.h defines the BYTE_ORDER macro.
14883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014884/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014885#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014886 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014887
Martin v. Löwis11437992002-04-12 09:54:03 +000014888int
14889main ()
14890{
Matthias Kloseb9621712010-04-24 17:59:49 +000014891#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14892 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14893 && LITTLE_ENDIAN)
14894 bogus endian macros
14895 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014896
14897 ;
14898 return 0;
14899}
14900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014901if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014902 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014904/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014905#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014907
Martin v. Löwis11437992002-04-12 09:54:03 +000014908int
14909main ()
14910{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 not big endian
14913 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014914
14915 ;
14916 return 0;
14917}
14918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014919if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920 ac_cv_c_bigendian=yes
14921else
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014925fi
14926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927 fi
14928 if test $ac_cv_c_bigendian = unknown; then
14929 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014931/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014932#include <limits.h>
14933
Martin v. Löwis11437992002-04-12 09:54:03 +000014934int
14935main ()
14936{
Matthias Kloseb9621712010-04-24 17:59:49 +000014937#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14938 bogus endian macros
14939 #endif
14940
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ;
14942 return 0;
14943}
14944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014945if ac_fn_c_try_compile "$LINENO"; then :
14946 # It does; now see whether it defined to _BIG_ENDIAN or not.
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948/* end confdefs.h. */
14949#include <limits.h>
14950
14951int
14952main ()
14953{
14954#ifndef _BIG_ENDIAN
14955 not big endian
14956 #endif
14957
14958 ;
14959 return 0;
14960}
14961_ACEOF
14962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014964else
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14968fi
14969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14970 fi
14971 if test $ac_cv_c_bigendian = unknown; then
14972 # Compile a test program.
14973 if test "$cross_compiling" = yes; then :
14974 # Try to guess by grepping values from an object file.
14975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14976/* end confdefs.h. */
14977short int ascii_mm[] =
14978 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14979 short int ascii_ii[] =
14980 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14981 int use_ascii (int i) {
14982 return ascii_mm[i] + ascii_ii[i];
14983 }
14984 short int ebcdic_ii[] =
14985 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14986 short int ebcdic_mm[] =
14987 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14988 int use_ebcdic (int i) {
14989 return ebcdic_mm[i] + ebcdic_ii[i];
14990 }
14991 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993int
14994main ()
14995{
14996return use_ascii (foo) == use_ebcdic (foo);
14997 ;
14998 return 0;
14999}
15000_ACEOF
15001if ac_fn_c_try_compile "$LINENO"; then :
15002 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15003 ac_cv_c_bigendian=yes
15004 fi
15005 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15006 if test "$ac_cv_c_bigendian" = unknown; then
15007 ac_cv_c_bigendian=no
15008 else
15009 # finding both strings is unlikely to happen, but who knows?
15010 ac_cv_c_bigendian=unknown
15011 fi
15012 fi
15013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015015else
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015017/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015019int
15020main ()
15021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015022
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 /* Are we little or big endian? From Harbison&Steele. */
15024 union
15025 {
15026 long int l;
15027 char c[sizeof (long int)];
15028 } u;
15029 u.l = 1;
15030 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031
15032 ;
15033 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015034}
Martin v. Löwis11437992002-04-12 09:54:03 +000015035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015036if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015037 ac_cv_c_bigendian=no
15038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15048$as_echo "$ac_cv_c_bigendian" >&6; }
15049 case $ac_cv_c_bigendian in #(
15050 yes)
15051 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15052;; #(
15053 no)
15054 ;; #(
15055 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015058
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 ;; #(
15060 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015061 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015062 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015064
Michael W. Hudson54241132001-12-07 15:38:26 +000015065
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015066# ABI version string for Python extension modules. This appears between the
15067# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15068# from the following attributes which affect the ABI of this Python build (in
15069# this order):
15070#
15071# * The Python implementation (always 'cpython-' for us)
15072# * The major and minor version numbers
15073# * --with-pydebug (adds a 'd')
15074# * --with-pymalloc (adds a 'm')
15075# * --with-wide-unicode (adds a 'u')
15076#
15077# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015078# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15079# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015080
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15082$as_echo_n "checking ABIFLAGS... " >&6; }
15083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15084$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15086$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015087SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15089$as_echo "$SOABI" >&6; }
15090
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015091
15092case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015093 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015094 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15095 *)
15096 EXT_SUFFIX=${SHLIB_SUFFIX};;
15097esac
15098
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15100$as_echo_n "checking LDVERSION... " >&6; }
15101LDVERSION='$(VERSION)$(ABIFLAGS)'
15102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15103$as_echo "$LDVERSION" >&6; }
15104
doko@python.org87421192013-01-26 11:39:31 +010015105
doko@ubuntu.com55532312016-06-14 08:55:19 +020015106if test x$PLATFORM_TRIPLET = x; then
15107 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15108else
15109 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15110fi
doko@python.org87421192013-01-26 11:39:31 +010015111
15112
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015113# Check whether right shifting a negative integer extends the sign bit
15114# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15116$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015117if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015119else
Martin v. Löwis11437992002-04-12 09:54:03 +000015120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015122 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015123else
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015125/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015126
15127int main()
15128{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015129 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015130}
15131
Martin v. Löwis11437992002-04-12 09:54:03 +000015132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015133if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015134 ac_cv_rshift_extends_sign=yes
15135else
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015140fi
15141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142fi
15143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15145$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015146if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015147then
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015150
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015151fi
15152
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015153# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15155$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015156if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015158else
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015161/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015162#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015163int
15164main ()
15165{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015166
15167 FILE *f = fopen("/dev/null", "r");
15168 flockfile(f);
15169 getc_unlocked(f);
15170 funlockfile(f);
15171
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ;
15173 return 0;
15174}
15175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015176if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015177 ac_cv_have_getc_unlocked=yes
15178else
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 ac_cv_have_getc_unlocked=no
15180fi
15181rm -f core conftest.err conftest.$ac_objext \
15182 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184
Matthias Kloseb9621712010-04-24 17:59:49 +000015185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15186$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015187if test "$ac_cv_have_getc_unlocked" = yes
15188then
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Matthias Kloseb9621712010-04-24 17:59:49 +000015190$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015191
15192fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015193
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015194# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015195# save the value of LIBS so we don't actually link Python with readline
15196LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015197
Gregory P. Smith18820942008-09-07 06:24:49 +000015198# On some systems we need to link readline to a termcap compatible
15199# library. NOTE: Keep the precedence of listed libraries synchronised
15200# with setup.py.
15201py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15203$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015204for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015205 if test -z "$py_libtermcap"; then
15206 READLINE_LIBS="-lreadline"
15207 else
15208 READLINE_LIBS="-lreadline -l$py_libtermcap"
15209 fi
15210 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015212/* end confdefs.h. */
15213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214/* Override any GCC internal prototype to avoid an error.
15215 Use char because int might match the return type of a GCC
15216 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015217#ifdef __cplusplus
15218extern "C"
15219#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015220char readline ();
15221int
15222main ()
15223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015225 ;
15226 return 0;
15227}
15228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015229if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015230 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015232rm -f core conftest.err conftest.$ac_objext \
15233 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015234 if test $py_cv_lib_readline = yes; then
15235 break
15236 fi
15237done
15238# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15239#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015240if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15242$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015243else
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15245$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015246
Matthias Kloseb9621712010-04-24 17:59:49 +000015247$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015248
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015249fi
15250
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015251# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015254#include <readline/readline.h>
15255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015256if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015257 have_readline=yes
15258else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015259 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015260
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015261fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015262rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015263if test $have_readline = yes
15264then
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015266/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015267#include <readline/readline.h>
15268
15269_ACEOF
15270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015272
Matthias Kloseb9621712010-04-24 17:59:49 +000015273$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015274
15275fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015276rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015277
Matthias Kloseb9621712010-04-24 17:59:49 +000015278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015279/* end confdefs.h. */
15280#include <readline/readline.h>
15281
15282_ACEOF
15283if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015285
Matthias Kloseb9621712010-04-24 17:59:49 +000015286$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015287
15288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015289rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015290
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015291fi
15292
Martin v. Löwis0daad592001-09-30 21:09:59 +000015293# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15295$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015296if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015298else
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015300LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304/* Override any GCC internal prototype to avoid an error.
15305 Use char because int might match the return type of a GCC
15306 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015307#ifdef __cplusplus
15308extern "C"
15309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015310char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015311int
15312main ()
15313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015315 ;
15316 return 0;
15317}
15318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015319if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015324rm -f core conftest.err conftest.$ac_objext \
15325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015326LIBS=$ac_check_lib_save_LIBS
15327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15329$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015330if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015333
Martin v. Löwis0daad592001-09-30 21:09:59 +000015334fi
15335
Michael W. Hudson54241132001-12-07 15:38:26 +000015336
Thomas Wouters89d996e2007-09-08 17:39:28 +000015337# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15339$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015340if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015342else
15343 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015344LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015346/* end confdefs.h. */
15347
15348/* Override any GCC internal prototype to avoid an error.
15349 Use char because int might match the return type of a GCC
15350 builtin and then its argument prototype would still apply. */
15351#ifdef __cplusplus
15352extern "C"
15353#endif
15354char rl_completion_display_matches_hook ();
15355int
15356main ()
15357{
15358return rl_completion_display_matches_hook ();
15359 ;
15360 return 0;
15361}
15362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015363if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015364 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15365else
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015368rm -f core conftest.err conftest.$ac_objext \
15369 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015370LIBS=$ac_check_lib_save_LIBS
15371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15373$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015374if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015377
15378fi
15379
15380
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015381# also in 4.0, but not in editline
15382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15383$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15384if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15385 $as_echo_n "(cached) " >&6
15386else
15387 ac_check_lib_save_LIBS=$LIBS
15388LIBS="-lreadline $READLINE_LIBS $LIBS"
15389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15390/* end confdefs.h. */
15391
15392/* Override any GCC internal prototype to avoid an error.
15393 Use char because int might match the return type of a GCC
15394 builtin and then its argument prototype would still apply. */
15395#ifdef __cplusplus
15396extern "C"
15397#endif
15398char rl_resize_terminal ();
15399int
15400main ()
15401{
15402return rl_resize_terminal ();
15403 ;
15404 return 0;
15405}
15406_ACEOF
15407if ac_fn_c_try_link "$LINENO"; then :
15408 ac_cv_lib_readline_rl_resize_terminal=yes
15409else
15410 ac_cv_lib_readline_rl_resize_terminal=no
15411fi
15412rm -f core conftest.err conftest.$ac_objext \
15413 conftest$ac_exeext conftest.$ac_ext
15414LIBS=$ac_check_lib_save_LIBS
15415fi
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15417$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15418if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15419
15420$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15421
15422fi
15423
15424
Martin v. Löwis0daad592001-09-30 21:09:59 +000015425# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15427$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015428if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015429 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015430else
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015432LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436/* Override any GCC internal prototype to avoid an error.
15437 Use char because int might match the return type of a GCC
15438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015439#ifdef __cplusplus
15440extern "C"
15441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015442char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015443int
15444main ()
15445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015447 ;
15448 return 0;
15449}
15450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015451if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015452 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015453else
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015456rm -f core conftest.err conftest.$ac_objext \
15457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015458LIBS=$ac_check_lib_save_LIBS
15459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15461$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015462if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015463
Matthias Kloseb9621712010-04-24 17:59:49 +000015464$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015465
Guido van Rossum353ae582001-07-10 16:45:32 +000015466fi
15467
Jack Jansendd19cf82001-12-06 22:36:17 +000015468
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015469# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015471/* end confdefs.h. */
15472#include <readline/readline.h>
15473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015474if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015475 have_readline=yes
15476else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015477 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015478
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015479fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015480rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015481if test $have_readline = yes
15482then
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015484/* end confdefs.h. */
15485#include <readline/readline.h>
15486
15487_ACEOF
15488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015492
15493fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015494rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015495
15496fi
15497
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15499$as_echo_n "checking for append_history in -lreadline... " >&6; }
15500if ${ac_cv_lib_readline_append_history+:} false; then :
15501 $as_echo_n "(cached) " >&6
15502else
15503 ac_check_lib_save_LIBS=$LIBS
15504LIBS="-lreadline $READLINE_LIBS $LIBS"
15505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15506/* end confdefs.h. */
15507
15508/* Override any GCC internal prototype to avoid an error.
15509 Use char because int might match the return type of a GCC
15510 builtin and then its argument prototype would still apply. */
15511#ifdef __cplusplus
15512extern "C"
15513#endif
15514char append_history ();
15515int
15516main ()
15517{
15518return append_history ();
15519 ;
15520 return 0;
15521}
15522_ACEOF
15523if ac_fn_c_try_link "$LINENO"; then :
15524 ac_cv_lib_readline_append_history=yes
15525else
15526 ac_cv_lib_readline_append_history=no
15527fi
15528rm -f core conftest.err conftest.$ac_objext \
15529 conftest$ac_exeext conftest.$ac_ext
15530LIBS=$ac_check_lib_save_LIBS
15531fi
15532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15533$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15534if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15535
15536$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15537
15538fi
15539
15540
Martin v. Löwis82bca632006-02-10 20:49:30 +000015541# End of readline checks: restore LIBS
15542LIBS=$LIBS_no_readline
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15545$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015546if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015548else
Martin v. Löwis11437992002-04-12 09:54:03 +000015549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015551 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015552else
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015554/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015555
15556int main()
15557{
15558 int val1 = nice(1);
15559 if (val1 != -1 && val1 == nice(2))
15560 exit(0);
15561 exit(1);
15562}
15563
Martin v. Löwis11437992002-04-12 09:54:03 +000015564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015565if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015566 ac_cv_broken_nice=yes
15567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015572fi
15573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574fi
15575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15577$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015578if test "$ac_cv_broken_nice" = yes
15579then
Martin v. Löwis11437992002-04-12 09:54:03 +000015580
Matthias Kloseb9621712010-04-24 17:59:49 +000015581$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015582
15583fi
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15586$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015587if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015589else
Matthias Kloseb9621712010-04-24 17:59:49 +000015590 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015591 ac_cv_broken_poll=no
15592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015594/* end confdefs.h. */
15595
15596#include <poll.h>
15597
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015598int main()
15599{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015600 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015601 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015602
15603 close (42);
15604
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015605 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015606 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015607 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015608 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015609 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015610 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015611 return 1;
15612}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015613
15614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015615if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015616 ac_cv_broken_poll=yes
15617else
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015624fi
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15627$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015628if test "$ac_cv_broken_poll" = yes
15629then
15630
Matthias Kloseb9621712010-04-24 17:59:49 +000015631$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015632
15633fi
15634
Martin v. Löwis1d459062005-03-14 21:23:33 +000015635# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15637$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015638if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015640else
15641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015643 ac_cv_working_tzset=no
15644else
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015646/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015647
15648#include <stdlib.h>
15649#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015650#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015651
15652#if HAVE_TZNAME
15653extern char *tzname[];
15654#endif
15655
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015656int main()
15657{
Brett Cannon18367812003-09-19 00:59:16 +000015658 /* Note that we need to ensure that not only does tzset(3)
15659 do 'something' with localtime, but it works as documented
15660 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015661 This includes making sure that tzname is set properly if
15662 tm->tm_zone does not exist since it is the alternative way
15663 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015664
15665 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015666 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015667 */
15668
Martin v. Löwis1d459062005-03-14 21:23:33 +000015669 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015670 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15671
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015672 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015673 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015674 if (localtime(&groundhogday)->tm_hour != 0)
15675 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015676#if HAVE_TZNAME
15677 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15678 if (strcmp(tzname[0], "UTC") ||
15679 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15680 exit(1);
15681#endif
Brett Cannon18367812003-09-19 00:59:16 +000015682
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015683 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015684 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015685 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015686 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015687#if HAVE_TZNAME
15688 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15689 exit(1);
15690#endif
Brett Cannon18367812003-09-19 00:59:16 +000015691
15692 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15693 tzset();
15694 if (localtime(&groundhogday)->tm_hour != 11)
15695 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015696#if HAVE_TZNAME
15697 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15698 exit(1);
15699#endif
15700
15701#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015702 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15703 exit(1);
15704 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15705 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015706#endif
Brett Cannon18367812003-09-19 00:59:16 +000015707
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015708 exit(0);
15709}
15710
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015713 ac_cv_working_tzset=yes
15714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015719fi
15720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721fi
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15724$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725if test "$ac_cv_working_tzset" = yes
15726then
15727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015729
15730fi
15731
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015732# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15734$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015735if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015737else
Matthias Kloseb9621712010-04-24 17:59:49 +000015738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015739/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015740#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015741int
15742main ()
15743{
15744
15745struct stat st;
15746st.st_mtim.tv_nsec = 1;
15747
15748 ;
15749 return 0;
15750}
15751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015752if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015753 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015754else
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15758fi
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15761$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015762if test "$ac_cv_stat_tv_nsec" = yes
15763then
15764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015766
15767fi
15768
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015769# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15771$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015772if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015774else
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015776/* end confdefs.h. */
15777#include <sys/stat.h>
15778int
15779main ()
15780{
15781
15782struct stat st;
15783st.st_mtimespec.tv_nsec = 1;
15784
15785 ;
15786 return 0;
15787}
15788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015790 ac_cv_stat_tv_nsec2=yes
15791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15795fi
15796
Matthias Kloseb9621712010-04-24 17:59:49 +000015797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15798$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015799if test "$ac_cv_stat_tv_nsec2" = yes
15800then
15801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015803
15804fi
15805
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015806# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015807ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015808if test "$cross_compiling" = no; then
15809 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15810fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015811
15812for ac_header in curses.h ncurses.h
15813do :
15814 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15815ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15816if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15817 cat >>confdefs.h <<_ACEOF
15818#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15819_ACEOF
15820
15821fi
15822
15823done
15824
15825
15826# On Solaris, term.h requires curses.h
15827for ac_header in term.h
15828do :
15829 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15830#ifdef HAVE_CURSES_H
15831#include <curses.h>
15832#endif
15833
15834"
15835if test "x$ac_cv_header_term_h" = xyes; then :
15836 cat >>confdefs.h <<_ACEOF
15837#define HAVE_TERM_H 1
15838_ACEOF
15839
15840fi
15841
15842done
15843
15844
Jack Jansen666b1e72001-10-31 12:11:48 +000015845# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15847$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015848if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015850else
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015852/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015853#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015854int
15855main ()
15856{
Jack Jansen666b1e72001-10-31 12:11:48 +000015857
15858 int rtn;
15859 rtn = mvwdelch(0,0,0);
15860
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 ;
15862 return 0;
15863}
15864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015865if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015866 ac_cv_mvwdelch_is_expression=yes
15867else
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15871fi
15872
Matthias Kloseb9621712010-04-24 17:59:49 +000015873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15874$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015875
15876if test "$ac_cv_mvwdelch_is_expression" = yes
15877then
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015880
15881fi
15882
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015883# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15884# structs since version 5.7. If the macro is defined as zero before including
15885# [n]curses.h, ncurses will expose fields of the structs regardless of the
15886# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15888$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015889if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015890 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015891else
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015893/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015894
15895 #define NCURSES_OPAQUE 0
15896 #include <curses.h>
15897
Martin v. Löwis11437992002-04-12 09:54:03 +000015898int
15899main ()
15900{
Jack Jansen666b1e72001-10-31 12:11:48 +000015901
15902 WINDOW *w;
15903 w->_flags = 0;
15904
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 ;
15906 return 0;
15907}
15908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015909if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015910 ac_cv_window_has_flags=yes
15911else
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915fi
15916
Matthias Kloseb9621712010-04-24 17:59:49 +000015917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15918$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015919
Jack Jansen666b1e72001-10-31 12:11:48 +000015920
15921if test "$ac_cv_window_has_flags" = yes
15922then
Martin v. Löwis11437992002-04-12 09:54:03 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015925
15926fi
15927
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15929$as_echo_n "checking for is_pad... " >&6; }
15930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931/* end confdefs.h. */
15932#include <curses.h>
15933int
15934main ()
15935{
15936
15937#ifndef is_pad
15938void *x=is_pad
15939#endif
15940
15941 ;
15942 return 0;
15943}
15944_ACEOF
15945if ac_fn_c_try_compile "$LINENO"; then :
15946
15947$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15948
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15950$as_echo "yes" >&6; }
15951else
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15953$as_echo "no" >&6; }
15954
15955fi
15956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15959$as_echo_n "checking for is_term_resized... " >&6; }
15960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015961/* end confdefs.h. */
15962#include <curses.h>
15963int
15964main ()
15965{
15966void *x=is_term_resized
15967 ;
15968 return 0;
15969}
15970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015971if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015972
Matthias Kloseb9621712010-04-24 17:59:49 +000015973$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015974
Matthias Kloseb159a552010-04-25 21:00:44 +000015975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015976$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015977else
Matthias Kloseb9621712010-04-24 17:59:49 +000015978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15979$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015980
15981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15985$as_echo_n "checking for resize_term... " >&6; }
15986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015987/* end confdefs.h. */
15988#include <curses.h>
15989int
15990main ()
15991{
15992void *x=resize_term
15993 ;
15994 return 0;
15995}
15996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015997if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015998
Matthias Kloseb9621712010-04-24 17:59:49 +000015999$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016000
Matthias Kloseb159a552010-04-25 21:00:44 +000016001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016002$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016003else
Matthias Kloseb9621712010-04-24 17:59:49 +000016004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16005$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016006
16007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16011$as_echo_n "checking for resizeterm... " >&6; }
16012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016013/* end confdefs.h. */
16014#include <curses.h>
16015int
16016main ()
16017{
16018void *x=resizeterm
16019 ;
16020 return 0;
16021}
16022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016023if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016024
Matthias Kloseb9621712010-04-24 17:59:49 +000016025$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016026
Matthias Kloseb159a552010-04-25 21:00:44 +000016027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016028$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016029else
Matthias Kloseb9621712010-04-24 17:59:49 +000016030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16031$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016032
16033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016035
16036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16037$as_echo_n "checking for immedok... " >&6; }
16038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16039/* end confdefs.h. */
16040#include <curses.h>
16041int
16042main ()
16043{
16044
16045#ifndef immedok
16046void *x=immedok
16047#endif
16048
16049 ;
16050 return 0;
16051}
16052_ACEOF
16053if ac_fn_c_try_compile "$LINENO"; then :
16054
16055$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16056
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16058$as_echo "yes" >&6; }
16059else
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16061$as_echo "no" >&6; }
16062
16063fi
16064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16065
16066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16067$as_echo_n "checking for syncok... " >&6; }
16068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16069/* end confdefs.h. */
16070#include <curses.h>
16071int
16072main ()
16073{
16074
16075#ifndef syncok
16076void *x=syncok
16077#endif
16078
16079 ;
16080 return 0;
16081}
16082_ACEOF
16083if ac_fn_c_try_compile "$LINENO"; then :
16084
16085$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16086
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16088$as_echo "yes" >&6; }
16089else
16090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16091$as_echo "no" >&6; }
16092
16093fi
16094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16095
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16097$as_echo_n "checking for wchgat... " >&6; }
16098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16099/* end confdefs.h. */
16100#include <curses.h>
16101int
16102main ()
16103{
16104
16105#ifndef wchgat
16106void *x=wchgat
16107#endif
16108
16109 ;
16110 return 0;
16111}
16112_ACEOF
16113if ac_fn_c_try_compile "$LINENO"; then :
16114
16115$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16116
16117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16118$as_echo "yes" >&6; }
16119else
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16121$as_echo "no" >&6; }
16122
16123fi
16124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16125
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16127$as_echo_n "checking for filter... " >&6; }
16128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129/* end confdefs.h. */
16130#include <curses.h>
16131int
16132main ()
16133{
16134
16135#ifndef filter
16136void *x=filter
16137#endif
16138
16139 ;
16140 return 0;
16141}
16142_ACEOF
16143if ac_fn_c_try_compile "$LINENO"; then :
16144
16145$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16146
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16148$as_echo "yes" >&6; }
16149else
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16151$as_echo "no" >&6; }
16152
16153fi
16154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16155
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16157$as_echo_n "checking for has_key... " >&6; }
16158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159/* end confdefs.h. */
16160#include <curses.h>
16161int
16162main ()
16163{
16164
16165#ifndef has_key
16166void *x=has_key
16167#endif
16168
16169 ;
16170 return 0;
16171}
16172_ACEOF
16173if ac_fn_c_try_compile "$LINENO"; then :
16174
16175$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16176
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16178$as_echo "yes" >&6; }
16179else
16180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16181$as_echo "no" >&6; }
16182
16183fi
16184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16185
16186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16187$as_echo_n "checking for typeahead... " >&6; }
16188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16189/* end confdefs.h. */
16190#include <curses.h>
16191int
16192main ()
16193{
16194
16195#ifndef typeahead
16196void *x=typeahead
16197#endif
16198
16199 ;
16200 return 0;
16201}
16202_ACEOF
16203if ac_fn_c_try_compile "$LINENO"; then :
16204
16205$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16206
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16208$as_echo "yes" >&6; }
16209else
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16211$as_echo "no" >&6; }
16212
16213fi
16214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16215
16216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16217$as_echo_n "checking for use_env... " >&6; }
16218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16219/* end confdefs.h. */
16220#include <curses.h>
16221int
16222main ()
16223{
16224
16225#ifndef use_env
16226void *x=use_env
16227#endif
16228
16229 ;
16230 return 0;
16231}
16232_ACEOF
16233if ac_fn_c_try_compile "$LINENO"; then :
16234
16235$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16236
16237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16238$as_echo "yes" >&6; }
16239else
16240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16241$as_echo "no" >&6; }
16242
16243fi
16244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016245# last curses configure check
16246CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16249$as_echo "$as_me: checking for device files" >&6;}
16250
16251if test "x$cross_compiling" = xyes; then
16252 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16254$as_echo_n "checking for /dev/ptmx... " >&6; }
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16256$as_echo "not set" >&6; }
16257 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16258 fi
16259 if test "${ac_cv_file__dev_ptc+set}" != set; then
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16261$as_echo_n "checking for /dev/ptc... " >&6; }
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16263$as_echo "not set" >&6; }
16264 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16265 fi
16266fi
16267
Matthias Kloseb9621712010-04-24 17:59:49 +000016268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16269$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016270if ${ac_cv_file__dev_ptmx+:} false; then :
16271 $as_echo_n "(cached) " >&6
16272else
16273 test "$cross_compiling" = yes &&
16274 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16275if test -r "/dev/ptmx"; then
16276 ac_cv_file__dev_ptmx=yes
16277else
16278 ac_cv_file__dev_ptmx=no
16279fi
16280fi
16281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16282$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16283if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016284
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016285fi
16286
16287if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016290
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16293$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016294if ${ac_cv_file__dev_ptc+:} false; then :
16295 $as_echo_n "(cached) " >&6
16296else
16297 test "$cross_compiling" = yes &&
16298 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16299if test -r "/dev/ptc"; then
16300 ac_cv_file__dev_ptc=yes
16301else
16302 ac_cv_file__dev_ptc=no
16303fi
16304fi
16305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16306$as_echo "$ac_cv_file__dev_ptc" >&6; }
16307if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016308
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016309fi
16310
16311if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016312
Matthias Kloseb9621712010-04-24 17:59:49 +000016313$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016314
Neal Norwitz865400f2003-03-21 01:42:58 +000016315fi
16316
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016317if test $ac_sys_system = Darwin
16318then
16319 LIBS="$LIBS -framework CoreFoundation"
16320fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016321
Matthias Kloseb9621712010-04-24 17:59:49 +000016322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16323$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016324if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016325 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016326else
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016328 ac_cv_have_size_t_format="cross -- assuming yes"
16329
Thomas Wouters477c8d52006-05-27 19:21:47 +000016330else
Matthias Kloseb9621712010-04-24 17:59:49 +000016331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016332/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016333
Thomas Wouters477c8d52006-05-27 19:21:47 +000016334#include <stdio.h>
16335#include <stddef.h>
16336#include <string.h>
16337
Christian Heimes2c181612007-12-17 20:04:13 +000016338#ifdef HAVE_SYS_TYPES_H
16339#include <sys/types.h>
16340#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016341
16342#ifdef HAVE_SSIZE_T
16343typedef ssize_t Py_ssize_t;
16344#elif SIZEOF_VOID_P == SIZEOF_LONG
16345typedef long Py_ssize_t;
16346#else
16347typedef int Py_ssize_t;
16348#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016349
Christian Heimes2c181612007-12-17 20:04:13 +000016350int main()
16351{
16352 char buffer[256];
16353
Thomas Wouters477c8d52006-05-27 19:21:47 +000016354 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16355 return 1;
16356
Thomas Wouters89f507f2006-12-13 04:49:30 +000016357 if (strcmp(buffer, "123"))
16358 return 1;
16359
16360 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16361 return 1;
16362
16363 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016364 return 1;
16365
16366 return 0;
16367}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016368
Thomas Wouters477c8d52006-05-27 19:21:47 +000016369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016370if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016371 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016372else
Matthias Kloseb9621712010-04-24 17:59:49 +000016373 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16376 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016377fi
16378
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16381$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016382if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016383
Matthias Kloseb9621712010-04-24 17:59:49 +000016384$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016385
16386fi
16387
Matthias Kloseb9621712010-04-24 17:59:49 +000016388ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016389#ifdef HAVE_SYS_TYPES_H
16390#include <sys/types.h>
16391#endif
16392#ifdef HAVE_SYS_SOCKET_H
16393#include <sys/socket.h>
16394#endif
16395
Matthias Kloseb9621712010-04-24 17:59:49 +000016396"
Victor Stinnere0be4232011-10-25 13:06:09 +020016397if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016398
Martin v. Löwis11437992002-04-12 09:54:03 +000016399else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016402
16403fi
16404
Michael W. Hudson54241132001-12-07 15:38:26 +000016405
Matthias Kloseb9621712010-04-24 17:59:49 +000016406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16407$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016408if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016410else
Matthias Kloseb9621712010-04-24 17:59:49 +000016411 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016412 ac_cv_broken_mbstowcs=no
16413else
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016415/* end confdefs.h. */
16416
Stefan Krah19c21392012-11-22 23:47:32 +010016417#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016418#include<stdlib.h>
16419int main() {
16420 size_t len = -1;
16421 const char *str = "text";
16422 len = mbstowcs(NULL, str, 0);
16423 return (len != 4);
16424}
16425
16426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016427if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016428 ac_cv_broken_mbstowcs=no
16429else
Matthias Kloseb9621712010-04-24 17:59:49 +000016430 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016431fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16433 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016434fi
16435
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016436fi
16437
Matthias Kloseb9621712010-04-24 17:59:49 +000016438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16439$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016440if test "$ac_cv_broken_mbstowcs" = yes
16441then
16442
Matthias Kloseb9621712010-04-24 17:59:49 +000016443$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016444
16445fi
16446
Antoine Pitroub52ec782009-01-25 16:34:23 +000016447# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16449$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016450
16451# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016452if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016453 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016454if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016455then
16456
Matthias Kloseb9621712010-04-24 17:59:49 +000016457$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016458
Matthias Kloseb9621712010-04-24 17:59:49 +000016459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16460$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016461fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016462if test "$withval" = no
16463then
16464
16465$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16466
Matthias Kloseb9621712010-04-24 17:59:49 +000016467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16468$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016469fi
16470
Antoine Pitrou042b1282010-08-13 21:15:58 +000016471else
16472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16473$as_echo "no value specified" >&6; }
16474fi
16475
Antoine Pitroub52ec782009-01-25 16:34:23 +000016476
Matthias Kloseb17289e2012-03-15 19:51:34 +010016477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16478$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16479if ${ac_cv_computed_gotos+:} false; then :
16480 $as_echo_n "(cached) " >&6
16481else
16482 if test "$cross_compiling" = yes; then :
16483 if test "${with_computed_gotos+set}" = set; then
16484 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16485 else
16486 ac_cv_computed_gotos=no
16487 fi
16488else
16489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16490/* end confdefs.h. */
16491
16492int main(int argc, char **argv)
16493{
16494 static void *targets[1] = { &&LABEL1 };
16495 goto LABEL2;
16496LABEL1:
16497 return 0;
16498LABEL2:
16499 goto *targets[0];
16500 return 1;
16501}
16502
16503_ACEOF
16504if ac_fn_c_try_run "$LINENO"; then :
16505 ac_cv_computed_gotos=yes
16506else
16507 ac_cv_computed_gotos=no
16508fi
16509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16510 conftest.$ac_objext conftest.beam conftest.$ac_ext
16511fi
16512
16513fi
16514
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16516$as_echo "$ac_cv_computed_gotos" >&6; }
16517case "$ac_cv_computed_gotos" in yes*)
16518
16519$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16520
16521esac
16522
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016523case $ac_sys_system in
16524AIX*)
16525
16526$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16527 ;;
16528esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016529
Michael W. Hudson54241132001-12-07 15:38:26 +000016530
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016531
16532
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016533for h in `(cd $srcdir;echo Python/thread_*.h)`
16534do
16535 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16536done
16537
Michael W. Hudson54241132001-12-07 15:38:26 +000016538
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016539SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16541$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016542for dir in $SRCDIRS; do
16543 if test ! -d $dir; then
16544 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016545 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016546done
Matthias Kloseb9621712010-04-24 17:59:49 +000016547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16548$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016549
Stefan Krah1919b7e2012-03-21 18:25:23 +010016550# Availability of -O2:
16551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16552$as_echo_n "checking for -O2... " >&6; }
16553saved_cflags="$CFLAGS"
16554CFLAGS="-O2"
16555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556/* end confdefs.h. */
16557
16558int
16559main ()
16560{
16561
16562
16563 ;
16564 return 0;
16565}
16566_ACEOF
16567if ac_fn_c_try_compile "$LINENO"; then :
16568 have_O2=yes
16569else
16570 have_O2=no
16571fi
16572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16574$as_echo "$have_O2" >&6; }
16575CFLAGS="$saved_cflags"
16576
16577# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16578# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16580$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16581saved_cflags="$CFLAGS"
16582CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16583if test "$have_O2" = no; then
16584 CFLAGS=""
16585fi
16586if test "$cross_compiling" = yes; then :
16587 have_glibc_memmove_bug=undefined
16588else
16589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16590/* end confdefs.h. */
16591
16592#include <stdio.h>
16593#include <stdlib.h>
16594#include <string.h>
16595void foo(void *p, void *q) { memmove(p, q, 19); }
16596int main() {
16597 char a[32] = "123456789000000000";
16598 foo(&a[9], a);
16599 if (strcmp(a, "123456789123456789000000000") != 0)
16600 return 1;
16601 foo(a, &a[9]);
16602 if (strcmp(a, "123456789000000000") != 0)
16603 return 1;
16604 return 0;
16605}
16606
16607_ACEOF
16608if ac_fn_c_try_run "$LINENO"; then :
16609 have_glibc_memmove_bug=no
16610else
16611 have_glibc_memmove_bug=yes
16612fi
16613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16614 conftest.$ac_objext conftest.beam conftest.$ac_ext
16615fi
16616
16617CFLAGS="$saved_cflags"
16618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16619$as_echo "$have_glibc_memmove_bug" >&6; }
16620if test "$have_glibc_memmove_bug" = yes; then
16621
16622$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16623
16624fi
16625
16626if test "$have_gcc_asm_for_x87" = yes; then
16627 # Some versions of gcc miscompile inline asm:
16628 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16629 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16630 case $CC in
16631 *gcc*)
16632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16633$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16634 saved_cflags="$CFLAGS"
16635 CFLAGS="-O2"
16636 if test "$cross_compiling" = yes; then :
16637 have_ipa_pure_const_bug=undefined
16638else
16639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16640/* end confdefs.h. */
16641
16642 __attribute__((noinline)) int
16643 foo(int *p) {
16644 int r;
16645 asm ( "movl \$6, (%1)\n\t"
16646 "xorl %0, %0\n\t"
16647 : "=r" (r) : "r" (p) : "memory"
16648 );
16649 return r;
16650 }
16651 int main() {
16652 int p = 8;
16653 if ((foo(&p) ? : p) != 6)
16654 return 1;
16655 return 0;
16656 }
16657
16658_ACEOF
16659if ac_fn_c_try_run "$LINENO"; then :
16660 have_ipa_pure_const_bug=no
16661else
16662 have_ipa_pure_const_bug=yes
16663fi
16664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16665 conftest.$ac_objext conftest.beam conftest.$ac_ext
16666fi
16667
16668 CFLAGS="$saved_cflags"
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16670$as_echo "$have_ipa_pure_const_bug" >&6; }
16671 if test "$have_ipa_pure_const_bug" = yes; then
16672
16673$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16674
16675 fi
16676 ;;
16677 esac
16678fi
16679
Victor Stinner4f5366e2015-01-09 02:13:19 +010016680# Check for stdatomic.h
16681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16682$as_echo_n "checking for stdatomic.h... " >&6; }
16683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16684/* end confdefs.h. */
16685
16686
16687 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016688 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016689 int main() {
16690 int loaded_value = atomic_load(&value);
16691 return 0;
16692 }
16693
16694
16695_ACEOF
16696if ac_fn_c_try_link "$LINENO"; then :
16697 have_stdatomic_h=yes
16698else
16699 have_stdatomic_h=no
16700fi
16701rm -f core conftest.err conftest.$ac_objext \
16702 conftest$ac_exeext conftest.$ac_ext
16703
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16705$as_echo "$have_stdatomic_h" >&6; }
16706
16707if test "$have_stdatomic_h" = yes; then
16708
16709$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16710
16711fi
16712
16713# Check for GCC >= 4.7 __atomic builtins
16714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16715$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16717/* end confdefs.h. */
16718
16719
16720 volatile int val = 1;
16721 int main() {
16722 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16723 return 0;
16724 }
16725
16726
16727_ACEOF
16728if ac_fn_c_try_link "$LINENO"; then :
16729 have_builtin_atomic=yes
16730else
16731 have_builtin_atomic=no
16732fi
16733rm -f core conftest.err conftest.$ac_objext \
16734 conftest$ac_exeext conftest.$ac_ext
16735
16736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16737$as_echo "$have_builtin_atomic" >&6; }
16738
16739if test "$have_builtin_atomic" = yes; then
16740
16741$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16742
16743fi
16744
Ned Deily322f5ba2013-11-21 23:01:59 -080016745# ensurepip option
16746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16747$as_echo_n "checking for ensurepip... " >&6; }
16748
16749# Check whether --with-ensurepip was given.
16750if test "${with_ensurepip+set}" = set; then :
16751 withval=$with_ensurepip;
16752else
16753 with_ensurepip=upgrade
16754fi
16755
16756case $with_ensurepip in #(
16757 yes|upgrade) :
16758 ENSUREPIP=upgrade ;; #(
16759 install) :
16760 ENSUREPIP=install ;; #(
16761 no) :
16762 ENSUREPIP=no ;; #(
16763 *) :
16764 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16765esac
16766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16767$as_echo "$ENSUREPIP" >&6; }
16768
16769
Victor Stinner35a97c02015-03-08 02:59:09 +010016770# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16772$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774/* end confdefs.h. */
16775
16776
16777 #include <dirent.h>
16778
16779 int main() {
16780 struct dirent entry;
16781 return entry.d_type == DT_UNKNOWN;
16782 }
16783
16784
16785_ACEOF
16786if ac_fn_c_try_link "$LINENO"; then :
16787 have_dirent_d_type=yes
16788else
16789 have_dirent_d_type=no
16790fi
16791rm -f core conftest.err conftest.$ac_objext \
16792 conftest$ac_exeext conftest.$ac_ext
16793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16794$as_echo "$have_dirent_d_type" >&6; }
16795
16796if test "$have_dirent_d_type" = yes; then
16797
16798$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16799
16800fi
16801
Victor Stinner9eb57c52015-03-19 22:21:49 +010016802# check if the Linux getrandom() syscall is available
16803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16804$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16806/* end confdefs.h. */
16807
16808
Victor Stinner1b80b242016-04-12 22:34:58 +020016809 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016810 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016811 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016812
16813 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016814 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016815 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016816 const int flags = GRND_NONBLOCK;
16817 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016818 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016819 return 0;
16820 }
16821
16822
16823_ACEOF
16824if ac_fn_c_try_link "$LINENO"; then :
16825 have_getrandom_syscall=yes
16826else
16827 have_getrandom_syscall=no
16828fi
16829rm -f core conftest.err conftest.$ac_objext \
16830 conftest$ac_exeext conftest.$ac_ext
16831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16832$as_echo "$have_getrandom_syscall" >&6; }
16833
16834if test "$have_getrandom_syscall" = yes; then
16835
16836$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16837
16838fi
16839
Victor Stinner3abf44e2015-09-18 15:38:37 +020016840# check if the getrandom() function is available
16841# the test was written for the Solaris function of <sys/random.h>
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16843$as_echo_n "checking for the getrandom() function... " >&6; }
16844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16845/* end confdefs.h. */
16846
16847
16848 #include <sys/random.h>
16849
16850 int main() {
16851 char buffer[1];
16852 const size_t buflen = sizeof(buffer);
16853 const int flags = 0;
16854 /* ignore the result, Python checks for ENOSYS at runtime */
16855 (void)getrandom(buffer, buflen, flags);
16856 return 0;
16857 }
16858
16859
16860_ACEOF
16861if ac_fn_c_try_link "$LINENO"; then :
16862 have_getrandom=yes
16863else
16864 have_getrandom=no
16865fi
16866rm -f core conftest.err conftest.$ac_objext \
16867 conftest$ac_exeext conftest.$ac_ext
16868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16869$as_echo "$have_getrandom" >&6; }
16870
16871if test "$have_getrandom" = yes; then
16872
16873$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16874
16875fi
16876
Christian Heimesff5be6e2018-01-20 13:19:21 +010016877# Check for usable OpenSSL
16878
16879 found=false
16880
16881# Check whether --with-openssl was given.
16882if test "${with_openssl+set}" = set; then :
16883 withval=$with_openssl;
16884 case "$withval" in
16885 "" | y | ye | yes | n | no)
16886 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16887 ;;
16888 *) ssldirs="$withval"
16889 ;;
16890 esac
16891
16892else
16893
16894 # if pkg-config is installed and openssl has installed a .pc file,
16895 # then use that information and don't search ssldirs
16896 if test -n "$ac_tool_prefix"; then
16897 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16898set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16900$as_echo_n "checking for $ac_word... " >&6; }
16901if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16902 $as_echo_n "(cached) " >&6
16903else
16904 if test -n "$PKG_CONFIG"; then
16905 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16906else
16907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16908for as_dir in $PATH
16909do
16910 IFS=$as_save_IFS
16911 test -z "$as_dir" && as_dir=.
16912 for ac_exec_ext in '' $ac_executable_extensions; do
16913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16914 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16916 break 2
16917 fi
16918done
16919 done
16920IFS=$as_save_IFS
16921
16922fi
16923fi
16924PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16925if test -n "$PKG_CONFIG"; then
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16927$as_echo "$PKG_CONFIG" >&6; }
16928else
16929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16930$as_echo "no" >&6; }
16931fi
16932
16933
16934fi
16935if test -z "$ac_cv_prog_PKG_CONFIG"; then
16936 ac_ct_PKG_CONFIG=$PKG_CONFIG
16937 # Extract the first word of "pkg-config", so it can be a program name with args.
16938set dummy pkg-config; ac_word=$2
16939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16940$as_echo_n "checking for $ac_word... " >&6; }
16941if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16942 $as_echo_n "(cached) " >&6
16943else
16944 if test -n "$ac_ct_PKG_CONFIG"; then
16945 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16946else
16947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16948for as_dir in $PATH
16949do
16950 IFS=$as_save_IFS
16951 test -z "$as_dir" && as_dir=.
16952 for ac_exec_ext in '' $ac_executable_extensions; do
16953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16954 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16956 break 2
16957 fi
16958done
16959 done
16960IFS=$as_save_IFS
16961
16962fi
16963fi
16964ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16965if test -n "$ac_ct_PKG_CONFIG"; then
16966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16967$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16968else
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16970$as_echo "no" >&6; }
16971fi
16972
16973 if test "x$ac_ct_PKG_CONFIG" = x; then
16974 PKG_CONFIG=""
16975 else
16976 case $cross_compiling:$ac_tool_warned in
16977yes:)
16978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16980ac_tool_warned=yes ;;
16981esac
16982 PKG_CONFIG=$ac_ct_PKG_CONFIG
16983 fi
16984else
16985 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16986fi
16987
16988 if test x"$PKG_CONFIG" != x""; then
16989 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16990 if test $? = 0; then
16991 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16992 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16993 found=true
16994 fi
16995 fi
16996
16997 # no such luck; use some default ssldirs
16998 if ! $found; then
16999 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17000 fi
17001
17002
17003fi
17004
17005
17006
17007 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17008 # an 'openssl' subdirectory
17009
17010 if ! $found; then
17011 OPENSSL_INCLUDES=
17012 for ssldir in $ssldirs; do
17013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17014$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17015 if test -f "$ssldir/include/openssl/ssl.h"; then
17016 OPENSSL_INCLUDES="-I$ssldir/include"
17017 OPENSSL_LDFLAGS="-L$ssldir/lib"
17018 OPENSSL_LIBS="-lssl -lcrypto"
17019 found=true
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17021$as_echo "yes" >&6; }
17022 break
17023 else
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17025$as_echo "no" >&6; }
17026 fi
17027 done
17028
17029 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17030 # it will just work!
17031 fi
17032
17033 # try the preprocessor and linker with our new flags,
17034 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17035
17036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17037$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17038 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17039 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17040
17041 save_LIBS="$LIBS"
17042 save_LDFLAGS="$LDFLAGS"
17043 save_CPPFLAGS="$CPPFLAGS"
17044 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17045 LIBS="$OPENSSL_LIBS $LIBS"
17046 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17048/* end confdefs.h. */
17049#include <openssl/ssl.h>
17050int
17051main ()
17052{
17053SSL_new(NULL)
17054 ;
17055 return 0;
17056}
17057_ACEOF
17058if ac_fn_c_try_link "$LINENO"; then :
17059
17060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17061$as_echo "yes" >&6; }
17062 have_openssl=yes
17063
17064else
17065
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17067$as_echo "no" >&6; }
17068 have_openssl=no
17069
17070fi
17071rm -f core conftest.err conftest.$ac_objext \
17072 conftest$ac_exeext conftest.$ac_ext
17073 CPPFLAGS="$save_CPPFLAGS"
17074 LDFLAGS="$save_LDFLAGS"
17075 LIBS="$save_LIBS"
17076
17077
17078
17079
17080
17081
17082if test "$have_openssl" = yes; then
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17084$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17085
17086 save_LIBS="$LIBS"
17087 save_LDFLAGS="$LDFLAGS"
17088 save_CPPFLAGS="$CPPFLAGS"
17089 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17090 LIBS="$OPENSSL_LIBS $LIBS"
17091 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17092
17093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17094/* end confdefs.h. */
17095
17096 #include <openssl/x509_vfy.h>
17097
17098int
17099main ()
17100{
17101
17102 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17103 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17104 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17105 X509_VERIFY_PARAM_set_hostflags(p, 0);
17106
17107 ;
17108 return 0;
17109}
17110
17111_ACEOF
17112if ac_fn_c_try_link "$LINENO"; then :
17113
17114 ac_cv_has_x509_verify_param_set1_host=yes
17115
17116else
17117
17118 ac_cv_has_x509_verify_param_set1_host=no
17119
17120fi
17121rm -f core conftest.err conftest.$ac_objext \
17122 conftest$ac_exeext conftest.$ac_ext
17123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17124$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17125 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17126
17127$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17128
17129 fi
17130
17131 CPPFLAGS="$save_CPPFLAGS"
17132 LDFLAGS="$save_LDFLAGS"
17133 LIBS="$save_LIBS"
17134fi
17135
Christian Heimes892d66e2018-01-29 14:10:18 +010017136# ssl module default cipher suite string
17137
17138
17139
17140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17141$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17142
17143# Check whether --with-ssl-default-suites was given.
17144if test "${with_ssl_default_suites+set}" = set; then :
17145 withval=$with_ssl_default_suites;
17146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17147$as_echo "$withval" >&6; }
17148case "$withval" in
17149 python)
17150 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17151
17152 ;;
17153 openssl)
17154 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17155
17156 ;;
17157 *)
17158 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17159
17160 cat >>confdefs.h <<_ACEOF
17161#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17162_ACEOF
17163
17164 ;;
17165esac
17166
17167else
17168
17169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17170$as_echo "python" >&6; }
17171$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17172
17173
17174fi
17175
17176
17177
Guido van Rossum627b2d71993-12-24 10:39:16 +000017178# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017179ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017180
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017181ac_config_files="$ac_config_files Modules/ld_so_aix"
17182
Martin v. Löwis11437992002-04-12 09:54:03 +000017183cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017184# This file is a shell script that caches the results of configure
17185# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017186# scripts and configure runs, see configure's option --config-cache.
17187# It is not useful on other systems. If it contains results you don't
17188# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017189#
Martin v. Löwis11437992002-04-12 09:54:03 +000017190# config.status only pays attention to the cache file if you give it
17191# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017192#
Skip Montanaro6dead952003-09-25 14:50:04 +000017193# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017194# loading this file, other *unset* `ac_cv_foo' will be assigned the
17195# following values.
17196
17197_ACEOF
17198
Guido van Rossumf78abae1997-01-21 22:02:36 +000017199# The following way of writing the cache mishandles newlines in values,
17200# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017202# Ultrix sh set writes to stderr and can't be redirected directly,
17203# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204(
17205 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17206 eval ac_val=\$$ac_var
17207 case $ac_val in #(
17208 *${as_nl}*)
17209 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017210 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17211$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017212 esac
17213 case $ac_var in #(
17214 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017215 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17216 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 esac ;;
17218 esac
17219 done
17220
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17223 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017224 # `set' does not quote correctly, so add quotes: double-quote
17225 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017226 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017227 "s/'/'\\\\''/g;
17228 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017230 *)
17231 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017233 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234 esac |
17235 sort
17236) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017237 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017241 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17242 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17244 :end' >>confcache
17245if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17246 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017247 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017248 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17249$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017250 if test ! -f "$cache_file" || test -h "$cache_file"; then
17251 cat confcache >"$cache_file"
17252 else
17253 case $cache_file in #(
17254 */* | ?:*)
17255 mv -f confcache "$cache_file"$$ &&
17256 mv -f "$cache_file"$$ "$cache_file" ;; #(
17257 *)
17258 mv -f confcache "$cache_file" ;;
17259 esac
17260 fi
17261 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017262 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017263 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17264$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017265 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017266fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017267rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017268
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017269test "x$prefix" = xNONE && prefix=$ac_default_prefix
17270# Let make expand exec_prefix.
17271test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017273DEFS=-DHAVE_CONFIG_H
17274
Skip Montanaro6dead952003-09-25 14:50:04 +000017275ac_libobjs=
17276ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017277U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017278for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17279 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017281 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17283 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017284 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17285 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017286done
17287LIBOBJS=$ac_libobjs
17288
17289LTLIBOBJS=$ac_ltlibobjs
17290
17291
Martin v. Löwis11437992002-04-12 09:54:03 +000017292
Matthias Kloseb9621712010-04-24 17:59:49 +000017293
Victor Stinnere0be4232011-10-25 13:06:09 +020017294: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017295ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017296ac_clean_files_save=$ac_clean_files
17297ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017298{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17299$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17300as_write_fail=0
17301cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017302#! $SHELL
17303# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017304# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017305# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017306# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017307
Martin v. Löwis11437992002-04-12 09:54:03 +000017308debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017309ac_cs_recheck=false
17310ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017311
Matthias Kloseb9621712010-04-24 17:59:49 +000017312SHELL=\${CONFIG_SHELL-$SHELL}
17313export SHELL
17314_ASEOF
17315cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17316## -------------------- ##
17317## M4sh Initialization. ##
17318## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320# Be more Bourne compatible
17321DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017322if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017323 emulate sh
17324 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017326 # is contrary to our usage. Disable this feature.
17327 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017329else
Matthias Kloseb9621712010-04-24 17:59:49 +000017330 case `(set -o) 2>/dev/null` in #(
17331 *posix*) :
17332 set -o posix ;; #(
17333 *) :
17334 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017336fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017337
17338
Matthias Kloseb9621712010-04-24 17:59:49 +000017339as_nl='
17340'
17341export as_nl
17342# Printing a long string crashes Solaris 7 /usr/bin/printf.
17343as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17344as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17345as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17346# Prefer a ksh shell builtin over an external printf program on Solaris,
17347# but without wasting forks for bash or zsh.
17348if test -z "$BASH_VERSION$ZSH_VERSION" \
17349 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17350 as_echo='print -r --'
17351 as_echo_n='print -rn --'
17352elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17353 as_echo='printf %s\n'
17354 as_echo_n='printf %s'
17355else
17356 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17357 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17358 as_echo_n='/usr/ucb/echo -n'
17359 else
17360 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17361 as_echo_n_body='eval
17362 arg=$1;
17363 case $arg in #(
17364 *"$as_nl"*)
17365 expr "X$arg" : "X\\(.*\\)$as_nl";
17366 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17367 esac;
17368 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17369 '
17370 export as_echo_n_body
17371 as_echo_n='sh -c $as_echo_n_body as_echo'
17372 fi
17373 export as_echo_body
17374 as_echo='sh -c $as_echo_body as_echo'
17375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017376
17377# The user is always right.
17378if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017379 PATH_SEPARATOR=:
17380 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17381 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17382 PATH_SEPARATOR=';'
17383 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386
17387# IFS
17388# We need space, tab and new line, in precisely that order. Quoting is
17389# there to prevent editors from complaining about space-tab.
17390# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17391# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392IFS=" "" $as_nl"
17393
17394# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017395as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017396case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397 *[\\/]* ) as_myself=$0 ;;
17398 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017399for as_dir in $PATH
17400do
17401 IFS=$as_save_IFS
17402 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17404 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 ;;
17408esac
17409# We did not find ourselves, most probably we were run as `sh COMMAND'
17410# in which case we are not to be found in the path.
17411if test "x$as_myself" = x; then
17412 as_myself=$0
17413fi
17414if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017415 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17416 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417fi
17418
Matthias Kloseb9621712010-04-24 17:59:49 +000017419# Unset variables that we do not need and which cause bugs (e.g. in
17420# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17421# suppresses any "Segmentation fault" message there. '((' could
17422# trigger a bug in pdksh 5.2.14.
17423for as_var in BASH_ENV ENV MAIL MAILPATH
17424do eval test x\${$as_var+set} = xset \
17425 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426done
17427PS1='$ '
17428PS2='> '
17429PS4='+ '
17430
17431# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017432LC_ALL=C
17433export LC_ALL
17434LANGUAGE=C
17435export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436
Matthias Kloseb9621712010-04-24 17:59:49 +000017437# CDPATH.
17438(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17439
17440
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017441# as_fn_error STATUS ERROR [LINENO LOG_FD]
17442# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017443# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17444# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017445# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017446as_fn_error ()
17447{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017448 as_status=$1; test $as_status -eq 0 && as_status=1
17449 if test "$4"; then
17450 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17451 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017452 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 as_fn_exit $as_status
17455} # as_fn_error
17456
17457
17458# as_fn_set_status STATUS
17459# -----------------------
17460# Set $? to STATUS, without forking.
17461as_fn_set_status ()
17462{
17463 return $1
17464} # as_fn_set_status
17465
17466# as_fn_exit STATUS
17467# -----------------
17468# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17469as_fn_exit ()
17470{
17471 set +e
17472 as_fn_set_status $1
17473 exit $1
17474} # as_fn_exit
17475
17476# as_fn_unset VAR
17477# ---------------
17478# Portably unset VAR.
17479as_fn_unset ()
17480{
17481 { eval $1=; unset $1;}
17482}
17483as_unset=as_fn_unset
17484# as_fn_append VAR VALUE
17485# ----------------------
17486# Append the text in VALUE to the end of the definition contained in VAR. Take
17487# advantage of any shell optimizations that allow amortized linear growth over
17488# repeated appends, instead of the typical quadratic growth present in naive
17489# implementations.
17490if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17491 eval 'as_fn_append ()
17492 {
17493 eval $1+=\$2
17494 }'
17495else
17496 as_fn_append ()
17497 {
17498 eval $1=\$$1\$2
17499 }
17500fi # as_fn_append
17501
17502# as_fn_arith ARG...
17503# ------------------
17504# Perform arithmetic evaluation on the ARGs, and store the result in the
17505# global $as_val. Take advantage of shells that can avoid forks. The arguments
17506# must be portable across $(()) and expr.
17507if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17508 eval 'as_fn_arith ()
17509 {
17510 as_val=$(( $* ))
17511 }'
17512else
17513 as_fn_arith ()
17514 {
17515 as_val=`expr "$@" || test $? -eq 1`
17516 }
17517fi # as_fn_arith
17518
17519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520if expr a : '\(a\)' >/dev/null 2>&1 &&
17521 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17522 as_expr=expr
17523else
17524 as_expr=false
17525fi
17526
17527if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17528 as_basename=basename
17529else
17530 as_basename=false
17531fi
17532
Matthias Kloseb9621712010-04-24 17:59:49 +000017533if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17534 as_dirname=dirname
17535else
17536 as_dirname=false
17537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539as_me=`$as_basename -- "$0" ||
17540$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17541 X"$0" : 'X\(//\)$' \| \
17542 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017543$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 sed '/^.*\/\([^/][^/]*\)\/*$/{
17545 s//\1/
17546 q
17547 }
17548 /^X\/\(\/\/\)$/{
17549 s//\1/
17550 q
17551 }
17552 /^X\/\(\/\).*/{
17553 s//\1/
17554 q
17555 }
17556 s/.*/./; q'`
17557
Matthias Kloseb9621712010-04-24 17:59:49 +000017558# Avoid depending upon Character Ranges.
17559as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17560as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17561as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17562as_cr_digits='0123456789'
17563as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564
17565ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017566case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017570 xy) ECHO_C='\c';;
17571 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17572 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 esac;;
17574*)
17575 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017577
Martin v. Löwis11437992002-04-12 09:54:03 +000017578rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579if test -d conf$$.dir; then
17580 rm -f conf$$.dir/conf$$.file
17581else
17582 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017583 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017585if (echo >conf$$.file) 2>/dev/null; then
17586 if ln -s conf$$.file conf$$ 2>/dev/null; then
17587 as_ln_s='ln -s'
17588 # ... but there are two gotchas:
17589 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17590 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017591 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017593 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017594 elif ln conf$$.file conf$$ 2>/dev/null; then
17595 as_ln_s=ln
17596 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017597 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017599else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017600 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17603rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017604
Matthias Kloseb9621712010-04-24 17:59:49 +000017605
17606# as_fn_mkdir_p
17607# -------------
17608# Create "$as_dir" as a directory, including parents if necessary.
17609as_fn_mkdir_p ()
17610{
17611
17612 case $as_dir in #(
17613 -*) as_dir=./$as_dir;;
17614 esac
17615 test -d "$as_dir" || eval $as_mkdir_p || {
17616 as_dirs=
17617 while :; do
17618 case $as_dir in #(
17619 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17620 *) as_qdir=$as_dir;;
17621 esac
17622 as_dirs="'$as_qdir' $as_dirs"
17623 as_dir=`$as_dirname -- "$as_dir" ||
17624$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17625 X"$as_dir" : 'X\(//\)[^/]' \| \
17626 X"$as_dir" : 'X\(//\)$' \| \
17627 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17628$as_echo X"$as_dir" |
17629 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17630 s//\1/
17631 q
17632 }
17633 /^X\(\/\/\)[^/].*/{
17634 s//\1/
17635 q
17636 }
17637 /^X\(\/\/\)$/{
17638 s//\1/
17639 q
17640 }
17641 /^X\(\/\).*/{
17642 s//\1/
17643 q
17644 }
17645 s/.*/./; q'`
17646 test -d "$as_dir" && break
17647 done
17648 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017649 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017650
17651
17652} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017653if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017654 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017655else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017656 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017657 as_mkdir_p=false
17658fi
17659
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017660
17661# as_fn_executable_p FILE
17662# -----------------------
17663# Test if FILE is an executable regular file.
17664as_fn_executable_p ()
17665{
17666 test -f "$1" && test -x "$1"
17667} # as_fn_executable_p
17668as_test_x='test -x'
17669as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017670
17671# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017672as_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 +000017673
17674# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017675as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017676
17677
Martin v. Löwis11437992002-04-12 09:54:03 +000017678exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017679## ----------------------------------- ##
17680## Main body of $CONFIG_STATUS script. ##
17681## ----------------------------------- ##
17682_ASEOF
17683test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017684
Matthias Kloseb9621712010-04-24 17:59:49 +000017685cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17686# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017687# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688# values after options handling.
17689ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017690This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017691generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017692
17693 CONFIG_FILES = $CONFIG_FILES
17694 CONFIG_HEADERS = $CONFIG_HEADERS
17695 CONFIG_LINKS = $CONFIG_LINKS
17696 CONFIG_COMMANDS = $CONFIG_COMMANDS
17697 $ $0 $@
17698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699on `(hostname || uname -n) 2>/dev/null | sed 1q`
17700"
17701
Martin v. Löwis11437992002-04-12 09:54:03 +000017702_ACEOF
17703
Matthias Kloseb9621712010-04-24 17:59:49 +000017704case $ac_config_files in *"
17705"*) set x $ac_config_files; shift; ac_config_files=$*;;
17706esac
17707
17708case $ac_config_headers in *"
17709"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17710esac
17711
17712
17713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017714# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017715config_files="$ac_config_files"
17716config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017719
Matthias Kloseb9621712010-04-24 17:59:49 +000017720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017721ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017722\`$as_me' instantiates files and other configuration actions
17723from templates according to the current configuration. Unless the files
17724and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017725
Matthias Kloseb9621712010-04-24 17:59:49 +000017726Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017727
17728 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 --config print configuration, then exit
17731 -q, --quiet, --silent
17732 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 -d, --debug don't remove temporary files
17734 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017735 --file=FILE[:TEMPLATE]
17736 instantiate the configuration file FILE
17737 --header=FILE[:TEMPLATE]
17738 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017739
17740Configuration files:
17741$config_files
17742
17743Configuration headers:
17744$config_headers
17745
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017746Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017749cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17750ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017751ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017752python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017753configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017754 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017755
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017756Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017757This config.status script is free software; the Free Software Foundation
17758gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759
17760ac_pwd='$ac_pwd'
17761srcdir='$srcdir'
17762INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017763MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017764test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017765_ACEOF
17766
Matthias Kloseb9621712010-04-24 17:59:49 +000017767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17768# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017769ac_need_defaults=:
17770while test $# != 0
17771do
17772 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017773 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17775 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017776 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017777 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017778 --*=)
17779 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17780 ac_optarg=
17781 ac_shift=:
17782 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017784 ac_option=$1
17785 ac_optarg=$2
17786 ac_shift=shift
17787 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017788 esac
17789
Skip Montanaro6dead952003-09-25 14:50:04 +000017790 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017792 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17793 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017794 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017795 $as_echo "$ac_cs_version"; exit ;;
17796 --config | --confi | --conf | --con | --co | --c )
17797 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 debug=: ;;
17800 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017801 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017802 case $ac_optarg in
17803 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017804 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017805 esac
17806 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 ac_need_defaults=false;;
17808 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017809 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017810 case $ac_optarg in
17811 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17812 esac
17813 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815 --he | --h)
17816 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017817 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017818Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017820 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017821 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17822 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17823 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017824
17825 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017826 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017827Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017828
Matthias Kloseb9621712010-04-24 17:59:49 +000017829 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017831
17832 esac
17833 shift
17834done
17835
Skip Montanaro6dead952003-09-25 14:50:04 +000017836ac_configure_extra_args=
17837
17838if $ac_cs_silent; then
17839 exec 6>/dev/null
17840 ac_configure_extra_args="$ac_configure_extra_args --silent"
17841fi
17842
17843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017845if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017846 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017847 shift
17848 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17849 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017851 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017852fi
17853
Martin v. Löwis11437992002-04-12 09:54:03 +000017854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856exec 5>>config.log
17857{
17858 echo
17859 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17860## Running $as_me. ##
17861_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017862 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017866cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
Matthias Kloseb9621712010-04-24 17:59:49 +000017869cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870
17871# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017872for ac_config_target in $ac_config_targets
17873do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 case $ac_config_target in
17875 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17876 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17877 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017878 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17879 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017881 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017882 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017883 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884
Victor Stinnere0be4232011-10-25 13:06:09 +020017885 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017886 esac
17887done
17888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889
Martin v. Löwis11437992002-04-12 09:54:03 +000017890# If the user did not use the arguments to specify the items to instantiate,
17891# then the envvar interface is used. Set only those that are not.
17892# We use the long form for the default assignment because of an extremely
17893# bizarre bug on SunOS 4.1.3.
17894if $ac_need_defaults; then
17895 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17896 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17897fi
17898
Skip Montanaro6dead952003-09-25 14:50:04 +000017899# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017901# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902# Hook for its removal unless debugging.
17903# Note that there is a small window in which the directory will not be cleaned:
17904# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017905$debug ||
17906{
Victor Stinnere0be4232011-10-25 13:06:09 +020017907 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017909 : "${ac_tmp:=$tmp}"
17910 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017912 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017913}
Martin v. Löwis11437992002-04-12 09:54:03 +000017914# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017915
Martin v. Löwis11437992002-04-12 09:54:03 +000017916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017918 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017919} ||
17920{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921 tmp=./conf$$-$RANDOM
17922 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017923} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017924ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017925
Matthias Kloseb9621712010-04-24 17:59:49 +000017926# Set up the scripts for CONFIG_FILES section.
17927# No need to generate them if there are no CONFIG_FILES.
17928# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017930
Matthias Kloseb9621712010-04-24 17:59:49 +000017931
17932ac_cr=`echo X | tr X '\015'`
17933# On cygwin, bash can eat \r inside `` if the user requested igncr.
17934# But we know of no other shell where ac_cr would be empty at this
17935# point, so we can use a bashism as a fallback.
17936if test "x$ac_cr" = x; then
17937 eval ac_cr=\$\'\\r\'
17938fi
17939ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17940if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017941 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017942else
17943 ac_cs_awk_cr=$ac_cr
17944fi
17945
Victor Stinnere0be4232011-10-25 13:06:09 +020017946echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017947_ACEOF
17948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949
Matthias Kloseb9621712010-04-24 17:59:49 +000017950{
17951 echo "cat >conf$$subs.awk <<_ACEOF" &&
17952 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17953 echo "_ACEOF"
17954} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017955 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17956ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017957ac_delim='%!_!# '
17958for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017959 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017960 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961
Matthias Kloseb9621712010-04-24 17:59:49 +000017962 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17963 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017964 break
17965 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017966 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967 else
17968 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970done
Matthias Kloseb9621712010-04-24 17:59:49 +000017971rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972
Matthias Kloseb9621712010-04-24 17:59:49 +000017973cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017974cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017976sed -n '
17977h
17978s/^/S["/; s/!.*/"]=/
17979p
17980g
17981s/^[^!]*!//
17982:repl
17983t repl
17984s/'"$ac_delim"'$//
17985t delim
17986:nl
17987h
17988s/\(.\{148\}\)..*/\1/
17989t more1
17990s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17991p
17992n
17993b repl
17994:more1
17995s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17996p
17997g
17998s/.\{148\}//
17999t nl
18000:delim
18001h
18002s/\(.\{148\}\)..*/\1/
18003t more2
18004s/["\\]/\\&/g; s/^/"/; s/$/"/
18005p
18006b
18007:more2
18008s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18009p
18010g
18011s/.\{148\}//
18012t delim
18013' <conf$$subs.awk | sed '
18014/^[^""]/{
18015 N
18016 s/\n//
18017}
18018' >>$CONFIG_STATUS || ac_write_fail=1
18019rm -f conf$$subs.awk
18020cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18021_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018022cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018023 for (key in S) S_is_set[key] = 1
18024 FS = ""
18025
18026}
18027{
18028 line = $ 0
18029 nfields = split(line, field, "@")
18030 substed = 0
18031 len = length(field[1])
18032 for (i = 2; i < nfields; i++) {
18033 key = field[i]
18034 keylen = length(key)
18035 if (S_is_set[key]) {
18036 value = S[key]
18037 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18038 len += length(value) + length(field[++i])
18039 substed = 1
18040 } else
18041 len += 1 + keylen
18042 }
18043
18044 print line
18045}
18046
18047_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18050if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18051 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18052else
18053 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018054fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018055 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018056_ACEOF
18057
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018058# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18059# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060# trailing colons and then remove the whole line if VPATH becomes empty
18061# (actually we leave an empty line to preserve line numbers).
18062if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018063 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18064h
18065s///
18066s/^/:/
18067s/[ ]*$/:/
18068s/:\$(srcdir):/:/g
18069s/:\${srcdir}:/:/g
18070s/:@srcdir@:/:/g
18071s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018073x
18074s/\(=[ ]*\).*/\1/
18075G
18076s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077s/^[^=]*=[ ]*$//
18078}'
18079fi
18080
Matthias Kloseb9621712010-04-24 17:59:49 +000018081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018082fi # test -n "$CONFIG_FILES"
18083
Matthias Kloseb9621712010-04-24 17:59:49 +000018084# Set up the scripts for CONFIG_HEADERS section.
18085# No need to generate them if there are no CONFIG_HEADERS.
18086# This happens for instance with `./config.status Makefile'.
18087if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018088cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018089BEGIN {
18090_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091
Matthias Kloseb9621712010-04-24 17:59:49 +000018092# Transform confdefs.h into an awk script `defines.awk', embedded as
18093# here-document in config.status, that substitutes the proper values into
18094# config.h.in to produce config.h.
18095
18096# Create a delimiter string that does not exist in confdefs.h, to ease
18097# handling of long lines.
18098ac_delim='%!_!# '
18099for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018100 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18101 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018102 break
18103 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018104 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018105 else
18106 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18107 fi
18108done
18109
18110# For the awk script, D is an array of macro values keyed by name,
18111# likewise P contains macro parameters if any. Preserve backslash
18112# newline sequences.
18113
18114ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18115sed -n '
18116s/.\{148\}/&'"$ac_delim"'/g
18117t rset
18118:rset
18119s/^[ ]*#[ ]*define[ ][ ]*/ /
18120t def
18121d
18122:def
18123s/\\$//
18124t bsnl
18125s/["\\]/\\&/g
18126s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18127D["\1"]=" \3"/p
18128s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18129d
18130:bsnl
18131s/["\\]/\\&/g
18132s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18133D["\1"]=" \3\\\\\\n"\\/p
18134t cont
18135s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18136t cont
18137d
18138:cont
18139n
18140s/.\{148\}/&'"$ac_delim"'/g
18141t clear
18142:clear
18143s/\\$//
18144t bsnlc
18145s/["\\]/\\&/g; s/^/"/; s/$/"/p
18146d
18147:bsnlc
18148s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18149b cont
18150' <confdefs.h | sed '
18151s/'"$ac_delim"'/"\\\
18152"/g' >>$CONFIG_STATUS || ac_write_fail=1
18153
18154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18155 for (key in D) D_is_set[key] = 1
18156 FS = ""
18157}
18158/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18159 line = \$ 0
18160 split(line, arg, " ")
18161 if (arg[1] == "#") {
18162 defundef = arg[2]
18163 mac1 = arg[3]
18164 } else {
18165 defundef = substr(arg[1], 2)
18166 mac1 = arg[2]
18167 }
18168 split(mac1, mac2, "(") #)
18169 macro = mac2[1]
18170 prefix = substr(line, 1, index(line, defundef) - 1)
18171 if (D_is_set[macro]) {
18172 # Preserve the white space surrounding the "#".
18173 print prefix "define", macro P[macro] D[macro]
18174 next
18175 } else {
18176 # Replace #undef with comments. This is necessary, for example,
18177 # in the case of _POSIX_SOURCE, which is predefined and required
18178 # on some systems where configure will not decide to define it.
18179 if (defundef == "undef") {
18180 print "/*", prefix defundef, macro, "*/"
18181 next
18182 }
18183 }
18184}
18185{ print }
18186_ACAWK
18187_ACEOF
18188cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018189 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018190fi # test -n "$CONFIG_HEADERS"
18191
18192
18193eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18194shift
18195for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018196do
18197 case $ac_tag in
18198 :[FHLC]) ac_mode=$ac_tag; continue;;
18199 esac
18200 case $ac_mode$ac_tag in
18201 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018202 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203 :[FH]-) ac_tag=-:-;;
18204 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18205 esac
18206 ac_save_IFS=$IFS
18207 IFS=:
18208 set x $ac_tag
18209 IFS=$ac_save_IFS
18210 shift
18211 ac_file=$1
18212 shift
18213
18214 case $ac_mode in
18215 :L) ac_source=$1;;
18216 :[FH])
18217 ac_file_inputs=
18218 for ac_f
18219 do
18220 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018221 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018222 *) # Look for the file first in the build tree, then in the source tree
18223 # (if the path is not absolute). The absolute path cannot be DOS-style,
18224 # because $ac_f cannot contain `:'.
18225 test -f "$ac_f" ||
18226 case $ac_f in
18227 [\\/$]*) false;;
18228 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18229 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018230 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18233 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234 done
18235
18236 # Let's still pretend it is `configure' which instantiates (i.e., don't
18237 # use $as_me), people would be surprised to read:
18238 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018239 configure_input='Generated from '`
18240 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18241 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242 if test x"$ac_file" != x-; then
18243 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018244 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18245$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018247 # Neutralize special characters interpreted by sed in replacement strings.
18248 case $configure_input in #(
18249 *\&* | *\|* | *\\* )
18250 ac_sed_conf_input=`$as_echo "$configure_input" |
18251 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18252 *) ac_sed_conf_input=$configure_input;;
18253 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018254
18255 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018256 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18257 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258 esac
18259 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018260 esac
18261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018262 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018263$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018264 X"$ac_file" : 'X\(//\)[^/]' \| \
18265 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018267$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18269 s//\1/
18270 q
18271 }
18272 /^X\(\/\/\)[^/].*/{
18273 s//\1/
18274 q
18275 }
18276 /^X\(\/\/\)$/{
18277 s//\1/
18278 q
18279 }
18280 /^X\(\/\).*/{
18281 s//\1/
18282 q
18283 }
18284 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018285 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 ac_builddir=.
18287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018288case "$ac_dir" in
18289.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18290*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018291 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018292 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018293 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294 case $ac_top_builddir_sub in
18295 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18296 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18297 esac ;;
18298esac
18299ac_abs_top_builddir=$ac_pwd
18300ac_abs_builddir=$ac_pwd$ac_dir_suffix
18301# for backward compatibility:
18302ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018303
18304case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018306 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018307 ac_top_srcdir=$ac_top_builddir_sub
18308 ac_abs_top_srcdir=$ac_pwd ;;
18309 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018310 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311 ac_top_srcdir=$srcdir
18312 ac_abs_top_srcdir=$srcdir ;;
18313 *) # Relative name.
18314 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18315 ac_top_srcdir=$ac_top_build_prefix$srcdir
18316 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018317esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018318ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018321 case $ac_mode in
18322 :F)
18323 #
18324 # CONFIG_FILE
18325 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018326
18327 case $INSTALL in
18328 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018329 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018330 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018331 ac_MKDIR_P=$MKDIR_P
18332 case $MKDIR_P in
18333 [\\/$]* | ?:[\\/]* ) ;;
18334 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18335 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337
Matthias Kloseb9621712010-04-24 17:59:49 +000018338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339# If the template does not know about datarootdir, expand it.
18340# FIXME: This hack should be removed a few years after 2.60.
18341ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018342ac_sed_dataroot='
18343/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344 p
18345 q
18346}
18347/@datadir@/p
18348/@docdir@/p
18349/@infodir@/p
18350/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018351/@mandir@/p'
18352case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353*datarootdir*) ac_datarootdir_seen=yes;;
18354*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18356$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359 ac_datarootdir_hack='
18360 s&@datadir@&$datadir&g
18361 s&@docdir@&$docdir&g
18362 s&@infodir@&$infodir&g
18363 s&@localedir@&$localedir&g
18364 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018365 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366esac
18367_ACEOF
18368
18369# Neutralize VPATH when `$srcdir' = `.'.
18370# Shell code in configure.ac might set extrasub.
18371# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18373ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018374$extrasub
18375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018376cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018377:t
18378/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018379s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018381s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382s&@srcdir@&$ac_srcdir&;t t
18383s&@abs_srcdir@&$ac_abs_srcdir&;t t
18384s&@top_srcdir@&$ac_top_srcdir&;t t
18385s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18386s&@builddir@&$ac_builddir&;t t
18387s&@abs_builddir@&$ac_abs_builddir&;t t
18388s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18389s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018390s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018391$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018392"
Victor Stinnere0be4232011-10-25 13:06:09 +020018393eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18394 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018397 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18398 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18399 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018401which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018402$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018403which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018404
Victor Stinnere0be4232011-10-25 13:06:09 +020018405 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018406 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018407 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18408 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018409 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018410 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 ;;
18412 :H)
18413 #
18414 # CONFIG_HEADER
18415 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018416 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018417 {
18418 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018419 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18420 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018421 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018422 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018423 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18424$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018425 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018426 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018427 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018428 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 fi
18430 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018431 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018432 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018433 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018434 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437
18438 esac
18439
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018440
18441 case $ac_file$ac_mode in
18442 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18443
18444 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445done # for ac_tag
18446
Guido van Rossum627b2d71993-12-24 10:39:16 +000018447
Matthias Kloseb9621712010-04-24 17:59:49 +000018448as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018449_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018450ac_clean_files=$ac_clean_files_save
18451
Matthias Kloseb9621712010-04-24 17:59:49 +000018452test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018453 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018454
Martin v. Löwis11437992002-04-12 09:54:03 +000018455
18456# configure is writing to config.log, and then calls config.status.
18457# config.status does its own redirection, appending to config.log.
18458# Unfortunately, on DOS this fails, as config.log is still kept open
18459# by configure, so config.status won't be able to write to it; its
18460# output is simply discarded. So we exec the FD to /dev/null,
18461# effectively closing config.log, so it can be properly (re)opened and
18462# appended to by config.status. When coming back to configure, we
18463# need to make the FD available again.
18464if test "$no_create" != yes; then
18465 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018466 ac_config_status_args=
18467 test "$silent" = yes &&
18468 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018470 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018471 exec 5>>config.log
18472 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18473 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018474 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018475fi
18476if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18478$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018479fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018480
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018481
Christian Heimes75ed8902013-11-20 01:11:18 +010018482echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018483if test ! -f Modules/Setup
18484then
18485 cp $srcdir/Modules/Setup.dist Modules/Setup
18486fi
18487
Christian Heimes75ed8902013-11-20 01:11:18 +010018488echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018489if test ! -f Modules/Setup.local
18490then
18491 echo "# Edit this file for local setup changes" >Modules/Setup.local
18492fi
18493
Christian Heimes75ed8902013-11-20 01:11:18 +010018494echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018495$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018496 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018497 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018498mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018499
18500if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18501 echo "" >&6
18502 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018503 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 +000018504 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018505 echo "" >&6
18506 echo "" >&6
18507fi
18508