blob: da2c43fe7a2c5fa4e3fa617c8fd933dad7e1bbb0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200669CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000670OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700671LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700672target_os
673target_vendor
674target_cpu
675target
676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700682DEF_MAKE_RULE
683DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000685LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100686MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200690ac_ct_READELF
691READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000692ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000694AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000695GNULD
696LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000697LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000701PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000702BLDLIBRARY
703DLLLIBRARY
704LDLIBRARY
705LIBRARY
706BUILDEXEEXT
707EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200708NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200709MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710PLATFORM_TRIPLET
711MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200712ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000713MAINCC
714CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700715SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716GREP
717CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000718OBJEXT
719EXEEXT
720ac_ct_CC
721CPPFLAGS
722LDFLAGS
723CFLAGS
724CC
725EXPORT_MACOSX_DEPLOYMENT_TARGET
726CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200727_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000728MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000729FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800731FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000732FRAMEWORKALTINSTALLLAST
733FRAMEWORKALTINSTALLFIRST
734FRAMEWORKINSTALLLAST
735FRAMEWORKINSTALLFIRST
736PYTHONFRAMEWORKINSTALLDIR
737PYTHONFRAMEWORKPREFIX
738PYTHONFRAMEWORKDIR
739PYTHONFRAMEWORKIDENTIFIER
740PYTHONFRAMEWORK
741LIPO_32BIT_FLAGS
742ARCH_RUN_32BIT
743UNIVERSALSDK
744CONFIG_ARGS
745SOVERSION
746VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200747PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200748PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100749host_os
750host_vendor
751host_cpu
752host
753build_os
754build_vendor
755build_cpu
756build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500757HAS_GIT
758GITBRANCH
759GITTAG
760GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400761BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000762target_alias
763host_alias
764build_alias
765LIBS
766ECHO_T
767ECHO_N
768ECHO_C
769DEFS
770mandir
771localedir
772libdir
773psdir
774pdfdir
775dvidir
776htmldir
777infodir
778docdir
779oldincludedir
780includedir
Benjamin Peterson62ed6be2017-12-21 21:43:09 -0800781runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000782localstatedir
783sharedstatedir
784sysconfdir
785datadir
786datarootdir
787libexecdir
788sbindir
789bindir
790program_transform_name
791prefix
792exec_prefix
793PACKAGE_URL
794PACKAGE_BUGREPORT
795PACKAGE_STRING
796PACKAGE_VERSION
797PACKAGE_TARNAME
798PACKAGE_NAME
799PATH_SEPARATOR
800SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000801ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000802ac_user_opts='
803enable_option_checking
804enable_universalsdk
805with_universal_archs
806with_framework_name
807enable_framework
808with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600809with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_cxx_main
811with_suffix
812enable_shared
813enable_profiling
814with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200815with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000816enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700817with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100818with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100819with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_libs
821with_system_expat
822with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100823with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000824enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700825with_tcltk_includes
826with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000828enable_ipv6
829with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000831with_c_locale_coercion
832with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_fpectl
836with_libm
837with_libc
838enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800840with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100851CPP
852PKG_CONFIG
853PKG_CONFIG_PATH
854PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858ac_init_help=
859ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000860ac_unrecognized_opts=
861ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# The variables have the same names as the options, with
863# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876x_includes=NONE
877x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -0800893runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894includedir='${prefix}/include'
895oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 ac_prev=
914 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
934 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200965 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200991 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 no_create=yes ;;
1082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08001146 -runstatedir | --runstatedir | --runstatedi | --runstated \
1147 | --runstate | --runstat | --runsta | --runst | --runs \
1148 | --run | --ru | --r)
1149 ac_prev=runstatedir ;;
1150 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1151 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1152 | --run=* | --ru=* | --r=*)
1153 runstatedir=$ac_optarg ;;
1154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156 ac_prev=sbindir ;;
1157 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
1161 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163 | --sharedst | --shareds | --shared | --share | --shar \
1164 | --sha | --sh)
1165 ac_prev=sharedstatedir ;;
1166 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 -site | --site | --sit)
1173 ac_prev=site ;;
1174 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178 ac_prev=srcdir ;;
1179 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183 | --syscon | --sysco | --sysc | --sys | --sy)
1184 ac_prev=sysconfdir ;;
1185 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195 verbose=yes ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 -version | --version | --versio | --versi | --vers | -V)
1198 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 --x)
1233 # Obsolete; use --with-x.
1234 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237 | --x-incl | --x-inc | --x-in | --x-i)
1238 ac_prev=x_includes ;;
1239 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245 ac_prev=x_libraries ;;
1246 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 *=*)
1255 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 case $ac_envvar in #(
1258 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 export $ac_envvar ;;
1263
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001264 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001269 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 ;;
1271
1272 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273done
1274
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278fi
1279
Matthias Kloseb9621712010-04-24 17:59:49 +00001280if test -n "$ac_unrecognized_opts"; then
1281 case $enable_option_checking in
1282 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285 esac
1286fi
1287
1288# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290 datadir sysconfdir sharedstatedir localstatedir includedir \
1291 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08001292 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001295 # Remove trailing slashes.
1296 case $ac_val in
1297 */ )
1298 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299 eval $ac_var=\$ac_val;;
1300 esac
1301 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 [\\/$]* | ?:[\\/]* ) continue;;
1304 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318 if test "x$build_alias" = x; then
1319 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 elif test "x$build_alias" != "x$host_alias"; then
1321 cross_compiling=yes
1322 fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$as_myself" : 'X\(//\)[^/]' \| \
1346 X"$as_myself" : 'X\(//\)$' \| \
1347 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001366 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368 srcdir=..
1369 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370else
1371 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383 srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_env_${ac_var}_value=\$${ac_var}
1394 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402 # Omit some internal or obsolete options to make the list less imposing.
1403 # This message is too long to be a string in the A/UX 3.1 sh.
1404 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001405\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE. See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415 -h, --help display this help and exit
1416 --help=short display options specific to this package
1417 --help=recursive display the short help of all the included packages
1418 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001419 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --cache-file=FILE cache test results in FILE [disabled]
1421 -C, --config-cache alias for \`--cache-file=config.cache'
1422 -n, --no-create do not create output files
1423 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425Installation directories:
1426 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --bindir=DIR user executables [EPREFIX/bin]
1440 --sbindir=DIR system admin executables [EPREFIX/sbin]
1441 --libexecdir=DIR program executables [EPREFIX/libexec]
1442 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1443 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1444 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08001445 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --libdir=DIR object code libraries [EPREFIX/lib]
1447 --includedir=DIR C header files [PREFIX/include]
1448 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1449 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1450 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1451 --infodir=DIR info documentation [DATAROOTDIR/info]
1452 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1453 --mandir=DIR man documentation [DATAROOTDIR/man]
1454 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1455 --htmldir=DIR html documentation [DOCDIR]
1456 --dvidir=DIR dvi documentation [DOCDIR]
1457 --pdfdir=DIR pdf documentation [DOCDIR]
1458 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460
1461 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001462
1463System types:
1464 --build=BUILD configure for building on BUILD [guessed]
1465 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001466 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468fi
1469
1470if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001472 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 cat <<\_ACEOF
1475
1476Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1479 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001480 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001481 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-framework[=INSTALLDIR]
1483 Build (MacOSX|Darwin) framework
1484 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001485 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001486 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1487 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001488 --enable-loadable-sqlite-extensions
1489 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --enable-ipv6 Enable ipv6 (with ipv4) support
1491 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001492 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495Optional Packages:
1496 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1497 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001498 --with-universal-archs=ARCH
1499 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001500 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001501 --with-framework-name=FRAMEWORK
1502 specify an alternate name of the framework built
1503 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001505 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001506 --with-cxx-main=<compiler>
1507 compile main() and link python executable with C++
1508 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-suffix=.exe set executable suffix
1510 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001511 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001512 --with-lto Enable Link Time Optimization in any build. Disabled
1513 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001514 --with-hash-algorithm=[fnv|siphash24]
1515 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001516 --with-address-sanitizer
1517 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001519 --with-system-expat build pyexpat module using an installed expat
1520 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001521 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001522 --with-system-libmpdec build _decimal module using an installed libmpdec
1523 library
Ned Deilyd819b932013-09-06 01:07:05 -07001524 --with-tcltk-includes='-I...'
1525 override search for Tcl and Tk include files
1526 --with-tcltk-libs='-L...'
1527 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001528 --with-dbmliborder=db1:db2:...
1529 order to check db backends for dbm. Valid value is a
1530 colon separated string with the backend names
1531 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with(out)-doc-strings disable/enable documentation strings
1533 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001534 --with(out)-c-locale-coercion
1535 disable/enable C locale coercion to a UTF-8 based
1536 locale
1537 --with(out)-c-locale-warning
1538 disable/enable locale compatibility warning in the C
1539 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001540 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001541 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001542 --with-fpectl enable SIGFPE catching
1543 --with-libm=STRING math library
1544 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001545 --with(out)-computed-gotos
1546 Use computed gotos in evaluation loop (enabled by
1547 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001548 --with(out)-ensurepip=[=upgrade]
1549 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001552 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 CC C compiler command
1554 CFLAGS C compiler flags
1555 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1556 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001561 PKG_CONFIG path to pkg-config utility
1562 PKG_CONFIG_PATH
1563 directories to add to pkg-config's search path
1564 PKG_CONFIG_LIBDIR
1565 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
1567Use these variables to override the choices made by `configure' or to help
1568it to find libraries and programs with nonstandard names/locations.
1569
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001570Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
1574
1575if test "$ac_init_help" = "recursive"; then
1576 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -d "$ac_dir" ||
1579 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_builddir=.
1582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583case "$ac_dir" in
1584.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $ac_top_builddir_sub in
1590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592 esac ;;
1593esac
1594ac_abs_top_builddir=$ac_pwd
1595ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596# for backward compatibility:
1597ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001598
1599case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$ac_top_builddir_sub
1603 ac_abs_top_srcdir=$ac_pwd ;;
1604 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 ac_top_srcdir=$srcdir
1607 ac_abs_top_srcdir=$srcdir ;;
1608 *) # Relative name.
1609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610 ac_top_srcdir=$ac_top_build_prefix$srcdir
1611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001612esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 cd "$ac_dir" || { ac_status=$?; continue; }
1616 # Check for guested configure.
1617 if test -f "$ac_srcdir/configure.gnu"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620 elif test -f "$ac_srcdir/configure"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 fi || ac_status=$?
1626 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 done
1628fi
1629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if $ac_init_version; then
1632 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001633python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001635
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001637This configure script is free software; the Free Software Foundation
1638gives unlimited permission to copy, distribute and modify it.
1639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001642
1643## ------------------------ ##
1644## Autoconf initialization. ##
1645## ------------------------ ##
1646
1647# ac_fn_c_try_compile LINENO
1648# --------------------------
1649# Try to compile conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_compile ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 rm -f conftest.$ac_objext
1654 if { { ac_try="$ac_compile"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_compile") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } && {
1670 test -z "$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 } && test -s conftest.$ac_objext; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_compile
1684
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } > conftest.i && {
1707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
Matthias Kloseb9621712010-04-24 17:59:49 +00001722# ac_fn_c_try_link LINENO
1723# -----------------------
1724# Try to link conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_link ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext conftest$ac_exeext
1729 if { { ac_try="$ac_link"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_link") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest$ac_exeext && {
1748 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001749 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 }; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1759 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1760 # interfere with the next link command; also delete a directory that is
1761 # left behind by Apple's compiler. We do this before executing the actions.
1762 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_link
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1769# -------------------------------------------------------
1770# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771# the include files in INCLUDES and setting the cache variable VAR
1772# accordingly.
1773ac_fn_c_check_header_mongrel ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001779if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 $as_echo_n "(cached) " >&6
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785else
1786 # Is the header compilable?
1787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788$as_echo_n "checking $2 usability... " >&6; }
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791$4
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_compile "$LINENO"; then :
1795 ac_header_compiler=yes
1796else
1797 ac_header_compiler=no
1798fi
1799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801$as_echo "$ac_header_compiler" >&6; }
1802
1803# Is the header present?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805$as_echo_n "checking $2 presence... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_cpp "$LINENO"; then :
1811 ac_header_preproc=yes
1812else
1813 ac_header_preproc=no
1814fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001815rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817$as_echo "$ac_header_preproc" >&6; }
1818
1819# So? What about this header?
1820case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821 yes:no: )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826 ;;
1827 no:yes:* )
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1831$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1835$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001838( $as_echo "## --------------------------------------- ##
1839## Report this to https://bugs.python.org/ ##
1840## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 ) | sed "s/^/$as_me: WARNING: /" >&2
1842 ;;
1843esac
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=\$ac_header_compiler"
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001856
1857} # ac_fn_c_check_header_mongrel
1858
1859# ac_fn_c_try_run LINENO
1860# ----------------------
1861# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1862# that executables *can* be run.
1863ac_fn_c_try_run ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 if { { ac_try="$ac_link"
1867case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_link") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1877 { { case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_try") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; }; }; then :
1887 ac_retval=0
1888else
1889 $as_echo "$as_me: program exited with status $ac_status" >&5
1890 $as_echo "$as_me: failed program was:" >&5
1891sed 's/^/| /' conftest.$ac_ext >&5
1892
1893 ac_retval=$ac_status
1894fi
1895 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001896 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 as_fn_set_status $ac_retval
1898
1899} # ac_fn_c_try_run
1900
1901# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902# -------------------------------------------------------
1903# Tests whether HEADER exists and can be compiled using the include files in
1904# INCLUDES, setting the cache variable VAR accordingly.
1905ac_fn_c_check_header_compile ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 $as_echo_n "(cached) " >&6
1912else
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 eval "$3=yes"
1920else
1921 eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_check_header_compile
1931
Matthias Kloseb9621712010-04-24 17:59:49 +00001932# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1933# -------------------------------------------
1934# Tests whether TYPE exists after having included INCLUDES, setting cache
1935# variable VAR accordingly.
1936ac_fn_c_check_type ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$4
1948int
1949main ()
1950{
1951if (sizeof ($2))
1952 return 0;
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964if (sizeof (($2)))
1965 return 0;
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 eval "$3=yes"
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_check_type
1985
Matthias Kloseb9621712010-04-24 17:59:49 +00001986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=-1 ac_mid=-1
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
2128
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
2149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
2162
2163 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002164 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002165 as_fn_set_status $ac_retval
2166
2167} # ac_fn_c_compute_int
2168
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002177if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 $as_echo_n "(cached) " >&6
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002233
2234} # ac_fn_c_check_func
2235
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002236# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2237# ---------------------------------------------
2238# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2239# accordingly.
2240ac_fn_c_check_decl ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 as_decl_name=`echo $2|sed 's/ *(.*//'`
2244 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2246$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$4
2253int
2254main ()
2255{
2256#ifndef $as_decl_name
2257#ifdef __cplusplus
2258 (void) $as_decl_use;
2259#else
2260 (void) $as_decl_name;
2261#endif
2262#endif
2263
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$3=yes"
2270else
2271 eval "$3=no"
2272fi
2273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274fi
2275eval ac_res=\$$3
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277$as_echo "$ac_res" >&6; }
2278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279
2280} # ac_fn_c_check_decl
2281
Matthias Kloseb9621712010-04-24 17:59:49 +00002282# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2283# ----------------------------------------------------
2284# Tries to find if the field MEMBER exists in type AGGR, after including
2285# INCLUDES, setting cache variable VAR accordingly.
2286ac_fn_c_check_member ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2290$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (sizeof ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 eval "$4=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$4
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Ned Deily4829bc62016-09-12 17:29:04 -04002342It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002343generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_files
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002521## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577 # We do not want a PATH search for config.site.
2578 case $CONFIG_SITE in #((
2579 -*) ac_site_file1=./$CONFIG_SITE;;
2580 */*) ac_site_file1=$CONFIG_SITE;;
2581 *) ac_site_file1=./$CONFIG_SITE;;
2582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597 . "$ac_site_file" \
2598 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002601See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603done
2604
2605if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 # Some versions of bash will fail to source /dev/null (special files
2607 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2608 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 esac
2615 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 >$cache_file
2620fi
2621
2622# Check that the precious variables saved in the cache have kept the same
2623# value.
2624ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 case $ac_old_set,$ac_new_set in
2631 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633$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 +00002634 ac_cache_corrupted=: ;;
2635 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_cache_corrupted=: ;;
2639 ,);;
2640 *)
2641 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 # differences in whitespace do not lead to failure.
2643 ac_old_val_w=`echo x $ac_old_val`
2644 ac_new_val_w=`echo x $ac_new_val`
2645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648 ac_cache_corrupted=:
2649 else
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652 eval $ac_var=\$ac_old_val
2653 fi
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2655$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2657$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 fi;;
2659 esac
2660 # Pass precious variables to config.status.
2661 if test "$ac_new_set" = set; then
2662 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 *) ac_arg=$ac_var=$ac_new_val ;;
2665 esac
2666 case " $ac_configure_args " in
2667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
2671done
2672if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002679## -------------------- ##
2680## Main body of script. ##
2681## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682
Guido van Rossum7f43da71994-08-01 12:15:30 +00002683ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002692if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693 # If we're building out-of-tree, we need to make sure the following
2694 # resources get picked up before their $srcdir counterparts.
2695 # Objects/ -> typeslots.inc
2696 # Include/ -> Python-ast.h, graminit.h
2697 # Python/ -> importlib.h
2698 # (A side effect of this is that these resources will automatically be
2699 # regenerated when building out-of-tree, regardless of whether or not
2700 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2701 # off.)
2702 BASECPPFLAGS="-IObjects -IInclude -IPython"
2703else
2704 BASECPPFLAGS=""
2705fi
2706
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707
2708
2709
2710
Victor Stinner9ed34a82017-05-02 22:35:58 +02002711if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713# Extract the first word of "git", so it can be a program name with args.
2714set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718 $as_echo_n "(cached) " >&6
2719else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720 if test -n "$HAS_GIT"; then
2721 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722else
2723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724for as_dir in $PATH
2725do
2726 IFS=$as_save_IFS
2727 test -z "$as_dir" && as_dir=.
2728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732 break 2
2733 fi
2734done
2735 done
2736IFS=$as_save_IFS
2737
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739fi
2740fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741HAS_GIT=$ac_cv_prog_HAS_GIT
2742if test -n "$HAS_GIT"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2744$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2747$as_echo "no" >&6; }
2748fi
2749
2750
2751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755then
Ned Deily554626a2017-03-20 23:41:52 -04002756 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2757 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITVERSION=""
2761 GITTAG=""
2762 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
2764
2765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002767
2768
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002769ac_aux_dir=
2770for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2771 if test -f "$ac_dir/install-sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install-sh -c"
2774 break
2775 elif test -f "$ac_dir/install.sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install.sh -c"
2778 break
2779 elif test -f "$ac_dir/shtool"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/shtool install -c"
2782 break
2783 fi
2784done
2785if test -z "$ac_aux_dir"; then
2786 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2787fi
2788
2789# These three variables are undocumented and unsupported,
2790# and are intended to be withdrawn in a future Autoconf release.
2791# They can cause serious problems if a builder's source tree is in a directory
2792# whose full name contains unusual characters.
2793ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2794ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2795ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2796
2797
2798# Make sure we can run config.sub.
2799$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2800 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2801
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2803$as_echo_n "checking build system type... " >&6; }
2804if ${ac_cv_build+:} false; then :
2805 $as_echo_n "(cached) " >&6
2806else
2807 ac_build_alias=$build_alias
2808test "x$ac_build_alias" = x &&
2809 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2810test "x$ac_build_alias" = x &&
2811 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2812ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2813 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2814
2815fi
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2817$as_echo "$ac_cv_build" >&6; }
2818case $ac_cv_build in
2819*-*-*) ;;
2820*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2821esac
2822build=$ac_cv_build
2823ac_save_IFS=$IFS; IFS='-'
2824set x $ac_cv_build
2825shift
2826build_cpu=$1
2827build_vendor=$2
2828shift; shift
2829# Remember, the first character of IFS is used to create $*,
2830# except with old shells:
2831build_os=$*
2832IFS=$ac_save_IFS
2833case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2834
2835
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2837$as_echo_n "checking host system type... " >&6; }
2838if ${ac_cv_host+:} false; then :
2839 $as_echo_n "(cached) " >&6
2840else
2841 if test "x$host_alias" = x; then
2842 ac_cv_host=$ac_cv_build
2843else
2844 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2846fi
2847
2848fi
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2850$as_echo "$ac_cv_host" >&6; }
2851case $ac_cv_host in
2852*-*-*) ;;
2853*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2854esac
2855host=$ac_cv_host
2856ac_save_IFS=$IFS; IFS='-'
2857set x $ac_cv_host
2858shift
2859host_cpu=$1
2860host_vendor=$2
2861shift; shift
2862# Remember, the first character of IFS is used to create $*,
2863# except with old shells:
2864host_os=$*
2865IFS=$ac_save_IFS
2866case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2867
2868
2869
doko@python.orga10e4a92013-01-25 18:45:12 +01002870
2871
Ned Deilyfcbc2462014-08-22 13:32:49 -07002872# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2873rm -f pybuilddir.txt
2874
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002875for ac_prog in python$PACKAGE_VERSION python3 python
2876do
2877 # Extract the first word of "$ac_prog", so it can be a program name with args.
2878set dummy $ac_prog; ac_word=$2
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2880$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002881if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882 $as_echo_n "(cached) " >&6
2883else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884 if test -n "$PYTHON_FOR_REGEN"; then
2885 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886else
2887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888for as_dir in $PATH
2889do
2890 IFS=$as_save_IFS
2891 test -z "$as_dir" && as_dir=.
2892 for ac_exec_ext in '' $ac_executable_extensions; do
2893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2896 break 2
2897 fi
2898done
2899 done
2900IFS=$as_save_IFS
2901
2902fi
2903fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2905if test -n "$PYTHON_FOR_REGEN"; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2907$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2910$as_echo "no" >&6; }
2911fi
2912
2913
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
2919
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002920if test "$cross_compiling" = yes; then
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2922$as_echo_n "checking for python interpreter for cross build... " >&6; }
2923 if test -z "$PYTHON_FOR_BUILD"; then
2924 for interp in python$PACKAGE_VERSION python3 python; do
2925 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002926 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 +02002927 break
2928 fi
2929 interp=
2930 done
2931 if test x$interp = x; then
2932 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2933 fi
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2935$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002936 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 +02002937 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002938elif test "$cross_compiling" = maybe; then
2939 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940else
2941 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2942fi
2943
2944
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Ned Deily4829bc62016-09-12 17:29:04 -04002960VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002987# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991
2992
2993
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002994define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002995
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002996# Arguments passed to configure.
2997
2998CONFIG_ARGS="$ac_configure_args"
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3001$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003003if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 case $enableval in
3006 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003007 # Locate the best usable SDK, see Mac/README.txt for more
3008 # information
3009 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003010 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3013 if test ! -d "${enableval}"
3014 then
3015 enableval=/
3016 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003018 ;;
3019 esac
3020 case $enableval in
3021 no)
3022 UNIVERSALSDK=
3023 enable_universalsdk=
3024 ;;
3025 *)
3026 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 if test ! -d "${UNIVERSALSDK}"
3028 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003029 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003031 ;;
3032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035else
3036
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042if test -n "${UNIVERSALSDK}"
3043then
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3045$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046else
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3048$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deily87adb6e2013-10-18 21:09:56 -07003053ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deilycbfb9a52012-06-23 16:02:19 -07003055# For backward compatibility reasons we prefer to select '32-bit' if available,
3056# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058if test "`uname -s`" = "Darwin"
3059then
3060 if test -n "${UNIVERSALSDK}"
3061 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003062 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 then
3064 UNIVERSAL_ARCHS="intel"
3065 fi
3066 fi
3067fi
3068
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3071$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072
3073# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003074if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 UNIVERSAL_ARCHS="$withval"
3077
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078fi
3079
Ned Deily87adb6e2013-10-18 21:09:56 -07003080if test -n "${UNIVERSALSDK}"
3081then
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3083$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3084else
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
3087fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003089
3090# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092 withval=$with_framework_name;
3093 PYTHONFRAMEWORK=${withval}
3094 PYTHONFRAMEWORKDIR=${withval}.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3096
3097else
3098
3099 PYTHONFRAMEWORK=Python
3100 PYTHONFRAMEWORKDIR=Python.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3102
3103fi
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003108 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003110 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003111 esac
3112 case $enableval in
3113 no)
3114 PYTHONFRAMEWORK=
3115 PYTHONFRAMEWORKDIR=no-framework
3116 PYTHONFRAMEWORKPREFIX=
3117 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118 FRAMEWORKINSTALLFIRST=
3119 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003120 FRAMEWORKALTINSTALLFIRST=
3121 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003122 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 if test "x${prefix}" = "xNONE"; then
3124 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3125 else
3126 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3127 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003129 ;;
3130 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003131 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003134 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003135 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3136 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003137 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003139
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE" ; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
3147 case "${enableval}" in
3148 /System*)
3149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3150 if test "${prefix}" = "NONE" ; then
3151 # See below
3152 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3153 fi
3154 ;;
3155
3156 /Library*)
3157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3158 ;;
3159
3160 */Library/Frameworks)
3161 MDIR="`dirname "${enableval}"`"
3162 MDIR="`dirname "${MDIR}"`"
3163 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3164
3165 if test "${prefix}" = "NONE"; then
3166 # User hasn't specified the
3167 # --prefix option, but wants to install
3168 # the framework in a non-default location,
3169 # ensure that the compatibility links get
3170 # installed relative to that prefix as well
3171 # instead of in /usr/local.
3172 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3173 fi
3174 ;;
3175
3176 *)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 ;;
3179 esac
3180
Jack Jansen127e56e2001-09-11 14:41:54 +00003181 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003183 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3190
3191 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3192
Jack Jansene578a632001-08-15 01:27:14 +00003193 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Guido van Rossum563e7081996-09-10 18:20:48 +00003195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORKPREFIX=
3200 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 FRAMEWORKINSTALLFIRST=
3202 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003203 FRAMEWORKALTINSTALLFIRST=
3204 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003205 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 if test "x${prefix}" = "xNONE" ; then
3207 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3208 else
3209 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3210 fi
Jack Jansene578a632001-08-15 01:27:14 +00003211 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003212
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214fi
3215
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
3217
Michael W. Hudson54241132001-12-07 15:38:26 +00003218
3219
3220
3221
Jack Jansene578a632001-08-15 01:27:14 +00003222
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223
3224
3225
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003226
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Ned Deilyb8f944f2013-11-21 22:42:25 -08003228
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003229
3230cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003231#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232_ACEOF
3233
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003251 *-*-linux-android*)
3252 ac_sys_system=Linux-android
3253 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 *-*-linux*)
3255 ac_sys_system=Linux
3256 ;;
3257 *-*-cygwin*)
3258 ac_sys_system=Cygwin
3259 ;;
3260 *)
3261 # for now, limit cross builds to known configurations
3262 MACHDEP="unknown"
3263 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3264 esac
3265 ac_sys_release=
3266 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003268 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003269 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 fi
3275 ac_md_system=`echo $ac_sys_system |
3276 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3277 ac_md_release=`echo $ac_sys_release |
3278 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3279 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003280
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003282 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003283 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003284 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 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 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Jack Jansen6b08a402004-06-03 12:41:45 +00003433# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3434# it may influence the way we can build extensions, so distutils
3435# needs to check it
3436
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003439EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003442
3443# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3444# for debug/optimization stuff. BASECFLAGS is for flags that are required
3445# just to get things to compile and link. Users are free to override OPT
3446# when running configure or make. The build should not break if they do.
3447# BASECFLAGS should generally not be messed with, however.
3448
3449# XXX shouldn't some/most/all of this code be merged with the stuff later
3450# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3452$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003455if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003457 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003458 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459 without_gcc=yes;;
3460 yes) CC=gcc
3461 without_gcc=no;;
3462 *) CC=$withval
3463 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003464 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003467 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003468 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003469 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003470 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003471 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472fi
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3475$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003476
Zachary Ware5af85642015-12-21 12:09:17 -06003477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3478$as_echo_n "checking for --with-icc... " >&6; }
3479
3480# Check whether --with-icc was given.
3481if test "${with_icc+set}" = set; then :
3482 withval=$with_icc;
3483 case $withval in
3484 no) CC=${CC:-cc}
3485 with_icc=no;;
3486 yes) CC=icc
3487 CXX=icpc
3488 with_icc=yes;;
3489 *) CC=$withval
3490 with_icc=$withval;;
3491 esac
3492else
3493
3494 with_icc=no
3495fi
3496
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3498$as_echo "$with_icc" >&6; }
3499
Guido van Rossum8b131c51995-03-09 14:10:13 +00003500# If the user switches compilers, we can't believe the cache
3501if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3502then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003503 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003504(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003505fi
3506
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003507# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3508# when the compiler supports them, but we don't always want -O2, and
3509# we set -g later.
3510if test -z "$CFLAGS"; then
3511 CFLAGS=
3512fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513
3514if test "$ac_sys_system" = "Darwin"
3515then
3516 # Compiler selection on MacOSX is more complicated than
3517 # AC_PROG_CC can handle, see Mac/README.txt for more
3518 # information
3519 if test -z "${CC}"
3520 then
3521 found_gcc=
3522 found_clang=
3523 as_save_IFS=$IFS; IFS=:
3524 for as_dir in $PATH
3525 do
3526 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003527 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003529 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 fi
3531 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003532 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003533 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003534 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535 fi
3536 fi
3537 done
3538 IFS=$as_save_IFS
3539
3540 if test -n "$found_gcc" -a -n "$found_clang"
3541 then
3542 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3543 then
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3545$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3546 CC="$found_clang"
3547 CXX="$found_clang++"
3548 fi
3549
3550
3551 elif test -z "$found_gcc" -a -n "$found_clang"
3552 then
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3554$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3555 CC="$found_clang"
3556 CXX="$found_clang++"
3557
3558 elif test -z "$found_gcc" -a -z "$found_clang"
3559 then
3560 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3561 if test -n "${found_clang}"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3564$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3565 CC="${found_clang}"
3566 CXX="`/usr/bin/xcrun -find clang++`"
3567
3568 # else: use default behaviour
3569 fi
3570 fi
3571 fi
3572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003573ac_ext=c
3574ac_cpp='$CPP $CPPFLAGS'
3575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578if test -n "$ac_tool_prefix"; then
3579 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3580set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003583if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003585else
3586 if test -n "$CC"; then
3587 ac_cv_prog_CC="$CC" # Let the user override the test.
3588else
Martin v. Löwis11437992002-04-12 09:54:03 +00003589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 break 2
3599 fi
3600done
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
Jack Jansendd19cf82001-12-06 22:36:17 +00003604fi
3605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003606CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003607if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3609$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003610else
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616fi
3617if test -z "$ac_cv_prog_CC"; then
3618 ac_ct_CC=$CC
3619 # Extract the first word of "gcc", so it can be a program name with args.
3620set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003623if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003625else
3626 if test -n "$ac_ct_CC"; then
3627 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3628else
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 break 2
3639 fi
3640done
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
3644fi
3645fi
3646ac_ct_CC=$ac_cv_prog_ac_ct_CC
3647if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3649$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 if test "x$ac_ct_CC" = x; then
3656 CC=""
3657 else
3658 case $cross_compiling:$ac_tool_warned in
3659yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662ac_tool_warned=yes ;;
3663esac
3664 CC=$ac_ct_CC
3665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
3667 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003668fi
3669
Jack Jansendd19cf82001-12-06 22:36:17 +00003670if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 if test -n "$ac_tool_prefix"; then
3672 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003673set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003676if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH
3684do
3685 IFS=$as_save_IFS
3686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
3697fi
3698fi
3699CC=$ac_cv_prog_CC
3700if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3702$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3705$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711if test -z "$CC"; then
3712 # Extract the first word of "cc", so it can be a program name with args.
3713set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003716if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003722 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726 IFS=$as_save_IFS
3727 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3731 ac_prog_rejected=yes
3732 continue
3733 fi
3734 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 break 2
3737 fi
3738done
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003741
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742if test $ac_prog_rejected = yes; then
3743 # We found a bogon in the path, so make sure we never use it.
3744 set dummy $ac_cv_prog_CC
3745 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747 # We chose a different compiler from the bogus one.
3748 # However, it has the same basename, so the bogon will be chosen
3749 # first if we set CC to just the basename; use the full file name.
3750 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003751 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 fi
3753fi
3754fi
3755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
3767if test -z "$CC"; then
3768 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 do
3771 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003775if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003777else
3778 if test -n "$CC"; then
3779 ac_cv_prog_CC="$CC" # Let the user override the test.
3780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792done
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003795
3796fi
3797fi
3798CC=$ac_cv_prog_CC
3799if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3801$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805fi
3806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$CC" && break
3809 done
3810fi
3811if test -z "$CC"; then
3812 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814do
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003819if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
3822 if test -n "$ac_ct_CC"; then
3823 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3824else
3825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 break 2
3835 fi
3836done
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
3841fi
3842ac_ct_CC=$ac_cv_prog_ac_ct_CC
3843if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3845$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$ac_ct_CC" && break
3853done
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855 if test "x$ac_ct_CC" = x; then
3856 CC=""
3857 else
3858 case $cross_compiling:$ac_tool_warned in
3859yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862ac_tool_warned=yes ;;
3863esac
3864 CC=$ac_ct_CC
3865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
3867
3868fi
3869
3870
Matthias Kloseb9621712010-04-24 17:59:49 +00003871test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003873as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003874See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003875
3876# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003877$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3878set X $ac_compile
3879ac_compiler=$2
3880for ac_option in --version -v -V -qversion; do
3881 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882case "(($ac_try" in
3883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884 *) ac_try_echo=$ac_try;;
3885esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3887$as_echo "$ac_try_echo"; } >&5
3888 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 if test -s conftest.err; then
3891 sed '10a\
3892... rest of stderr output deleted ...
3893 10q' conftest.err >conftest.er1
3894 cat conftest.er1 >&5
3895 fi
3896 rm -f conftest.er1 conftest.err
3897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3898 test $ac_status = 0; }
3899done
Martin v. Löwis11437992002-04-12 09:54:03 +00003900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003902/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904int
3905main ()
3906{
3907
3908 ;
3909 return 0;
3910}
3911_ACEOF
3912ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003913ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003914# Try to create an executable without -o first, disregard a.out.
3915# It will help us diagnose broken compilers, and finding out an intuition
3916# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3918$as_echo_n "checking whether the C compiler works... " >&6; }
3919ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3920
3921# The possible output files:
3922ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924ac_rmfiles=
3925for ac_file in $ac_files
3926do
3927 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3930 esac
3931done
3932rm -f $ac_rmfiles
3933
Matthias Kloseb9621712010-04-24 17:59:49 +00003934if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935case "(($ac_try" in
3936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937 *) ac_try_echo=$ac_try;;
3938esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3946# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3947# in a Makefile. We should not override ac_cv_exeext if it was cached,
3948# so that the user can short-circuit this test for compilers unknown to
3949# Autoconf.
3950for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003951do
3952 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003955 ;;
3956 [ab].out )
3957 # We found the default executable, but exeext='' is most
3958 # certainly right.
3959 break;;
3960 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 then :; else
3963 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964 fi
3965 # We set ac_cv_exeext here because the later test for it is not
3966 # safe: cross compilers may not add the suffix if given an `-o'
3967 # argument, so we may need to know it at that point already.
3968 # Even if this section looks crufty: it has the advantage of
3969 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 break;;
3971 * )
3972 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 esac
3974done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975test "$ac_cv_exeext" = no && ac_cv_exeext=
3976
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003977else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 ac_file=''
3979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if test -z "$ac_file"; then :
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982$as_echo "no" >&6; }
3983$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003984sed 's/^/| /' conftest.$ac_ext >&5
3985
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003988as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003989See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003990else
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3992$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3995$as_echo_n "checking for C compiler default output file name... " >&6; }
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3997$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999
Matthias Kloseb9621712010-04-24 17:59:49 +00004000rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4003$as_echo_n "checking for suffix of executables... " >&6; }
4004if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005case "(($ac_try" in
4006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007 *) ac_try_echo=$ac_try;;
4008esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4016# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4017# work properly (i.e., refer to `conftest.exe'), while it won't with
4018# `rm'.
4019for ac_file in conftest.exe conftest conftest.*; do
4020 test -f "$ac_file" || continue
4021 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4024 break;;
4025 * ) break;;
4026 esac
4027done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004031as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004032See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004034rm -f conftest conftest$ac_cv_exeext
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4036$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037
4038rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004039EXEEXT=$ac_cv_exeext
4040ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042/* end confdefs.h. */
4043#include <stdio.h>
4044int
4045main ()
4046{
4047FILE *f = fopen ("conftest.out", "w");
4048 return ferror (f) || fclose (f) != 0;
4049
4050 ;
4051 return 0;
4052}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004054ac_clean_files="$ac_clean_files conftest.out"
4055# Check that the compiler produces executables we can run. If not, either
4056# the compiler is broken, or we cross compile.
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4058$as_echo_n "checking whether we are cross compiling... " >&6; }
4059if test "$cross_compiling" != yes; then
4060 { { ac_try="$ac_link"
4061case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_link") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }
4071 if { ac_try='./conftest$ac_cv_exeext'
4072 { { case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_try") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }; }; then
4082 cross_compiling=no
4083 else
4084 if test "$cross_compiling" = maybe; then
4085 cross_compiling=yes
4086 else
4087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004089as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004090If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004091See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 fi
4093 fi
4094fi
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4096$as_echo "$cross_compiling" >&6; }
4097
4098rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4099ac_clean_files=$ac_clean_files_save
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4101$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
4104else
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106/* end confdefs.h. */
4107
4108int
4109main ()
4110{
4111
4112 ;
4113 return 0;
4114}
4115_ACEOF
4116rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004117if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 for ac_file in conftest.o conftest.obj conftest.*; do
4129 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4133 break;;
4134 esac
4135done
4136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004138sed 's/^/| /' conftest.$ac_ext >&5
4139
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004142as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004143See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4148$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149OBJEXT=$ac_cv_objext
4150ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4152$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004153if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159int
4160main ()
4161{
4162#ifndef __GNUC__
4163 choke me
4164#endif
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_compiler_gnu=yes
4172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176ac_cv_c_compiler_gnu=$ac_compiler_gnu
4177
4178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4180$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4181if test $ac_compiler_gnu = yes; then
4182 GCC=yes
4183else
4184 GCC=
4185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_test_CFLAGS=${CFLAGS+set}
4187ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4189$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004190if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193 ac_save_c_werror_flag=$ac_c_werror_flag
4194 ac_c_werror_flag=yes
4195 ac_cv_prog_cc_g=no
4196 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199
Martin v. Löwis11437992002-04-12 09:54:03 +00004200int
4201main ()
4202{
4203
4204 ;
4205 return 0;
4206}
4207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004209 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 CFLAGS=""
4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213/* end confdefs.h. */
4214
4215int
4216main ()
4217{
4218
4219 ;
4220 return 0;
4221}
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224
Matthias Kloseb9621712010-04-24 17:59:49 +00004225else
4226 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 ac_c_werror_flag=$ac_save_c_werror_flag
4248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4250$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253elif test $ac_cv_prog_cc_g = yes; then
4254 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 CFLAGS="-g -O2"
4256 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258 fi
4259else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260 if test "$GCC" = yes; then
4261 CFLAGS="-O2"
4262 else
4263 CFLAGS=
4264 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4267$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004268if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004270else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004272ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* end confdefs.h. */
4275#include <stdarg.h>
4276#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004277struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4279struct buf { int x; };
4280FILE * (*rcsopen) (struct buf *, struct stat *, int);
4281static char *e (p, i)
4282 char **p;
4283 int i;
4284{
4285 return p[i];
4286}
4287static char *f (char * (*g) (char **, int), char **p, ...)
4288{
4289 char *s;
4290 va_list v;
4291 va_start (v,p);
4292 s = g (p, va_arg (v,int));
4293 va_end (v);
4294 return s;
4295}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296
4297/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4298 function prototypes and stuff, but not '\xHH' hex character constants.
4299 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4302 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4307 inside strings and character constants. */
4308#define FOO(x) 'x'
4309int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4310
Skip Montanaro6dead952003-09-25 14:50:04 +00004311int test (int i, double x);
4312struct s1 {int (*f) (int a);};
4313struct s2 {int (*f) (double a);};
4314int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4315int argc;
4316char **argv;
4317int
4318main ()
4319{
4320return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4321 ;
4322 return 0;
4323}
4324_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4326 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004327do
4328 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f core conftest.err conftest.$ac_objext
4333 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004334done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004336CC=$ac_save_CC
4337
4338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339# AC_CACHE_VAL
4340case "x$ac_cv_prog_cc_c89" in
4341 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4343$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4346$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4350$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004352if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004355
Martin v. Löwis11437992002-04-12 09:54:03 +00004356ac_ext=c
4357ac_cpp='$CPP $CPPFLAGS'
4358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4360ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004362ac_ext=c
4363ac_cpp='$CPP $CPPFLAGS'
4364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4366ac_compiler_gnu=$ac_cv_c_compiler_gnu
4367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4368$as_echo_n "checking how to run the C preprocessor... " >&6; }
4369# On Suns, sometimes $CPP names a directory.
4370if test -n "$CPP" && test -d "$CPP"; then
4371 CPP=
4372fi
4373if test -z "$CPP"; then
4374 if ${ac_cv_prog_CPP+:} false; then :
4375 $as_echo_n "(cached) " >&6
4376else
4377 # Double quotes because CPP needs to be expanded
4378 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4379 do
4380 ac_preproc_ok=false
4381for ac_c_preproc_warn_flag in '' yes
4382do
4383 # Use a header file that comes with gcc, so configuring glibc
4384 # with a fresh cross-compiler works.
4385 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4386 # <limits.h> exists even on freestanding compilers.
4387 # On the NeXT, cc -E runs the code through the compiler's parser,
4388 # not just through cpp. "Syntax error" is here to catch this case.
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390/* end confdefs.h. */
4391#ifdef __STDC__
4392# include <limits.h>
4393#else
4394# include <assert.h>
4395#endif
4396 Syntax error
4397_ACEOF
4398if ac_fn_c_try_cpp "$LINENO"; then :
4399
4400else
4401 # Broken: fails on valid input.
4402continue
4403fi
4404rm -f conftest.err conftest.i conftest.$ac_ext
4405
4406 # OK, works on sane cases. Now check whether nonexistent headers
4407 # can be detected and how.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#include <ac_nonexistent.h>
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413 # Broken: success on invalid input.
4414continue
4415else
4416 # Passes both tests.
4417ac_preproc_ok=:
4418break
4419fi
4420rm -f conftest.err conftest.i conftest.$ac_ext
4421
4422done
4423# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4424rm -f conftest.i conftest.err conftest.$ac_ext
4425if $ac_preproc_ok; then :
4426 break
4427fi
4428
4429 done
4430 ac_cv_prog_CPP=$CPP
4431
4432fi
4433 CPP=$ac_cv_prog_CPP
4434else
4435 ac_cv_prog_CPP=$CPP
4436fi
4437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4438$as_echo "$CPP" >&6; }
4439ac_preproc_ok=false
4440for ac_c_preproc_warn_flag in '' yes
4441do
4442 # Use a header file that comes with gcc, so configuring glibc
4443 # with a fresh cross-compiler works.
4444 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4445 # <limits.h> exists even on freestanding compilers.
4446 # On the NeXT, cc -E runs the code through the compiler's parser,
4447 # not just through cpp. "Syntax error" is here to catch this case.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#ifdef __STDC__
4451# include <limits.h>
4452#else
4453# include <assert.h>
4454#endif
4455 Syntax error
4456_ACEOF
4457if ac_fn_c_try_cpp "$LINENO"; then :
4458
4459else
4460 # Broken: fails on valid input.
4461continue
4462fi
4463rm -f conftest.err conftest.i conftest.$ac_ext
4464
4465 # OK, works on sane cases. Now check whether nonexistent headers
4466 # can be detected and how.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#include <ac_nonexistent.h>
4470_ACEOF
4471if ac_fn_c_try_cpp "$LINENO"; then :
4472 # Broken: success on invalid input.
4473continue
4474else
4475 # Passes both tests.
4476ac_preproc_ok=:
4477break
4478fi
4479rm -f conftest.err conftest.i conftest.$ac_ext
4480
4481done
4482# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4483rm -f conftest.i conftest.err conftest.$ac_ext
4484if $ac_preproc_ok; then :
4485
4486else
4487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4489as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4490See \`config.log' for more details" "$LINENO" 5; }
4491fi
4492
4493ac_ext=c
4494ac_cpp='$CPP $CPPFLAGS'
4495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4497ac_compiler_gnu=$ac_cv_c_compiler_gnu
4498
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4500$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4501if ${ac_cv_path_GREP+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 if test -z "$GREP"; then
4505 ac_path_GREP_found=false
4506 # Loop through the user's path and test for each of PROGNAME-LIST
4507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4509do
4510 IFS=$as_save_IFS
4511 test -z "$as_dir" && as_dir=.
4512 for ac_prog in grep ggrep; do
4513 for ac_exec_ext in '' $ac_executable_extensions; do
4514 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4515 as_fn_executable_p "$ac_path_GREP" || continue
4516# Check for GNU ac_path_GREP and select it if it is found.
4517 # Check for GNU $ac_path_GREP
4518case `"$ac_path_GREP" --version 2>&1` in
4519*GNU*)
4520 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4521*)
4522 ac_count=0
4523 $as_echo_n 0123456789 >"conftest.in"
4524 while :
4525 do
4526 cat "conftest.in" "conftest.in" >"conftest.tmp"
4527 mv "conftest.tmp" "conftest.in"
4528 cp "conftest.in" "conftest.nl"
4529 $as_echo 'GREP' >> "conftest.nl"
4530 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4531 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4532 as_fn_arith $ac_count + 1 && ac_count=$as_val
4533 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4534 # Best one so far, save it but keep looking for a better one
4535 ac_cv_path_GREP="$ac_path_GREP"
4536 ac_path_GREP_max=$ac_count
4537 fi
4538 # 10*(2^10) chars as input seems more than enough
4539 test $ac_count -gt 10 && break
4540 done
4541 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4542esac
4543
4544 $ac_path_GREP_found && break 3
4545 done
4546 done
4547 done
4548IFS=$as_save_IFS
4549 if test -z "$ac_cv_path_GREP"; then
4550 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4551 fi
4552else
4553 ac_cv_path_GREP=$GREP
4554fi
4555
4556fi
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4558$as_echo "$ac_cv_path_GREP" >&6; }
4559 GREP="$ac_cv_path_GREP"
4560
4561
Łukasz Langaa785c872016-09-09 17:37:37 -07004562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4563$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4564if ${ac_cv_path_SED+:} false; then :
4565 $as_echo_n "(cached) " >&6
4566else
4567 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4568 for ac_i in 1 2 3 4 5 6 7; do
4569 ac_script="$ac_script$as_nl$ac_script"
4570 done
4571 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4572 { ac_script=; unset ac_script;}
4573 if test -z "$SED"; then
4574 ac_path_SED_found=false
4575 # Loop through the user's path and test for each of PROGNAME-LIST
4576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579 IFS=$as_save_IFS
4580 test -z "$as_dir" && as_dir=.
4581 for ac_prog in sed gsed; do
4582 for ac_exec_ext in '' $ac_executable_extensions; do
4583 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4584 as_fn_executable_p "$ac_path_SED" || continue
4585# Check for GNU ac_path_SED and select it if it is found.
4586 # Check for GNU $ac_path_SED
4587case `"$ac_path_SED" --version 2>&1` in
4588*GNU*)
4589 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4590*)
4591 ac_count=0
4592 $as_echo_n 0123456789 >"conftest.in"
4593 while :
4594 do
4595 cat "conftest.in" "conftest.in" >"conftest.tmp"
4596 mv "conftest.tmp" "conftest.in"
4597 cp "conftest.in" "conftest.nl"
4598 $as_echo '' >> "conftest.nl"
4599 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4600 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4601 as_fn_arith $ac_count + 1 && ac_count=$as_val
4602 if test $ac_count -gt ${ac_path_SED_max-0}; then
4603 # Best one so far, save it but keep looking for a better one
4604 ac_cv_path_SED="$ac_path_SED"
4605 ac_path_SED_max=$ac_count
4606 fi
4607 # 10*(2^10) chars as input seems more than enough
4608 test $ac_count -gt 10 && break
4609 done
4610 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4611esac
4612
4613 $ac_path_SED_found && break 3
4614 done
4615 done
4616 done
4617IFS=$as_save_IFS
4618 if test -z "$ac_cv_path_SED"; then
4619 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4620 fi
4621else
4622 ac_cv_path_SED=$SED
4623fi
4624
4625fi
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4627$as_echo "$ac_cv_path_SED" >&6; }
4628 SED="$ac_cv_path_SED"
4629 rm -f conftest.sed
4630
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004631
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004632
4633
Matthias Kloseb9621712010-04-24 17:59:49 +00004634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4635$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004637# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004638if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
4641 case $withval in
4642 no) with_cxx_main=no
4643 MAINCC='$(CC)';;
4644 yes) with_cxx_main=yes
4645 MAINCC='$(CXX)';;
4646 *) with_cxx_main=yes
4647 MAINCC=$withval
4648 if test -z "$CXX"
4649 then
4650 CXX=$withval
4651 fi;;
4652 esac
4653else
4654
4655 with_cxx_main=no
4656 MAINCC='$(CC)'
4657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658fi
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4661$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663preset_cxx="$CXX"
4664if test -z "$CXX"
4665then
4666 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004667 gcc) if test -n "$ac_tool_prefix"; then
4668 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4669set dummy ${ac_tool_prefix}g++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698CXX=$ac_cv_path_CXX
4699if test -n "$CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4701$as_echo "$CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708fi
4709if test -z "$ac_cv_path_CXX"; then
4710 ac_pt_CXX=$CXX
4711 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004712set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4714$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715if ${ac_cv_path_ac_pt_CXX+:} false; then :
4716 $as_echo_n "(cached) " >&6
4717else
4718 case $ac_pt_CXX in
4719 [\\/]* | ?:[\\/]*)
4720 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4721 ;;
4722 *)
4723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724for as_dir in notfound
4725do
4726 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2
4733 fi
4734done
4735 done
4736IFS=$as_save_IFS
4737
4738 ;;
4739esac
4740fi
4741ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4742if test -n "$ac_pt_CXX"; then
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4744$as_echo "$ac_pt_CXX" >&6; }
4745else
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747$as_echo "no" >&6; }
4748fi
4749
4750 if test "x$ac_pt_CXX" = x; then
4751 CXX="g++"
4752 else
4753 case $cross_compiling:$ac_tool_warned in
4754yes:)
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4757ac_tool_warned=yes ;;
4758esac
4759 CXX=$ac_pt_CXX
4760 fi
4761else
4762 CXX="$ac_cv_path_CXX"
4763fi
4764 ;;
4765 cc) if test -n "$ac_tool_prefix"; then
4766 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4767set dummy ${ac_tool_prefix}c++; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004770if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772else
4773 case $CXX in
4774 [\\/]* | ?:[\\/]*)
4775 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4776 ;;
4777 *)
4778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in notfound
4780do
4781 IFS=$as_save_IFS
4782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787 break 2
4788 fi
4789done
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004791IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 ;;
4794esac
4795fi
4796CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004797if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4799$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004800else
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004804
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805
4806fi
4807if test -z "$ac_cv_path_CXX"; then
4808 ac_pt_CXX=$CXX
4809 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 ;;
4820 *)
4821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in notfound
4823do
4824 IFS=$as_save_IFS
4825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 break 2
4831 fi
4832done
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 ;;
4837esac
4838fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4840if test -n "$ac_pt_CXX"; then
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4842$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004847
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 if test "x$ac_pt_CXX" = x; then
4849 CXX="c++"
4850 else
4851 case $cross_compiling:$ac_tool_warned in
4852yes:)
4853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4855ac_tool_warned=yes ;;
4856esac
4857 CXX=$ac_pt_CXX
4858 fi
4859else
4860 CXX="$ac_cv_path_CXX"
4861fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863 clang|*/clang) if test -n "$ac_tool_prefix"; then
4864 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4865set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4867$as_echo_n "checking for $ac_word... " >&6; }
4868if ${ac_cv_path_CXX+:} false; then :
4869 $as_echo_n "(cached) " >&6
4870else
4871 case $CXX in
4872 [\\/]* | ?:[\\/]*)
4873 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4874 ;;
4875 *)
4876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in notfound
4878do
4879 IFS=$as_save_IFS
4880 test -z "$as_dir" && as_dir=.
4881 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004883 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885 break 2
4886 fi
4887done
4888 done
4889IFS=$as_save_IFS
4890
Ned Deilycbfb9a52012-06-23 16:02:19 -07004891 ;;
4892esac
4893fi
4894CXX=$ac_cv_path_CXX
4895if test -n "$CXX"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4897$as_echo "$CXX" >&6; }
4898else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903
4904fi
4905if test -z "$ac_cv_path_CXX"; then
4906 ac_pt_CXX=$CXX
4907 # Extract the first word of "clang++", so it can be a program name with args.
4908set dummy clang++; ac_word=$2
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if ${ac_cv_path_ac_pt_CXX+:} false; then :
4912 $as_echo_n "(cached) " >&6
4913else
4914 case $ac_pt_CXX in
4915 [\\/]* | ?:[\\/]*)
4916 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4917 ;;
4918 *)
4919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in notfound
4921do
4922 IFS=$as_save_IFS
4923 test -z "$as_dir" && as_dir=.
4924 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928 break 2
4929 fi
4930done
4931 done
4932IFS=$as_save_IFS
4933
4934 ;;
4935esac
4936fi
4937ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4938if test -n "$ac_pt_CXX"; then
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4940$as_echo "$ac_pt_CXX" >&6; }
4941else
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946 if test "x$ac_pt_CXX" = x; then
4947 CXX="clang++"
4948 else
4949 case $cross_compiling:$ac_tool_warned in
4950yes:)
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4953ac_tool_warned=yes ;;
4954esac
4955 CXX=$ac_pt_CXX
4956 fi
4957else
4958 CXX="$ac_cv_path_CXX"
4959fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004960 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004961 icc|*/icc) if test -n "$ac_tool_prefix"; then
4962 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4963set dummy ${ac_tool_prefix}icpc; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if ${ac_cv_path_CXX+:} false; then :
4967 $as_echo_n "(cached) " >&6
4968else
4969 case $CXX in
4970 [\\/]* | ?:[\\/]*)
4971 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4972 ;;
4973 *)
4974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975for as_dir in notfound
4976do
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
4980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983 break 2
4984 fi
4985done
4986 done
4987IFS=$as_save_IFS
4988
4989 ;;
4990esac
4991fi
4992CXX=$ac_cv_path_CXX
4993if test -n "$CXX"; then
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4995$as_echo "$CXX" >&6; }
4996else
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999fi
5000
5001
5002fi
5003if test -z "$ac_cv_path_CXX"; then
5004 ac_pt_CXX=$CXX
5005 # Extract the first word of "icpc", so it can be a program name with args.
5006set dummy icpc; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if ${ac_cv_path_ac_pt_CXX+:} false; then :
5010 $as_echo_n "(cached) " >&6
5011else
5012 case $ac_pt_CXX in
5013 [\\/]* | ?:[\\/]*)
5014 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5015 ;;
5016 *)
5017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in notfound
5019do
5020 IFS=$as_save_IFS
5021 test -z "$as_dir" && as_dir=.
5022 for ac_exec_ext in '' $ac_executable_extensions; do
5023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026 break 2
5027 fi
5028done
5029 done
5030IFS=$as_save_IFS
5031
5032 ;;
5033esac
5034fi
5035ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5036if test -n "$ac_pt_CXX"; then
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5038$as_echo "$ac_pt_CXX" >&6; }
5039else
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044 if test "x$ac_pt_CXX" = x; then
5045 CXX="icpc"
5046 else
5047 case $cross_compiling:$ac_tool_warned in
5048yes:)
5049{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5050$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5051ac_tool_warned=yes ;;
5052esac
5053 CXX=$ac_pt_CXX
5054 fi
5055else
5056 CXX="$ac_cv_path_CXX"
5057fi
5058 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059 esac
5060 if test "$CXX" = "notfound"
5061 then
5062 CXX=""
5063 fi
5064fi
5065if test -z "$CXX"
5066then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 if test -n "$ac_tool_prefix"; then
5068 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5069 do
5070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005074if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076else
5077 if test -n "$CXX"; then
5078 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 break 2
5090 fi
5091done
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094
5095fi
5096fi
5097CXX=$ac_cv_prog_CXX
5098if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5100$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101else
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104fi
5105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005107 test -n "$CXX" && break
5108 done
5109fi
5110if test -z "$CXX"; then
5111 ac_ct_CXX=$CXX
5112 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5113do
5114 # Extract the first word of "$ac_prog", so it can be a program name with args.
5115set dummy $ac_prog; ac_word=$2
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
5118if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5119 $as_echo_n "(cached) " >&6
5120else
5121 if test -n "$ac_ct_CXX"; then
5122 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5123else
5124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127 IFS=$as_save_IFS
5128 test -z "$as_dir" && as_dir=.
5129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005131 ac_cv_prog_ac_ct_CXX="$ac_prog"
5132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5133 break 2
5134 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005136 done
5137IFS=$as_save_IFS
5138
5139fi
5140fi
5141ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5142if test -n "$ac_ct_CXX"; then
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5144$as_echo "$ac_ct_CXX" >&6; }
5145else
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
5148fi
5149
5150
5151 test -n "$ac_ct_CXX" && break
5152done
5153
5154 if test "x$ac_ct_CXX" = x; then
5155 CXX="notfound"
5156 else
5157 case $cross_compiling:$ac_tool_warned in
5158yes:)
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5161ac_tool_warned=yes ;;
5162esac
5163 CXX=$ac_ct_CXX
5164 fi
5165fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166
5167 if test "$CXX" = "notfound"
5168 then
5169 CXX=""
5170 fi
5171fi
5172if test "$preset_cxx" != "$CXX"
5173then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005174 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 By default, distutils will build C++ extension modules with \"$CXX\".
5177 If this is not intended, then set CXX on the configure command line.
5178 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 By default, distutils will build C++ extension modules with \"$CXX\".
5182 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005183 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005184fi
5185
5186
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005187MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5188
5189
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5191$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5192cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005193#undef bfin
5194#undef cris
5195#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef hppa
5198#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005201#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005204#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005205 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005206#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207# if defined(__x86_64__) && defined(__LP64__)
5208 x86_64-linux-gnu
5209# elif defined(__x86_64__) && defined(__ILP32__)
5210 x86_64-linux-gnux32
5211# elif defined(__i386__)
5212 i386-linux-gnu
5213# elif defined(__aarch64__) && defined(__AARCH64EL__)
5214# if defined(__ILP32__)
5215 aarch64_ilp32-linux-gnu
5216# else
5217 aarch64-linux-gnu
5218# endif
5219# elif defined(__aarch64__) && defined(__AARCH64EB__)
5220# if defined(__ILP32__)
5221 aarch64_be_ilp32-linux-gnu
5222# else
5223 aarch64_be-linux-gnu
5224# endif
5225# elif defined(__alpha__)
5226 alpha-linux-gnu
5227# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5228# if defined(__ARMEL__)
5229 arm-linux-gnueabihf
5230# else
5231 armeb-linux-gnueabihf
5232# endif
5233# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5234# if defined(__ARMEL__)
5235 arm-linux-gnueabi
5236# else
5237 armeb-linux-gnueabi
5238# endif
5239# elif defined(__hppa__)
5240 hppa-linux-gnu
5241# elif defined(__ia64__)
5242 ia64-linux-gnu
5243# elif defined(__m68k__) && !defined(__mcoldfire__)
5244 m68k-linux-gnu
5245# elif defined(__mips_hard_float) && defined(_MIPSEL)
5246# if _MIPS_SIM == _ABIO32
5247 mipsel-linux-gnu
5248# elif _MIPS_SIM == _ABIN32
5249 mips64el-linux-gnuabin32
5250# elif _MIPS_SIM == _ABI64
5251 mips64el-linux-gnuabi64
5252# else
5253# error unknown platform triplet
5254# endif
5255# elif defined(__mips_hard_float)
5256# if _MIPS_SIM == _ABIO32
5257 mips-linux-gnu
5258# elif _MIPS_SIM == _ABIN32
5259 mips64-linux-gnuabin32
5260# elif _MIPS_SIM == _ABI64
5261 mips64-linux-gnuabi64
5262# else
5263# error unknown platform triplet
5264# endif
5265# elif defined(__or1k__)
5266 or1k-linux-gnu
5267# elif defined(__powerpc__) && defined(__SPE__)
5268 powerpc-linux-gnuspe
5269# elif defined(__powerpc64__)
5270# if defined(__LITTLE_ENDIAN__)
5271 powerpc64le-linux-gnu
5272# else
5273 powerpc64-linux-gnu
5274# endif
5275# elif defined(__powerpc__)
5276 powerpc-linux-gnu
5277# elif defined(__s390x__)
5278 s390x-linux-gnu
5279# elif defined(__s390__)
5280 s390-linux-gnu
5281# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5282 sh4-linux-gnu
5283# elif defined(__sparc__) && defined(__arch64__)
5284 sparc64-linux-gnu
5285# elif defined(__sparc__)
5286 sparc-linux-gnu
5287# else
5288# error unknown platform triplet
5289# endif
5290#elif defined(__FreeBSD_kernel__)
5291# if defined(__LP64__)
5292 x86_64-kfreebsd-gnu
5293# elif defined(__i386__)
5294 i386-kfreebsd-gnu
5295# else
5296# error unknown platform triplet
5297# endif
5298#elif defined(__gnu_hurd__)
5299 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005300#elif defined(__APPLE__)
5301 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302#else
5303# error unknown platform triplet
5304#endif
5305
5306EOF
5307
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005308if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005309 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5311$as_echo "$PLATFORM_TRIPLET" >&6; }
5312else
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5314$as_echo "none" >&6; }
5315fi
5316rm -f conftest.c conftest.out
5317
5318if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5319 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5320 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5321 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005322elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5323 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005324fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325
doko@ubuntu.com55532312016-06-14 08:55:19 +02005326if test x$MULTIARCH != x; then
5327 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5328fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329
5330
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5332$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5333save_LDFLAGS="$LDFLAGS"
5334LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005335
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5337/* end confdefs.h. */
5338
5339int
5340main ()
5341{
5342
5343 ;
5344 return 0;
5345}
5346_ACEOF
5347if ac_fn_c_try_link "$LINENO"; then :
5348 NO_AS_NEEDED="-Wl,--no-as-needed"
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5350$as_echo "yes" >&6; }
5351else
5352 NO_AS_NEEDED=""
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356rm -f core conftest.err conftest.$ac_objext \
5357 conftest$ac_exeext conftest.$ac_ext
5358LDFLAGS="$save_LDFLAGS"
5359
5360
5361
5362# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5365$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005366if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368else
5369 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5370 then ac_cv_path_EGREP="$GREP -E"
5371 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 # Loop through the user's path and test for each of PROGNAME-LIST
5375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5377do
5378 IFS=$as_save_IFS
5379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 for ac_prog in egrep; do
5381 for ac_exec_ext in '' $ac_executable_extensions; do
5382 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005383 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005384# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 # Check for GNU $ac_path_EGREP
5386case `"$ac_path_EGREP" --version 2>&1` in
5387*GNU*)
5388 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5389*)
5390 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 while :
5393 do
5394 cat "conftest.in" "conftest.in" >"conftest.tmp"
5395 mv "conftest.tmp" "conftest.in"
5396 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5399 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5402 # Best one so far, save it but keep looking for a better one
5403 ac_cv_path_EGREP="$ac_path_EGREP"
5404 ac_path_EGREP_max=$ac_count
5405 fi
5406 # 10*(2^10) chars as input seems more than enough
5407 test $ac_count -gt 10 && break
5408 done
5409 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5410esac
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $ac_path_EGREP_found && break 3
5413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005418 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 +00005419 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420else
5421 ac_cv_path_EGREP=$EGREP
5422fi
5423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 fi
5425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5427$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005429
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5432$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005433if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo_n "(cached) " >&6
5435else
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005437/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005438#include <stdlib.h>
5439#include <stdarg.h>
5440#include <string.h>
5441#include <float.h>
5442
5443int
5444main ()
5445{
5446
5447 ;
5448 return 0;
5449}
5450_ACEOF
5451if ac_fn_c_try_compile "$LINENO"; then :
5452 ac_cv_header_stdc=yes
5453else
5454 ac_cv_header_stdc=no
5455fi
5456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5457
5458if test $ac_cv_header_stdc = yes; then
5459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461/* end confdefs.h. */
5462#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005463
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005464_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468else
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005470fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005471rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
Matthias Kloseb9621712010-04-24 17:59:49 +00005473fi
5474
5475if test $ac_cv_header_stdc = yes; then
5476 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h. */
5479#include <stdlib.h>
5480
5481_ACEOF
5482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5483 $EGREP "free" >/dev/null 2>&1; then :
5484
5485else
5486 ac_cv_header_stdc=no
5487fi
5488rm -f conftest*
5489
5490fi
5491
5492if test $ac_cv_header_stdc = yes; then
5493 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5494 if test "$cross_compiling" = yes; then :
5495 :
5496else
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5498/* end confdefs.h. */
5499#include <ctype.h>
5500#include <stdlib.h>
5501#if ((' ' & 0x0FF) == 0x020)
5502# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5503# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5504#else
5505# define ISLOWER(c) \
5506 (('a' <= (c) && (c) <= 'i') \
5507 || ('j' <= (c) && (c) <= 'r') \
5508 || ('s' <= (c) && (c) <= 'z'))
5509# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5510#endif
5511
5512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5513int
5514main ()
5515{
5516 int i;
5517 for (i = 0; i < 256; i++)
5518 if (XOR (islower (i), ISLOWER (i))
5519 || toupper (i) != TOUPPER (i))
5520 return 2;
5521 return 0;
5522}
5523_ACEOF
5524if ac_fn_c_try_run "$LINENO"; then :
5525
5526else
5527 ac_cv_header_stdc=no
5528fi
5529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5530 conftest.$ac_objext conftest.beam conftest.$ac_ext
5531fi
5532
5533fi
5534fi
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5536$as_echo "$ac_cv_header_stdc" >&6; }
5537if test $ac_cv_header_stdc = yes; then
5538
5539$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5540
5541fi
5542
5543# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5544for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5545 inttypes.h stdint.h unistd.h
5546do :
5547 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5548ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5549"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005550if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 cat >>confdefs.h <<_ACEOF
5552#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5553_ACEOF
5554
5555fi
5556
5557done
5558
5559
5560
5561 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 +02005562if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 MINIX=yes
5564else
5565 MINIX=
5566fi
5567
5568
5569 if test "$MINIX" = yes; then
5570
5571$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5572
5573
5574$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5575
5576
5577$as_echo "#define _MINIX 1" >>confdefs.h
5578
5579 fi
5580
5581
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5583$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005584if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005585 $as_echo_n "(cached) " >&6
5586else
5587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5588/* end confdefs.h. */
5589
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005590# define __EXTENSIONS__ 1
5591 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005592int
5593main ()
5594{
5595
5596 ;
5597 return 0;
5598}
5599_ACEOF
5600if ac_fn_c_try_compile "$LINENO"; then :
5601 ac_cv_safe_to_define___extensions__=yes
5602else
5603 ac_cv_safe_to_define___extensions__=no
5604fi
5605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606fi
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5608$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5609 test $ac_cv_safe_to_define___extensions__ = yes &&
5610 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5611
5612 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5613
5614 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5615
5616 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5617
5618 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5619
5620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621
Xavier de Gaye95750b12016-07-09 11:05:42 +02005622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5623$as_echo_n "checking for the Android API level... " >&6; }
5624cat >> conftest.c <<EOF
5625#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005626android_api = __ANDROID_API__
5627arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005628#else
5629#error not Android
5630#endif
5631EOF
5632
5633if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005634 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5635 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5637$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005638 if test -z "$ANDROID_API_LEVEL"; then
5639 echo 'Fatal: you must define __ANDROID_API__'
5640 exit 1
5641 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005642
5643cat >>confdefs.h <<_ACEOF
5644#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5645_ACEOF
5646
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005647
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5649$as_echo_n "checking for the Android arm ABI... " >&6; }
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5651$as_echo "$_arm_arch" >&6; }
5652 if test "$_arm_arch" = 7; then
5653 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5654 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5655 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656else
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5658$as_echo "not Android" >&6; }
5659fi
5660rm -f conftest.c conftest.out
5661
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662# Check for unsupported systems
5663case $ac_sys_system/$ac_sys_release in
5664atheos*|Linux*/1*)
5665 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5666 echo See README for details.
5667 exit 1;;
5668esac
5669
5670
Matthias Kloseb9621712010-04-24 17:59:49 +00005671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5672$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673
5674# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005675if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 withval=$with_suffix;
5677 case $withval in
5678 no) EXEEXT=;;
5679 yes) EXEEXT=.exe;;
5680 *) EXEEXT=$withval;;
5681 esac
5682fi
5683
Matthias Kloseb9621712010-04-24 17:59:49 +00005684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5685$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
5687# Test whether we're running on a non-case-sensitive system, in which
5688# case we give a warning if no ext is given
5689
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5691$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692if test ! -d CaseSensitiveTestDir; then
5693mkdir CaseSensitiveTestDir
5694fi
5695
5696if test -d casesensitivetestdir
5697then
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5699$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 BUILDEXEEXT=.exe
5701else
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 BUILDEXEEXT=$EXEEXT
5705fi
5706rmdir CaseSensitiveTestDir
5707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708case $ac_sys_system in
5709hp*|HP*)
5710 case $CC in
5711 cc|*/cc) CC="$CC -Ae";;
5712 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713esac
5714
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
Matthias Kloseb9621712010-04-24 17:59:49 +00005716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5717$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718if test -z "$LIBRARY"
5719then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005720 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5723$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724
5725# LDLIBRARY is the name of the library to link against (as opposed to the
5726# name of the library into which to insert object files). BLDLIBRARY is also
5727# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5728# is blank as the main program is not linked directly against LDLIBRARY.
5729# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5730# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5731# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5732# DLLLIBRARY is the shared (i.e., DLL) library.
5733#
5734# RUNSHARED is used to run shared python without installed libraries
5735#
5736# INSTSONAME is the name of the shared library that will be use to install
5737# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005738#
5739# LDVERSION is the shared library version number, normally the Python version
5740# with the ABI build flags appended.
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743
5744
5745
5746
5747
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749LDLIBRARY="$LIBRARY"
5750BLDLIBRARY='$(LDLIBRARY)'
5751INSTSONAME='$(LDLIBRARY)'
5752DLLLIBRARY=''
5753LDLIBRARYDIR=''
5754RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005755LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756
5757# LINKCC is the command that links the python executable -- default is $(CC).
5758# If CXX is set, and if it is needed to link a main function that was
5759# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5760# python might then depend on the C++ runtime
5761# This is altered for AIX in order to build the export list before
5762# linking.
5763
Matthias Kloseb9621712010-04-24 17:59:49 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5765$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766if test -z "$LINKCC"
5767then
5768 LINKCC='$(PURIFY) $(MAINCC)'
5769 case $ac_sys_system in
5770 AIX*)
5771 exp_extra="\"\""
5772 if test $ac_sys_release -ge 5 -o \
5773 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5774 exp_extra="."
5775 fi
5776 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777 QNX*)
5778 # qcc must be used because the other compilers do not
5779 # support -N.
5780 LINKCC=qcc;;
5781 esac
5782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5784$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785
5786# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5787# make sure we default having it set to "no": this is used by
5788# distutils.unixccompiler to know if it should add --enable-new-dtags
5789# to linker command lines, and failing to detect GNU ld simply results
5790# in the same bahaviour as before.
5791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5793$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794ac_prog=ld
5795if test "$GCC" = yes; then
5796 ac_prog=`$CC -print-prog-name=ld`
5797fi
5798case `"$ac_prog" -V 2>&1 < /dev/null` in
5799 *GNU*)
5800 GNULD=yes;;
5801 *)
5802 GNULD=no;;
5803esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5805$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5808$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005810if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 enableval=$enable_shared;
5812fi
5813
5814
5815if test -z "$enable_shared"
5816then
5817 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005818 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 enable_shared="yes";;
5820 *)
5821 enable_shared="no";;
5822 esac
5823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5825$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5828$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005830if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831 enableval=$enable_profiling;
5832fi
5833
5834if test "x$enable_profiling" = xyes; then
5835 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005836 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838/* end confdefs.h. */
5839int main() { return 0; }
5840_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841if ac_fn_c_try_link "$LINENO"; then :
5842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846rm -f core conftest.err conftest.$ac_objext \
5847 conftest$ac_exeext conftest.$ac_ext
5848 CC="$ac_save_cc"
5849else
5850 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5853$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855if test "x$enable_profiling" = xyes; then
5856 BASECFLAGS="-pg $BASECFLAGS"
5857 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858fi
5859
Matthias Kloseb9621712010-04-24 17:59:49 +00005860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5861$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862
5863# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5864# library that we build, but we do not want to link against it (we
5865# will find it with a -framework option). For this reason there is an
5866# extra variable BLDLIBRARY against which Python and the extension
5867# modules are linked, BLDLIBRARY. This is normally the same as
5868# LDLIBRARY, but empty for MacOSX framework builds.
5869if test "$enable_framework"
5870then
5871 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005872 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 BLDLIBRARY=''
5874else
5875 BLDLIBRARY='$(LDLIBRARY)'
5876fi
5877
5878# Other platforms follow
5879if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005880 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881
Matthias Kloseb9621712010-04-24 17:59:49 +00005882$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884 case $ac_sys_system in
5885 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).dll.a'
5887 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 ;;
5889 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005890 LDLIBRARY='libpython$(LDVERSION).so'
5891 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005892 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005894 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005895 then
5896 PY3LIBRARY=libpython3.so
5897 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005899 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).so'
5901 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005902 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005904 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005905 then
5906 PY3LIBRARY=libpython3.so
5907 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
5909 hp*|HP*)
5910 case `uname -m` in
5911 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005918 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).dylib'
5923 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005926 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005928 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005929 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
5931 esac
5932else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005933 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 case $ac_sys_system in
5935 CYGWIN*)
5936 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005937 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 ;;
5939 esac
5940fi
5941
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005942if test "$cross_compiling" = yes; then
5943 RUNSHARED=
5944fi
5945
Matthias Kloseb9621712010-04-24 17:59:49 +00005946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5947$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005950if test -n "$ac_tool_prefix"; then
5951 for ac_prog in ar aal
5952 do
5953 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5954set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005957if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959else
5960 if test -n "$AR"; then
5961 ac_cv_prog_AR="$AR" # Let the user override the test.
5962else
5963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964for as_dir in $PATH
5965do
5966 IFS=$as_save_IFS
5967 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005970 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 break 2
5973 fi
5974done
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976IFS=$as_save_IFS
5977
5978fi
5979fi
5980AR=$ac_cv_prog_AR
5981if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5983$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984else
Matthias Kloseb9621712010-04-24 17:59:49 +00005985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
5988
5989
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990 test -n "$AR" && break
5991 done
5992fi
5993if test -z "$AR"; then
5994 ac_ct_AR=$AR
5995 for ac_prog in ar aal
5996do
5997 # Extract the first word of "$ac_prog", so it can be a program name with args.
5998set dummy $ac_prog; ac_word=$2
5999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000$as_echo_n "checking for $ac_word... " >&6; }
6001if ${ac_cv_prog_ac_ct_AR+:} false; then :
6002 $as_echo_n "(cached) " >&6
6003else
6004 if test -n "$ac_ct_AR"; then
6005 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6006else
6007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
6012 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006014 ac_cv_prog_ac_ct_AR="$ac_prog"
6015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016 break 2
6017 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006019 done
6020IFS=$as_save_IFS
6021
6022fi
6023fi
6024ac_ct_AR=$ac_cv_prog_ac_ct_AR
6025if test -n "$ac_ct_AR"; then
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6027$as_echo "$ac_ct_AR" >&6; }
6028else
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
6031fi
6032
6033
6034 test -n "$ac_ct_AR" && break
6035done
6036
6037 if test "x$ac_ct_AR" = x; then
6038 AR="ar"
6039 else
6040 case $cross_compiling:$ac_tool_warned in
6041yes:)
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6043$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6044ac_tool_warned=yes ;;
6045esac
6046 AR=$ac_ct_AR
6047 fi
6048fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049
6050
6051# tweak ARFLAGS only if the user didn't set it on the command line
6052
6053if test -z "$ARFLAGS"
6054then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006055 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056fi
6057
doko@ubuntu.com58844492012-06-30 18:25:32 +02006058if test -n "$ac_tool_prefix"; then
6059 for ac_prog in readelf
6060 do
6061 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6062set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6064$as_echo_n "checking for $ac_word... " >&6; }
6065if ${ac_cv_prog_READELF+:} false; then :
6066 $as_echo_n "(cached) " >&6
6067else
6068 if test -n "$READELF"; then
6069 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6070else
6071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006078 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080 break 2
6081 fi
6082done
6083 done
6084IFS=$as_save_IFS
6085
6086fi
6087fi
6088READELF=$ac_cv_prog_READELF
6089if test -n "$READELF"; then
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6091$as_echo "$READELF" >&6; }
6092else
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6094$as_echo "no" >&6; }
6095fi
6096
6097
6098 test -n "$READELF" && break
6099 done
6100fi
6101if test -z "$READELF"; then
6102 ac_ct_READELF=$READELF
6103 for ac_prog in readelf
6104do
6105 # Extract the first word of "$ac_prog", so it can be a program name with args.
6106set dummy $ac_prog; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6110 $as_echo_n "(cached) " >&6
6111else
6112 if test -n "$ac_ct_READELF"; then
6113 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6114else
6115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116for as_dir in $PATH
6117do
6118 IFS=$as_save_IFS
6119 test -z "$as_dir" && as_dir=.
6120 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006122 ac_cv_prog_ac_ct_READELF="$ac_prog"
6123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124 break 2
6125 fi
6126done
6127 done
6128IFS=$as_save_IFS
6129
6130fi
6131fi
6132ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6133if test -n "$ac_ct_READELF"; then
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6135$as_echo "$ac_ct_READELF" >&6; }
6136else
6137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138$as_echo "no" >&6; }
6139fi
6140
6141
6142 test -n "$ac_ct_READELF" && break
6143done
6144
6145 if test "x$ac_ct_READELF" = x; then
6146 READELF=":"
6147 else
6148 case $cross_compiling:$ac_tool_warned in
6149yes:)
6150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6152ac_tool_warned=yes ;;
6153esac
6154 READELF=$ac_ct_READELF
6155 fi
6156fi
6157
6158if test "$cross_compiling" = yes; then
6159 case "$READELF" in
6160 readelf|:)
6161 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6162 ;;
6163 esac
6164fi
6165
6166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006169hp*|HP*)
6170 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171 if test -z "$INSTALL"
6172 then
6173 INSTALL="${srcdir}/install-sh -c"
6174 fi
6175esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176# Find a good install program. We prefer a C program (faster),
6177# so one script is as good as another. But avoid the broken or
6178# incompatible versions:
6179# SysV /etc/install, /usr/sbin/install
6180# SunOS /usr/etc/install
6181# IRIX /sbin/install
6182# AIX /bin/install
6183# AmigaOS /C/install, which installs bootblocks on floppy discs
6184# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6185# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6186# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6187# OS/2's system install, which has a completely different semantic
6188# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006189# Reject install programs that cannot install multiple files.
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6191$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006193if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195else
6196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197for as_dir in $PATH
6198do
6199 IFS=$as_save_IFS
6200 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 # Account for people who put trailing slashes in PATH elements.
6202case $as_dir/ in #((
6203 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006205 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006206 /usr/ucb/* ) ;;
6207 *)
6208 # OSF1 and SCO ODT 3.0 have their own names for install.
6209 # Don't use installbsd from OSF since it installs stuff as root
6210 # by default.
6211 for ac_prog in ginstall scoinst install; do
6212 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006213 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214 if test $ac_prog = install &&
6215 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6216 # AIX install. It has an incompatible calling convention.
6217 :
6218 elif test $ac_prog = install &&
6219 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6220 # program-specific install script used by HP pwplus--don't use.
6221 :
6222 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 rm -rf conftest.one conftest.two conftest.dir
6224 echo one > conftest.one
6225 echo two > conftest.two
6226 mkdir conftest.dir
6227 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6228 test -s conftest.one && test -s conftest.two &&
6229 test -s conftest.dir/conftest.one &&
6230 test -s conftest.dir/conftest.two
6231 then
6232 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6233 break 3
6234 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235 fi
6236 fi
6237 done
6238 done
6239 ;;
6240esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006241
6242 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243IFS=$as_save_IFS
6244
Matthias Kloseb9621712010-04-24 17:59:49 +00006245rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246
6247fi
6248 if test "${ac_cv_path_install+set}" = set; then
6249 INSTALL=$ac_cv_path_install
6250 else
6251 # As a last resort, use the slow shell script. Don't cache a
6252 # value for INSTALL within a source directory, because that will
6253 # break other packages using the cache if that directory is
6254 # removed, or if the value is a relative name.
6255 INSTALL=$ac_install_sh
6256 fi
6257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6259$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260
6261# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6262# It thinks the first close brace ends the variable substitution.
6263test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6264
6265test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6266
6267test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6268
Matthias Klose93a0ef12012-03-15 18:08:34 +01006269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6270$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6271if test -z "$MKDIR_P"; then
6272 if ${ac_cv_path_mkdir+:} false; then :
6273 $as_echo_n "(cached) " >&6
6274else
6275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6276for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6277do
6278 IFS=$as_save_IFS
6279 test -z "$as_dir" && as_dir=.
6280 for ac_prog in mkdir gmkdir; do
6281 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006282 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006283 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6284 'mkdir (GNU coreutils) '* | \
6285 'mkdir (coreutils) '* | \
6286 'mkdir (fileutils) '4.1*)
6287 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6288 break 3;;
6289 esac
6290 done
6291 done
6292 done
6293IFS=$as_save_IFS
6294
6295fi
6296
6297 test -d ./--version && rmdir ./--version
6298 if test "${ac_cv_path_mkdir+set}" = set; then
6299 MKDIR_P="$ac_cv_path_mkdir -p"
6300 else
6301 # As a last resort, use the slow shell script. Don't cache a
6302 # value for MKDIR_P within a source directory, because that will
6303 # break other packages using the cache if that directory is
6304 # removed, or if the value is a relative name.
6305 MKDIR_P="$ac_install_sh -d"
6306 fi
6307fi
6308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6309$as_echo "$MKDIR_P" >&6; }
6310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311
6312# Not every filesystem supports hard links
6313
6314if test -z "$LN" ; then
6315 case $ac_sys_system in
6316 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 *) LN=ln;;
6318 esac
6319fi
6320
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006321# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006322
6323ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006324
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6327$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328
6329# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006330if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331 withval=$with_pydebug;
6332if test "$withval" != no
6333then
6334
Matthias Kloseb9621712010-04-24 17:59:49 +00006335$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6338$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006340 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006341else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343fi
6344else
Matthias Kloseb9621712010-04-24 17:59:49 +00006345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347fi
6348
6349
T. Woutersddbfa2c2017-05-23 01:30:49 +02006350# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6351# the ABI. This allows enabling assertions without changing the ABI.
6352assertions='false'
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6354$as_echo_n "checking for --with-assertions... " >&6; }
6355
6356# Check whether --with-assertions was given.
6357if test "${with_assertions+set}" = set; then :
6358 withval=$with_assertions;
6359if test "$withval" != no
6360then
6361 assertions='true'
6362fi
6363fi
6364
6365if test "$assertions" = 'true'; then
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6367$as_echo "yes" >&6; }
6368elif test "$Py_DEBUG" = 'true'; then
6369 assertions='true'
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6371$as_echo "implied by --with-pydebug" >&6; }
6372else
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374$as_echo "no" >&6; }
6375fi
6376
Brett Cannon63d98bc2016-09-06 17:12:40 -07006377# Enable optimization flags
6378
6379
6380Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6382$as_echo_n "checking for --enable-optimizations... " >&6; }
6383# Check whether --enable-optimizations was given.
6384if test "${enable_optimizations+set}" = set; then :
6385 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006386if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006387then
6388 Py_OPT='true'
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390$as_echo "yes" >&6; };
6391else
6392 Py_OPT='false'
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; };
6395fi
6396else
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398$as_echo "no" >&6; }
6399fi
6400
6401if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006402 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6403 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006404 # 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 +00006405 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006406 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006407 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006408 DEF_MAKE_RULE="build_all"
6409else
6410 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006411 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006412 DEF_MAKE_RULE="all"
6413fi
6414
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006415# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6417$as_echo_n "checking for --with-lto... " >&6; }
6418
6419# Check whether --with-lto was given.
6420if test "${with_lto+set}" = set; then :
6421 withval=$with_lto;
6422if test "$withval" != no
6423then
6424 Py_LTO='true'
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6426$as_echo "yes" >&6; };
6427else
6428 Py_LTO='false'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; };
6431fi
6432else
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; }
6435fi
6436
6437if test "$Py_LTO" = 'true' ; then
6438 case $CC in
6439 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006440 case $ac_sys_system in
6441 Darwin*)
6442 # Any changes made here should be reflected in the GCC+Darwin case below
6443 LTOFLAGS="-flto -Wl,-export_dynamic"
6444 ;;
6445 *)
6446 LTOFLAGS="-flto"
6447 ;;
6448 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006449 ;;
6450 *gcc*)
6451 case $ac_sys_system in
6452 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006453 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006454 ;;
6455 *)
6456 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6457 ;;
6458 esac
6459 ;;
6460 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006461 CFLAGS="$CFLAGS $LTOFLAGS"
6462 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006463fi
6464
Brett Cannon7188a3e2015-09-18 15:13:44 -07006465# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006466
6467
6468
6469
6470
Gregory P. Smith799520c2016-09-07 16:10:00 -07006471# Make this work on systems where llvm tools are not installed with their
6472# normal names in the default $PATH (ie: Ubuntu). They exist under the
6473# non-suffixed name in their versioned llvm directory.
6474llvm_bin_dir=''
6475llvm_path="${PATH}"
6476if test "${CC}" = "clang"
6477then
6478 clang_bin=`which clang`
6479 # Some systems install clang elsewhere as a symlink to the real path
6480 # which is where the related llvm tools are located.
6481 if test -L "${clang_bin}"
6482 then
6483 clang_dir=`dirname "${clang_bin}"`
6484 clang_bin=`readlink "${clang_bin}"`
6485 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6486 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6487 fi
6488fi
Zachary Ware5af85642015-12-21 12:09:17 -06006489
Gregory P. Smith799520c2016-09-07 16:10:00 -07006490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6491$as_echo_n "checking target system type... " >&6; }
6492if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006493 $as_echo_n "(cached) " >&6
6494else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006495 if test "x$target_alias" = x; then
6496 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006497else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006498 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6499 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6500fi
6501
6502fi
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6504$as_echo "$ac_cv_target" >&6; }
6505case $ac_cv_target in
6506*-*-*) ;;
6507*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6508esac
6509target=$ac_cv_target
6510ac_save_IFS=$IFS; IFS='-'
6511set x $ac_cv_target
6512shift
6513target_cpu=$1
6514target_vendor=$2
6515shift; shift
6516# Remember, the first character of IFS is used to create $*,
6517# except with old shells:
6518target_os=$*
6519IFS=$ac_save_IFS
6520case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6521
6522
6523# The aliases save the names the user supplied, while $host etc.
6524# will get canonicalized.
6525test -n "$target_alias" &&
6526 test "$program_prefix$program_suffix$program_transform_name" = \
6527 NONENONEs,x,x, &&
6528 program_prefix=${target_alias}-
6529# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6530set dummy $target_alias-llvm-profdata; ac_word=$2
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535else
6536 case $LLVM_PROFDATA in
6537 [\\/]* | ?:[\\/]*)
6538 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6539 ;;
6540 *)
6541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006548 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550 break 2
6551 fi
6552done
6553 done
6554IFS=$as_save_IFS
6555
Gregory P. Smith799520c2016-09-07 16:10:00 -07006556 ;;
6557esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006558fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006559LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6560if test -n "$LLVM_PROFDATA"; then
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6562$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006563else
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567
6568
Gregory P. Smith799520c2016-09-07 16:10:00 -07006569if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6570 if test "$build" = "$target"; then
6571 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6572 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6573set dummy llvm-profdata; ac_word=$2
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575$as_echo_n "checking for $ac_word... " >&6; }
6576if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6577 $as_echo_n "(cached) " >&6
6578else
6579 case $ac_pt_LLVM_PROFDATA in
6580 [\\/]* | ?:[\\/]*)
6581 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6582 ;;
6583 *)
6584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585for as_dir in ${llvm_path}
6586do
6587 IFS=$as_save_IFS
6588 test -z "$as_dir" && as_dir=.
6589 for ac_exec_ext in '' $ac_executable_extensions; do
6590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593 break 2
6594 fi
6595done
6596 done
6597IFS=$as_save_IFS
6598
6599 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6600 ;;
6601esac
6602fi
6603ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6604if test -n "$ac_pt_LLVM_PROFDATA"; then
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6606$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6607else
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609$as_echo "no" >&6; }
6610fi
6611
6612 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6613 else
6614 LLVM_PROFDATA="''"
6615 fi
6616else
6617 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6618fi
6619
6620
6621if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6622then
6623 LLVM_PROF_FOUND="found"
6624else
6625 LLVM_PROF_FOUND="not-found"
6626fi
6627if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6628then
6629 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6630 if test -n "${found_llvm_profdata}"
6631 then
6632 # llvm-profdata isn't directly in $PATH in some cases.
6633 # https://apple.stackexchange.com/questions/197053/
6634 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6635 LLVM_PROF_FOUND=found
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6637$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6638 fi
6639fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640LLVM_PROF_ERR=no
6641case $CC in
6642 *clang*)
6643 # Any changes made here should be reflected in the GCC+Darwin case below
6644 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6645 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6648 if test $LLVM_PROF_FOUND = not-found
6649 then
6650 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651 if test "${REQUIRE_PGO}" = "yes"
6652 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006653 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 -07006654 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655 fi
6656 ;;
6657 *gcc*)
6658 case $ac_sys_system in
6659 Darwin*)
6660 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6661 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006664 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006665 then
6666 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667 if test "${REQUIRE_PGO}" = "yes"
6668 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006669 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 -07006670 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006671 fi
6672 ;;
6673 *)
6674 PGO_PROF_GEN_FLAG="-fprofile-generate"
6675 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6676 LLVM_PROF_MERGER="true"
6677 LLVM_PROF_FILE=""
6678 ;;
6679 esac
6680 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006681 *icc*)
6682 PGO_PROF_GEN_FLAG="-prof-gen"
6683 PGO_PROF_USE_FLAG="-prof-use"
6684 LLVM_PROF_MERGER="true"
6685 LLVM_PROF_FILE=""
6686 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006687esac
6688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6690# merged with this chunk of code?
6691
6692# Optimizer/debugger flags
6693# ------------------------
6694# (The following bit of code is complicated enough - please keep things
6695# indented properly. Just pretend you're editing Python code. ;-)
6696
6697# There are two parallel sets of case statements below, one that checks to
6698# see if OPT was set and one that does BASECFLAGS setting based upon
6699# compiler and platform. BASECFLAGS tweaks need to be made even if the
6700# user set OPT.
6701
6702# tweak OPT based on compiler and platform, only if the user didn't set
6703# it on the command line
6704
Victor Stinner9ed34a82017-05-02 22:35:58 +02006705
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006706if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707then
6708 case $GCC in
6709 yes)
6710 if test "$CC" != 'g++' ; then
6711 STRICT_PROTO="-Wstrict-prototypes"
6712 fi
6713 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6714 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6715 WRAP="-fwrapv"
6716 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006717
Stefan Krahaf04ff22011-12-08 22:20:31 +01006718 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006719 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006720 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006721 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006722 *)
6723 if $CC --version 2>&1 | grep -q clang
6724 then
6725 cc_is_clang=1
6726 else
6727 cc_is_clang=
6728 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006729 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006730
Victor Stinner35f3d242017-04-21 12:35:24 +02006731 if test -n "${cc_is_clang}"
6732 then
6733 # Clang also needs -fwrapv
6734 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006735 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6736 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006737 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006738 fi
6739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740 case $ac_cv_prog_cc_g in
6741 yes)
6742 if test "$Py_DEBUG" = 'true' ; then
6743 # Optimization messes up debuggers, so turn it off for
6744 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006745 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006746 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006747 else
Victor Stinner28205b22017-04-21 11:24:34 +02006748 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006749 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750 else
Victor Stinner28205b22017-04-21 11:24:34 +02006751 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752 fi
6753 ;;
6754 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006755 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756 ;;
6757 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006758
Victor Stinner826f83f2017-04-28 15:07:10 +02006759 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761 case $ac_sys_system in
6762 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6763 ;;
6764 esac
6765 ;;
6766
6767 *)
6768 OPT="-O"
6769 ;;
6770 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771fi
6772
6773
6774
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776# The -arch flags for universal builds on OSX
6777UNIVERSAL_ARCH_FLAGS=
6778
6779
6780# tweak BASECFLAGS based on compiler and platform
6781case $GCC in
6782yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006783 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006784
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6786$as_echo_n "checking for -Wextra... " >&6; }
6787 ac_save_cc="$CC"
6788 CC="$CC -Wextra -Werror"
6789 if ${ac_cv_extra_warnings+:} false; then :
6790 $as_echo_n "(cached) " >&6
6791else
6792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6793/* end confdefs.h. */
6794
6795
6796int
6797main ()
6798{
6799
6800 ;
6801 return 0;
6802}
6803
6804_ACEOF
6805if ac_fn_c_try_compile "$LINENO"; then :
6806
6807 ac_cv_extra_warnings=yes
6808
6809else
6810
6811 ac_cv_extra_warnings=no
6812
6813fi
6814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6815fi
6816
6817 CC="$ac_save_cc"
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6819$as_echo "$ac_cv_extra_warnings" >&6; }
6820
6821 if test $ac_cv_extra_warnings = yes
6822 then
6823 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6824 fi
6825
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006826 # Python doesn't violate C99 aliasing rules, but older versions of
6827 # GCC produce warnings for legal Python code. Enable
6828 # -fno-strict-aliasing on versions of GCC that support but produce
6829 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6831$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832 ac_save_cc="$CC"
6833 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006835 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006840
Matthias Kloseb159a552010-04-25 21:00:44 +00006841
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006842int
6843main ()
6844{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006845
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006846 ;
6847 return 0;
6848}
Matthias Kloseb159a552010-04-25 21:00:44 +00006849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006851if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006852
6853 CC="$ac_save_cc -fstrict-aliasing"
6854 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856/* end confdefs.h. */
6857
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006858 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859int
6860main ()
6861{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006862double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006863 ;
6864 return 0;
6865}
Matthias Kloseb159a552010-04-25 21:00:44 +00006866
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006869
6870 ac_cv_no_strict_aliasing=no
6871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872else
Matthias Kloseb159a552010-04-25 21:00:44 +00006873
6874 ac_cv_no_strict_aliasing=yes
6875
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006876fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006878
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006879else
Matthias Kloseb159a552010-04-25 21:00:44 +00006880
6881 ac_cv_no_strict_aliasing=no
6882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006885fi
6886
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006887 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6890$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006891 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892 then
6893 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6894 fi
6895
Zachary Ware5af85642015-12-21 12:09:17 -06006896 # ICC doesn't recognize the option, but only emits a warning
6897 ## XXX does it emit an unused result warning and can it be disabled?
6898 case "$CC" in
6899 *icc*)
6900 ac_cv_disable_unused_result_warning=no
6901 ;;
6902 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6904$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6905 ac_save_cc="$CC"
6906 CC="$CC -Wunused-result -Werror"
6907 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006908 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006909 $as_echo_n "(cached) " >&6
6910else
6911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6912/* end confdefs.h. */
6913
6914
6915int
6916main ()
6917{
6918
6919 ;
6920 return 0;
6921}
6922
6923_ACEOF
6924if ac_fn_c_try_compile "$LINENO"; then :
6925
6926 ac_cv_disable_unused_result_warning=yes
6927
6928else
6929
6930 ac_cv_disable_unused_result_warning=no
6931
6932fi
6933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6934fi
6935
6936 CFLAGS="$save_CFLAGS"
6937 CC="$ac_save_cc"
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6939$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006940 ;;
6941 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006942
6943 if test $ac_cv_disable_unused_result_warning = yes
6944 then
6945 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006946 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6947 fi
6948
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6950$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6951 ac_save_cc="$CC"
6952 CC="$CC -Wunused-parameter -Werror"
6953 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6954 $as_echo_n "(cached) " >&6
6955else
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6957/* end confdefs.h. */
6958
6959
6960int
6961main ()
6962{
6963
6964 ;
6965 return 0;
6966}
6967
6968_ACEOF
6969if ac_fn_c_try_compile "$LINENO"; then :
6970
6971 ac_cv_disable_unused_parameter_warning=yes
6972
6973else
6974
6975 ac_cv_disable_unused_parameter_warning=no
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6979fi
6980
6981 CC="$ac_save_cc"
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6983$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6984
6985 if test $ac_cv_disable_unused_parameter_warning = yes
6986 then
6987 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6988 fi
6989
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6991$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6992 ac_save_cc="$CC"
6993 CC="$CC -Wmissing-field-initializers -Werror"
6994 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6995 $as_echo_n "(cached) " >&6
6996else
6997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6998/* end confdefs.h. */
6999
7000
7001int
7002main ()
7003{
7004
7005 ;
7006 return 0;
7007}
7008
7009_ACEOF
7010if ac_fn_c_try_compile "$LINENO"; then :
7011
7012 ac_cv_disable_missing_field_initializers=yes
7013
7014else
7015
7016 ac_cv_disable_missing_field_initializers=no
7017
7018fi
7019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7020fi
7021
7022 CC="$ac_save_cc"
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7024$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7025
7026 if test $ac_cv_disable_missing_field_initializers = yes
7027 then
7028 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007029 fi
7030
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7032$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7033 ac_save_cc="$CC"
7034 CC="$CC -Wsign-compare"
7035 save_CFLAGS="$CFLAGS"
7036 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7037 $as_echo_n "(cached) " >&6
7038else
7039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7040/* end confdefs.h. */
7041
7042
7043int
7044main ()
7045{
7046
7047 ;
7048 return 0;
7049}
7050
7051_ACEOF
7052if ac_fn_c_try_compile "$LINENO"; then :
7053
7054 ac_cv_enable_sign_compare_warning=yes
7055
7056else
7057
7058 ac_cv_enable_sign_compare_warning=no
7059
7060fi
7061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7062fi
7063
7064 CFLAGS="$save_CFLAGS"
7065 CC="$ac_save_cc"
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7067$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7068
7069 if test $ac_cv_enable_sign_compare_warning = yes
7070 then
7071 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7072 fi
7073
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7075$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7076 ac_save_cc="$CC"
7077 CC="$CC -Wunreachable-code"
7078 save_CFLAGS="$CFLAGS"
7079 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7080 $as_echo_n "(cached) " >&6
7081else
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7083/* end confdefs.h. */
7084
7085
7086int
7087main ()
7088{
7089
7090 ;
7091 return 0;
7092}
7093
7094_ACEOF
7095if ac_fn_c_try_compile "$LINENO"; then :
7096
7097 ac_cv_enable_unreachable_code_warning=yes
7098
7099else
7100
7101 ac_cv_enable_unreachable_code_warning=no
7102
7103fi
7104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7105fi
7106
7107 CFLAGS="$save_CFLAGS"
7108 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007109
7110 # Don't enable unreachable code warning in debug mode, since it usually
7111 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007112 # Issue #24324: Unfortunately, the unreachable code warning does not work
7113 # correctly on gcc and has been silently removed from the compiler.
7114 # It is supported on clang but on OS X systems gcc may be an alias
7115 # for clang. Try to determine if the compiler is not really gcc and,
7116 # if so, only then enable the warning.
7117 if test $ac_cv_enable_unreachable_code_warning = yes && \
7118 test "$Py_DEBUG" != "true" && \
7119 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007120 then
7121 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007122 else
7123 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007124 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7126$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007127
Victor Stinner193ee0a2017-02-06 14:24:00 +01007128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7129$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7130 ac_save_cc="$CC"
7131 CC="$CC -Werror=implicit-function-declaration"
7132 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7133 $as_echo_n "(cached) " >&6
7134else
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136/* end confdefs.h. */
7137
7138
7139int
7140main ()
7141{
7142
7143 ;
7144 return 0;
7145}
7146
7147_ACEOF
7148if ac_fn_c_try_compile "$LINENO"; then :
7149
7150 ac_cv_enable_implicit_function_declaration_error=yes
7151
7152else
7153
7154 ac_cv_enable_implicit_function_declaration_error=no
7155
7156fi
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158fi
7159
7160 CC="$ac_save_cc"
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7162$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7163
7164 if test $ac_cv_enable_implicit_function_declaration_error = yes
7165 then
7166 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7167 fi
7168
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007169 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7170 # support. Without this, treatment of subnormals doesn't follow
7171 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007172 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007173 alpha*)
7174 BASECFLAGS="$BASECFLAGS -mieee"
7175 ;;
7176 esac
7177
7178 case $ac_sys_system in
7179 SCO_SV*)
7180 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7181 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007182
7183 # is there any other compiler on Darwin besides gcc?
7184 Darwin*)
7185 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7186 # used to be here, but non-Apple gcc doesn't accept them.
7187 if test "${CC}" = gcc
7188 then
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007190$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007191 case "${UNIVERSALSDK}" in
7192 */MacOSX10.4u.sdk)
7193 # Build using 10.4 SDK, force usage of gcc when the
7194 # compiler is gcc, otherwise the user will get very
7195 # confusing error messages when building on OSX 10.6
7196 CC=gcc-4.0
7197 CPP=cpp-4.0
7198 ;;
7199 esac
7200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007201$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007202 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007203
Ned Deily87adb6e2013-10-18 21:09:56 -07007204 if test "${enable_universalsdk}"
7205 then
7206 case "$UNIVERSAL_ARCHS" in
7207 32-bit)
7208 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7209 LIPO_32BIT_FLAGS=""
7210 ARCH_RUN_32BIT=""
7211 ;;
7212 64-bit)
7213 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7214 LIPO_32BIT_FLAGS=""
7215 ARCH_RUN_32BIT="true"
7216 ;;
7217 all)
7218 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7219 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7220 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7221 ;;
7222 intel)
7223 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7224 LIPO_32BIT_FLAGS="-extract i386"
7225 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7226 ;;
7227 intel-32)
7228 UNIVERSAL_ARCH_FLAGS="-arch i386"
7229 LIPO_32BIT_FLAGS=""
7230 ARCH_RUN_32BIT=""
7231 ;;
7232 3-way)
7233 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7234 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7235 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7236 ;;
7237 *)
7238 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7239 ;;
7240 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007241
Ned Deily87adb6e2013-10-18 21:09:56 -07007242 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7243 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7244 if test "${UNIVERSALSDK}" != "/"
7245 then
7246 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7247 fi
7248 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249
Ned Deily87adb6e2013-10-18 21:09:56 -07007250 # Calculate an appropriate deployment target for this build:
7251 # The deployment target value is used explicitly to enable certain
7252 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007253 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007254 # component of the string returned by distutils.get_platform().
7255 #
7256 # Use the value from:
7257 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7258 # 2. the operating system version of the build machine if >= 10.6
7259 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7260 # below to pick either 10.3, 10.4, or 10.5 as the target.
7261 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262
Ned Deily87adb6e2013-10-18 21:09:56 -07007263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7264$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007265 cur_target_major=`sw_vers -productVersion | \
7266 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7267 cur_target_minor=`sw_vers -productVersion | \
7268 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7269 cur_target="${cur_target_major}.${cur_target_minor}"
7270 if test ${cur_target_major} -eq 10 && \
7271 test ${cur_target_minor} -ge 3 && \
7272 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007273 then
Ned Deily36820b62014-06-25 13:44:22 -07007274 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007275 cur_target=10.3
7276 if test ${enable_universalsdk}
7277 then
7278 case "$UNIVERSAL_ARCHS" in
7279 all|3-way|intel|64-bit)
7280 # These configurations were first supported in 10.5
7281 cur_target='10.5'
7282 ;;
7283 esac
7284 else
7285 if test `/usr/bin/arch` = "i386"
7286 then
7287 # 10.4 was the first release to support Intel archs
7288 cur_target="10.4"
7289 fi
7290 fi
7291 fi
7292 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007293
Ned Deily87adb6e2013-10-18 21:09:56 -07007294 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7295 # environment with a value that is the same as what we'll use
7296 # in the Makefile to ensure that we'll get the same compiler
7297 # environment during configure and build time.
7298 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7299 export MACOSX_DEPLOYMENT_TARGET
7300 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7302$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007303
Ned Deily87adb6e2013-10-18 21:09:56 -07007304 # end of Darwin* tests
7305 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007306 esac
7307 ;;
7308
7309*)
7310 case $ac_sys_system in
7311 OpenUNIX*|UnixWare*)
7312 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7313 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314 SCO_SV*)
7315 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7316 ;;
7317 esac
7318 ;;
7319esac
7320
Zachary Ware5af85642015-12-21 12:09:17 -06007321# ICC needs -fp-model strict or floats behave badly
7322case "$CC" in
7323*icc*)
7324 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7325 ;;
7326esac
7327
T. Woutersddbfa2c2017-05-23 01:30:49 +02007328if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007329 :
7330else
7331 OPT="-DNDEBUG $OPT"
7332fi
7333
7334if test "$ac_arch_flags"
7335then
7336 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7337fi
7338
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339# On some compilers, pthreads are available without further options
7340# (e.g. MacOS X). On some of these systems, the compiler will not
7341# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7342# So we have to see first whether pthreads are available without
7343# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7345$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007346if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348else
Matthias Kloseb9621712010-04-24 17:59:49 +00007349 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350 ac_cv_pthread_is_default=no
7351else
Matthias Kloseb9621712010-04-24 17:59:49 +00007352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353/* end confdefs.h. */
7354
Stefan Krah7dba5942012-11-22 22:49:11 +01007355#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356#include <pthread.h>
7357
7358void* routine(void* p){return NULL;}
7359
7360int main(){
7361 pthread_t p;
7362 if(pthread_create(&p,NULL,routine,NULL)!=0)
7363 return 1;
7364 (void)pthread_detach(p);
7365 return 0;
7366}
7367
7368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007369if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370
7371 ac_cv_pthread_is_default=yes
7372 ac_cv_kthread=no
7373 ac_cv_pthread=no
7374
7375else
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7379 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380fi
7381
7382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383fi
7384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7386$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387
7388
7389if test $ac_cv_pthread_is_default = yes
7390then
7391 ac_cv_kpthread=no
7392else
7393# -Kpthread, if available, provides the right #defines
7394# and linker options to make pthread_create available
7395# Some compilers won't report that they do not support -Kpthread,
7396# so we need to run a program to see whether it really made the
7397# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7399$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007400if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402else
7403 ac_save_cc="$CC"
7404CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007405if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406 ac_cv_kpthread=no
7407else
Matthias Kloseb9621712010-04-24 17:59:49 +00007408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007409/* end confdefs.h. */
7410
Stefan Krah7dba5942012-11-22 22:49:11 +01007411#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007412#include <pthread.h>
7413
7414void* routine(void* p){return NULL;}
7415
7416int main(){
7417 pthread_t p;
7418 if(pthread_create(&p,NULL,routine,NULL)!=0)
7419 return 1;
7420 (void)pthread_detach(p);
7421 return 0;
7422}
7423
7424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007425if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 ac_cv_kpthread=yes
7427else
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7431 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432fi
7433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434CC="$ac_save_cc"
7435fi
7436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7438$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439fi
7440
7441if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7442then
7443# -Kthread, if available, provides the right #defines
7444# and linker options to make pthread_create available
7445# Some compilers won't report that they do not support -Kthread,
7446# so we need to run a program to see whether it really made the
7447# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7449$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007450if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452else
7453 ac_save_cc="$CC"
7454CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007455if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456 ac_cv_kthread=no
7457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459/* end confdefs.h. */
7460
Stefan Krah7dba5942012-11-22 22:49:11 +01007461#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462#include <pthread.h>
7463
7464void* routine(void* p){return NULL;}
7465
7466int main(){
7467 pthread_t p;
7468 if(pthread_create(&p,NULL,routine,NULL)!=0)
7469 return 1;
7470 (void)pthread_detach(p);
7471 return 0;
7472}
7473
7474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007475if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476 ac_cv_kthread=yes
7477else
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7481 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482fi
7483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484CC="$ac_save_cc"
7485fi
7486
Matthias Kloseb9621712010-04-24 17:59:49 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7488$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489fi
7490
7491if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7492then
7493# -pthread, if available, provides the right #defines
7494# and linker options to make pthread_create available
7495# Some compilers won't report that they do not support -pthread,
7496# so we need to run a program to see whether it really made the
7497# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7499$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007500if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502else
7503 ac_save_cc="$CC"
7504CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007505if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506 ac_cv_pthread=no
7507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509/* end confdefs.h. */
7510
Stefan Krah7dba5942012-11-22 22:49:11 +01007511#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512#include <pthread.h>
7513
7514void* routine(void* p){return NULL;}
7515
7516int main(){
7517 pthread_t p;
7518 if(pthread_create(&p,NULL,routine,NULL)!=0)
7519 return 1;
7520 (void)pthread_detach(p);
7521 return 0;
7522}
7523
7524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007525if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526 ac_cv_pthread=yes
7527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532fi
7533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534CC="$ac_save_cc"
7535fi
7536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7538$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539fi
7540
7541# If we have set a CC compiler flag for thread support then
7542# check if it works for CXX, too.
7543ac_cv_cxx_thread=no
7544if test ! -z "$CXX"
7545then
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7547$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548ac_save_cxx="$CXX"
7549
7550if test "$ac_cv_kpthread" = "yes"
7551then
7552 CXX="$CXX -Kpthread"
7553 ac_cv_cxx_thread=yes
7554elif test "$ac_cv_kthread" = "yes"
7555then
7556 CXX="$CXX -Kthread"
7557 ac_cv_cxx_thread=yes
7558elif test "$ac_cv_pthread" = "yes"
7559then
7560 CXX="$CXX -pthread"
7561 ac_cv_cxx_thread=yes
7562fi
7563
7564if test $ac_cv_cxx_thread = yes
7565then
7566 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7567 $CXX -c conftest.$ac_ext 2>&5
7568 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7569 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7570 then
7571 ac_cv_cxx_thread=yes
7572 else
7573 ac_cv_cxx_thread=no
7574 fi
7575 rm -fr conftest*
7576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7578$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579fi
7580CXX="$ac_save_cxx"
7581
7582
7583# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7585$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007586if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588else
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590/* end confdefs.h. */
7591#include <stdlib.h>
7592#include <stdarg.h>
7593#include <string.h>
7594#include <float.h>
7595
7596int
7597main ()
7598{
7599
7600 ;
7601 return 0;
7602}
7603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007604if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 ac_cv_header_stdc=yes
7606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7610
7611if test $ac_cv_header_stdc = yes; then
7612 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614/* end confdefs.h. */
7615#include <string.h>
7616
7617_ACEOF
7618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 $EGREP "memchr" >/dev/null 2>&1; then :
7620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621else
7622 ac_cv_header_stdc=no
7623fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007624rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625
7626fi
7627
7628if test $ac_cv_header_stdc = yes; then
7629 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631/* end confdefs.h. */
7632#include <stdlib.h>
7633
7634_ACEOF
7635if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 $EGREP "free" >/dev/null 2>&1; then :
7637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638else
7639 ac_cv_header_stdc=no
7640fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007641rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642
7643fi
7644
7645if test $ac_cv_header_stdc = yes; then
7646 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648 :
7649else
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651/* end confdefs.h. */
7652#include <ctype.h>
7653#include <stdlib.h>
7654#if ((' ' & 0x0FF) == 0x020)
7655# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7656# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7657#else
7658# define ISLOWER(c) \
7659 (('a' <= (c) && (c) <= 'i') \
7660 || ('j' <= (c) && (c) <= 'r') \
7661 || ('s' <= (c) && (c) <= 'z'))
7662# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7663#endif
7664
7665#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7666int
7667main ()
7668{
7669 int i;
7670 for (i = 0; i < 256; i++)
7671 if (XOR (islower (i), ISLOWER (i))
7672 || toupper (i) != TOUPPER (i))
7673 return 2;
7674 return 0;
7675}
7676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007677if ac_fn_c_try_run "$LINENO"; then :
7678
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679else
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
7685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
7687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7689$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690if test $ac_cv_header_stdc = yes; then
7691
Matthias Kloseb9621712010-04-24 17:59:49 +00007692$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693
7694fi
7695
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007696for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007697fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007698ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007699sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007700unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007701poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007702sys/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 +01007703sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007704sys/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 +01007705sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007706sys/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 -07007707libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007708linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007709sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007710do :
7711 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7712ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007713if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007715#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007716_ACEOF
7717
7718fi
7719
Guido van Rossum627b2d71993-12-24 10:39:16 +00007720done
7721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007723for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7726$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007727if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007729else
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007731/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007732#include <sys/types.h>
7733#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007734
Martin v. Löwis11437992002-04-12 09:54:03 +00007735int
7736main ()
7737{
7738if ((DIR *) 0)
7739return 0;
7740 ;
7741 return 0;
7742}
7743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007744if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751eval ac_res=\$$as_ac_Header
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7753$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007754if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007756#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007757_ACEOF
7758
7759ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762done
7763# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7764if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7766$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007767if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007769else
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774/* Override any GCC internal prototype to avoid an error.
7775 Use char because int might match the return type of a GCC
7776 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#ifdef __cplusplus
7778extern "C"
7779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007780char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007781int
7782main ()
7783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 ;
7786 return 0;
7787}
7788_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789for ac_lib in '' dir; do
7790 if test -z "$ac_lib"; then
7791 ac_res="none required"
7792 else
7793 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007794 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799rm -f core conftest.err conftest.$ac_objext \
7800 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007801 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804done
Victor Stinnere0be4232011-10-25 13:06:09 +02007805if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807else
7808 ac_cv_search_opendir=no
7809fi
7810rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007811LIBS=$ac_func_search_save_LIBS
7812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7814$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007816if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007818
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007819fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007820
Michael W. Hudson54241132001-12-07 15:38:26 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7823$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007826else
7827 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831/* Override any GCC internal prototype to avoid an error.
7832 Use char because int might match the return type of a GCC
7833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007834#ifdef __cplusplus
7835extern "C"
7836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007837char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007838int
7839main ()
7840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 ;
7843 return 0;
7844}
7845_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846for ac_lib in '' x; do
7847 if test -z "$ac_lib"; then
7848 ac_res="none required"
7849 else
7850 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007851 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007856rm -f core conftest.err conftest.$ac_objext \
7857 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007858 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861done
Victor Stinnere0be4232011-10-25 13:06:09 +02007862if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864else
7865 ac_cv_search_opendir=no
7866fi
7867rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007868LIBS=$ac_func_search_save_LIBS
7869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7871$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007873if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007876fi
7877
7878fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007879
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7881$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007882if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007884else
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007887#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007888int
7889main ()
7890{
7891return makedev(0, 0);
7892 ;
7893 return 0;
7894}
7895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007896if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007897 ac_cv_header_sys_types_h_makedev=yes
7898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901rm -f core conftest.err conftest.$ac_objext \
7902 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007903
7904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7906$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007907
7908if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007909ac_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 +02007910if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007911
Matthias Kloseb9621712010-04-24 17:59:49 +00007912$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007913
7914fi
7915
7916
7917
7918 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 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 +02007920if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007921
Matthias Kloseb9621712010-04-24 17:59:49 +00007922$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007923
7924fi
7925
7926
7927 fi
7928fi
7929
Michael W. Hudson54241132001-12-07 15:38:26 +00007930
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007931# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7932# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7933SAVE_CFLAGS=$CFLAGS
7934CFLAGS="-std=c99 $CFLAGS"
7935for ac_header in bluetooth/bluetooth.h
7936do :
7937 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7938if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7939 cat >>confdefs.h <<_ACEOF
7940#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7941_ACEOF
7942
7943fi
7944
7945done
7946
7947CFLAGS=$SAVE_CFLAGS
7948
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007949# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7950for ac_header in net/if.h
7951do :
7952 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7953#ifdef STDC_HEADERS
7954# include <stdlib.h>
7955# include <stddef.h>
7956#else
7957# ifdef HAVE_STDLIB_H
7958# include <stdlib.h>
7959# endif
7960#endif
7961#ifdef HAVE_SYS_SOCKET_H
7962# include <sys/socket.h>
7963#endif
7964
7965"
Victor Stinnere0be4232011-10-25 13:06:09 +02007966if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007967 cat >>confdefs.h <<_ACEOF
7968#define HAVE_NET_IF_H 1
7969_ACEOF
7970
7971fi
7972
7973done
7974
7975
Martin v. Löwis11017b12006-01-14 18:12:57 +00007976# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007977for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007978do :
7979 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 +00007980#ifdef HAVE_ASM_TYPES_H
7981#include <asm/types.h>
7982#endif
7983#ifdef HAVE_SYS_SOCKET_H
7984#include <sys/socket.h>
7985#endif
7986
Matthias Kloseb9621712010-04-24 17:59:49 +00007987"
Victor Stinnere0be4232011-10-25 13:06:09 +02007988if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007989 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007990#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007991_ACEOF
7992
7993fi
7994
7995done
7996
7997
caaveryeffc12f2017-09-06 18:18:10 -04007998for ac_header in linux/vm_sockets.h
7999do :
8000 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8001#ifdef HAVE_SYS_SOCKET_H
8002#include <sys/socket.h>
8003#endif
8004
8005"
8006if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8007 cat >>confdefs.h <<_ACEOF
8008#define HAVE_LINUX_VM_SOCKETS_H 1
8009_ACEOF
8010
8011fi
8012
8013done
8014
8015
Charles-François Natali47413c12011-10-06 19:47:44 +02008016# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008017for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008018do :
8019 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8020ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8021#ifdef HAVE_SYS_SOCKET_H
8022#include <sys/socket.h>
8023#endif
8024
8025"
8026if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8027 cat >>confdefs.h <<_ACEOF
8028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8029_ACEOF
8030
8031fi
8032
8033done
8034
8035
Guido van Rossum627b2d71993-12-24 10:39:16 +00008036# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008037was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8039$as_echo_n "checking for clock_t in time.h... " >&6; }
8040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008041/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008043
8044_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008047 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008048else
Martin v. Löwis11437992002-04-12 09:54:03 +00008049
8050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008053
Guido van Rossum627b2d71993-12-24 10:39:16 +00008054fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008055rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008056
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8058$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008059
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8061$as_echo_n "checking for makedev... " >&6; }
8062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008064
Jesus Cea740f53a2010-04-28 11:35:30 +00008065#if defined(MAJOR_IN_MKDEV)
8066#include <sys/mkdev.h>
8067#elif defined(MAJOR_IN_SYSMACROS)
8068#include <sys/sysmacros.h>
8069#else
8070#include <sys/types.h>
8071#endif
8072
Neal Norwitz11690112002-07-30 01:08:28 +00008073int
8074main ()
8075{
Jesus Cea740f53a2010-04-28 11:35:30 +00008076
8077 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008078 ;
8079 return 0;
8080}
Matthias Kloseb159a552010-04-25 21:00:44 +00008081
Neal Norwitz11690112002-07-30 01:08:28 +00008082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008083if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008084 ac_cv_has_makedev=yes
8085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088rm -f core conftest.err conftest.$ac_objext \
8089 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8091$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008092if test "$ac_cv_has_makedev" = "yes"; then
8093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008095
8096fi
8097
Christian Heimes985ecdc2013-11-20 11:46:18 +01008098# byte swapping
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8100$as_echo_n "checking for le64toh... " >&6; }
8101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8102/* end confdefs.h. */
8103
8104#ifdef HAVE_ENDIAN_H
8105#include <endian.h>
8106#elif defined(HAVE_SYS_ENDIAN_H)
8107#include <sys/endian.h>
8108#endif
8109
8110int
8111main ()
8112{
8113
8114 le64toh(1)
8115 ;
8116 return 0;
8117}
8118
8119_ACEOF
8120if ac_fn_c_try_link "$LINENO"; then :
8121 ac_cv_has_le64toh=yes
8122else
8123 ac_cv_has_le64toh=no
8124fi
8125rm -f core conftest.err conftest.$ac_objext \
8126 conftest$ac_exeext conftest.$ac_ext
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8128$as_echo "$ac_cv_has_le64toh" >&6; }
8129if test "$ac_cv_has_le64toh" = "yes"; then
8130
8131$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8132
8133fi
8134
Martin v. Löwis399a6892002-10-04 10:22:02 +00008135use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008136# Don't use largefile support for GNU/Hurd
8137case $ac_sys_system in GNU*)
8138 use_lfs=no
8139esac
8140
Martin v. Löwis399a6892002-10-04 10:22:02 +00008141if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008142# Two defines needed to enable largefile support on various platforms
8143# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008144case $ac_sys_system/$ac_sys_release in
8145AIX*)
8146
8147$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8148
8149 ;;
8150esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008153
8154
Matthias Kloseb9621712010-04-24 17:59:49 +00008155$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008156
Martin v. Löwis399a6892002-10-04 10:22:02 +00008157fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008158
Guido van Rossum84e7b241996-08-19 21:59:00 +00008159# Add some code to confdefs.h so that the test for off_t works on SCO
8160cat >> confdefs.h <<\EOF
8161#if defined(SCO_DS)
8162#undef _OFF_T
8163#endif
8164EOF
8165
Guido van Rossumef2255b2000-03-10 22:30:29 +00008166# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171
8172cat >>confdefs.h <<_ACEOF
8173#define mode_t int
8174_ACEOF
8175
8176fi
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008179if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008181else
Martin v. Löwis11437992002-04-12 09:54:03 +00008182
8183cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008185_ACEOF
8186
8187fi
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008190if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008192else
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
8194cat >>confdefs.h <<_ACEOF
8195#define pid_t int
8196_ACEOF
8197
8198fi
8199
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008200
Martin v. Löwis11437992002-04-12 09:54:03 +00008201cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008202#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008203_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008206if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008208else
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008212_ACEOF
8213
8214fi
8215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8217$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008222/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008224
8225_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008228 ac_cv_type_uid_t=yes
8229else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008230 ac_cv_type_uid_t=no
8231fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008232rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8236$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008237if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008243
8244fi
8245
Mark Dickinson983bc162012-12-02 12:11:38 +00008246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008248if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249
Matthias Kloseb9621712010-04-24 17:59:49 +00008250$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008251
8252fi
8253
Stefan Krah1919b7e2012-03-21 18:25:23 +01008254ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8255if test "x$ac_cv_type___uint128_t" = xyes; then :
8256
8257$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8258
8259fi
8260
Jack Jansendd19cf82001-12-06 22:36:17 +00008261
Michael W. Hudson54241132001-12-07 15:38:26 +00008262# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008263# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008264# The cast to long int works around a bug in the HP C Compiler
8265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8267# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8269$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008270if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008272else
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 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 +00008274
Martin v. Löwis11437992002-04-12 09:54:03 +00008275else
Matthias Kloseb9621712010-04-24 17:59:49 +00008276 if test "$ac_cv_type_int" = yes; then
8277 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008279as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008280See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281 else
8282 ac_cv_sizeof_int=0
8283 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8288$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008289
8290
8291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008294_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008295
8296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297# The cast to long int works around a bug in the HP C Compiler
8298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8300# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8302$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008303if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008305else
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 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 +00008307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308else
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 if test "$ac_cv_type_long" = yes; then
8310 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008312as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008313See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 else
8315 ac_cv_sizeof_long=0
8316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318
Martin v. Löwis11437992002-04-12 09:54:03 +00008319fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8321$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322
8323
8324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008327_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328
8329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330# The cast to long int works around a bug in the HP C Compiler
8331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8333# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8335$as_echo_n "checking size of long long... " >&6; }
8336if ${ac_cv_sizeof_long_long+:} false; then :
8337 $as_echo_n "(cached) " >&6
8338else
8339 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8340
8341else
8342 if test "$ac_cv_type_long_long" = yes; then
8343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8345as_fn_error 77 "cannot compute sizeof (long long)
8346See \`config.log' for more details" "$LINENO" 5; }
8347 else
8348 ac_cv_sizeof_long_long=0
8349 fi
8350fi
8351
8352fi
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8354$as_echo "$ac_cv_sizeof_long_long" >&6; }
8355
8356
8357
8358cat >>confdefs.h <<_ACEOF
8359#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8360_ACEOF
8361
8362
8363# The cast to long int works around a bug in the HP C Compiler
8364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8366# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8368$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008369if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008371else
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 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 +00008373
Martin v. Löwis11437992002-04-12 09:54:03 +00008374else
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 if test "$ac_cv_type_void_p" = yes; then
8376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008378as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008379See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380 else
8381 ac_cv_sizeof_void_p=0
8382 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384
Martin v. Löwis11437992002-04-12 09:54:03 +00008385fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8387$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388
8389
8390
Martin v. Löwis11437992002-04-12 09:54:03 +00008391cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008392#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008393_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008394
8395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396# The cast to long int works around a bug in the HP C Compiler
8397# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8398# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8399# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8401$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008402if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008404else
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 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 +00008406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407else
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 if test "$ac_cv_type_short" = yes; then
8409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008411as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008412See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413 else
8414 ac_cv_sizeof_short=0
8415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8420$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421
8422
8423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008425#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008426_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008427
8428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429# The cast to long int works around a bug in the HP C Compiler
8430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8432# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8434$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008435if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008437else
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 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 +00008439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440else
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 if test "$ac_cv_type_float" = yes; then
8442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008444as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008445See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446 else
8447 ac_cv_sizeof_float=0
8448 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450
Martin v. Löwis11437992002-04-12 09:54:03 +00008451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8453$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008454
8455
8456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008458#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008459_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008460
8461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462# The cast to long int works around a bug in the HP C Compiler
8463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8465# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8467$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008468if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 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 +00008472
Martin v. Löwis11437992002-04-12 09:54:03 +00008473else
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 if test "$ac_cv_type_double" = yes; then
8475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008477as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008478See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479 else
8480 ac_cv_sizeof_double=0
8481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483
Martin v. Löwis11437992002-04-12 09:54:03 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8486$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487
8488
8489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008491#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008492_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008493
8494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495# The cast to long int works around a bug in the HP C Compiler
8496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8498# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8500$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008501if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 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 +00008505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506else
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 if test "$ac_cv_type_fpos_t" = yes; then
8508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008510as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008511See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512 else
8513 ac_cv_sizeof_fpos_t=0
8514 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8519$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520
8521
8522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008524#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008525_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008526
Michael W. Hudson54241132001-12-07 15:38:26 +00008527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528# The cast to long int works around a bug in the HP C Compiler
8529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8531# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8533$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008534if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 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 +00008538
Martin v. Löwis18e16552006-02-15 17:27:45 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 if test "$ac_cv_type_size_t" = yes; then
8541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008543as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008544See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545 else
8546 ac_cv_sizeof_size_t=0
8547 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549
Martin v. Löwis18e16552006-02-15 17:27:45 +00008550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8552$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553
8554
8555
Martin v. Löwis18e16552006-02-15 17:27:45 +00008556cat >>confdefs.h <<_ACEOF
8557#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8558_ACEOF
8559
8560
Christian Heimes400adb02008-02-01 08:12:03 +00008561# The cast to long int works around a bug in the HP C Compiler
8562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8566$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008567if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 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 +00008571
Christian Heimes400adb02008-02-01 08:12:03 +00008572else
Matthias Kloseb9621712010-04-24 17:59:49 +00008573 if test "$ac_cv_type_pid_t" = yes; then
8574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008576as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008577See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008578 else
8579 ac_cv_sizeof_pid_t=0
8580 fi
8581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582
Christian Heimes400adb02008-02-01 08:12:03 +00008583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8585$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008586
8587
8588
8589cat >>confdefs.h <<_ACEOF
8590#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8591_ACEOF
8592
8593
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008594# The cast to long int works around a bug in the HP C Compiler
8595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8597# This bug is HP SR number 8606223364.
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8599$as_echo_n "checking size of uintptr_t... " >&6; }
8600if ${ac_cv_sizeof_uintptr_t+:} false; then :
8601 $as_echo_n "(cached) " >&6
8602else
8603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8604
8605else
8606 if test "$ac_cv_type_uintptr_t" = yes; then
8607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8609as_fn_error 77 "cannot compute sizeof (uintptr_t)
8610See \`config.log' for more details" "$LINENO" 5; }
8611 else
8612 ac_cv_sizeof_uintptr_t=0
8613 fi
8614fi
8615
8616fi
8617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8618$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8619
8620
8621
8622cat >>confdefs.h <<_ACEOF
8623#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8624_ACEOF
8625
8626
Michael W. Hudson54241132001-12-07 15:38:26 +00008627
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8629$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008630have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008632/* end confdefs.h. */
8633
8634int
8635main ()
8636{
8637long double x; x = (long double)0;
8638 ;
8639 return 0;
8640}
8641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008642if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643
8644
Matthias Kloseb9621712010-04-24 17:59:49 +00008645$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008646
8647 have_long_double=yes
8648
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008649fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8652$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008653if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8659$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 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 +00008664
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_long_double" = yes; then
8667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008671 else
8672 ac_cv_sizeof_long_double=0
8673 fi
8674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8678$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008679
8680
8681
8682cat >>confdefs.h <<_ACEOF
8683#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8684_ACEOF
8685
8686
8687fi
8688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689# The cast to long int works around a bug in the HP C Compiler
8690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8692# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8694$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008695if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 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 +00008699
Thomas Woutersb2137042007-02-01 18:02:27 +00008700else
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 if test "$ac_cv_type__Bool" = yes; then
8702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008704as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008705See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706 else
8707 ac_cv_sizeof__Bool=0
8708 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008710
Thomas Woutersb2137042007-02-01 18:02:27 +00008711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8713$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714
8715
8716
Thomas Woutersb2137042007-02-01 18:02:27 +00008717cat >>confdefs.h <<_ACEOF
8718#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8719_ACEOF
8720
8721
Thomas Woutersb2137042007-02-01 18:02:27 +00008722
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008723# The cast to long int works around a bug in the HP C Compiler
8724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8726# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8728$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008729if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008733#ifdef HAVE_SYS_TYPES_H
8734#include <sys/types.h>
8735#endif
8736
Matthias Kloseb9621712010-04-24 17:59:49 +00008737"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008738
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 if test "$ac_cv_type_off_t" = yes; then
8741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008743as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008744See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008745 else
8746 ac_cv_sizeof_off_t=0
8747 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008749
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8752$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754
8755
Martin v. Löwis11437992002-04-12 09:54:03 +00008756cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008757#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008758_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008759
Michael W. Hudson54241132001-12-07 15:38:26 +00008760
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8763$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008764if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008765 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8770$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8773$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008774fi
8775
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008776# The cast to long int works around a bug in the HP C Compiler
8777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8781$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008782if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008786#ifdef HAVE_SYS_TYPES_H
8787#include <sys/types.h>
8788#endif
8789#ifdef HAVE_TIME_H
8790#include <time.h>
8791#endif
8792
Matthias Kloseb9621712010-04-24 17:59:49 +00008793"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008794
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 if test "$ac_cv_type_time_t" = yes; then
8797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008799as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008800See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008801 else
8802 ac_cv_sizeof_time_t=0
8803 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8808$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810
8811
Martin v. Löwis11437992002-04-12 09:54:03 +00008812cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008813#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008814_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008815
Michael W. Hudson54241132001-12-07 15:38:26 +00008816
8817
Trent Mick635f6fb2000-08-23 21:33:05 +00008818# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008819ac_save_cc="$CC"
8820if test "$ac_cv_kpthread" = "yes"
8821then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008822elif test "$ac_cv_kthread" = "yes"
8823then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008824elif test "$ac_cv_pthread" = "yes"
8825then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008826fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8829$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008830have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008833
8834 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008835int
8836main ()
8837{
Guido van Rossum12580492000-09-24 16:47:19 +00008838pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ;
8840 return 0;
8841}
Matthias Kloseb159a552010-04-25 21:00:44 +00008842
Martin v. Löwis11437992002-04-12 09:54:03 +00008843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008844if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008845 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8849$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008850if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8853# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8854# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8856$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008857if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861#ifdef HAVE_PTHREAD_H
8862#include <pthread.h>
8863#endif
8864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008867else
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 if test "$ac_cv_type_pthread_t" = yes; then
8869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008871as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008872See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873 else
8874 ac_cv_sizeof_pthread_t=0
8875 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877
Trent Mick635f6fb2000-08-23 21:33:05 +00008878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8880$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008882
8883
Martin v. Löwis11437992002-04-12 09:54:03 +00008884cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008885#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008887
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888
Trent Mick635f6fb2000-08-23 21:33:05 +00008889fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008890
8891# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8892# This checking will be unnecessary after removing deprecated TLS API.
8893# The cast to long int works around a bug in the HP C Compiler
8894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8896# This bug is HP SR number 8606223364.
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8898$as_echo_n "checking size of pthread_key_t... " >&6; }
8899if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8900 $as_echo_n "(cached) " >&6
8901else
8902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8903"; then :
8904
8905else
8906 if test "$ac_cv_type_pthread_key_t" = yes; then
8907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8909as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8910See \`config.log' for more details" "$LINENO" 5; }
8911 else
8912 ac_cv_sizeof_pthread_key_t=0
8913 fi
8914fi
8915
8916fi
8917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8918$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8919
8920
8921
8922cat >>confdefs.h <<_ACEOF
8923#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8924_ACEOF
8925
8926
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8928$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8929if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8931/* end confdefs.h. */
8932#include <pthread.h>
8933int
8934main ()
8935{
8936pthread_key_t k; k * 1;
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941if ac_fn_c_try_compile "$LINENO"; then :
8942 ac_pthread_key_t_is_arithmetic_type=yes
8943else
8944 ac_pthread_key_t_is_arithmetic_type=no
8945
8946fi
8947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8949$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8950 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8951
8952$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8953
8954 fi
8955else
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8957$as_echo "no" >&6; }
8958fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008959CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008960
Michael W. Hudson54241132001-12-07 15:38:26 +00008961
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008962case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008963 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008964 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8965 ;;
8966 Darwin/*)
8967 OTHER_LIBTOOL_OPT=""
8968 ;;
8969esac
8970
8971
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008972
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008973case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008974 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008975 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8976 if test "${enable_universalsdk}"; then
8977 :
8978 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008979 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008980 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008981 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008982 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008983 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008984 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008985 if test ${gcc_version} '<' 4.0
8986 then
8987 LIBTOOL_CRUFT="-lcc_dynamic"
8988 else
8989 LIBTOOL_CRUFT=""
8990 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008992 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008993else
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008995/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008996
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997 #include <unistd.h>
8998 int main(int argc, char*argv[])
8999 {
9000 if (sizeof(long) == 4) {
9001 return 0;
9002 } else {
9003 return 1;
9004 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009005 }
9006
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009008if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009009 ac_osx_32bit=yes
9010else
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015fi
9016
9017
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009019 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020 i386)
9021 MACOSX_DEFAULT_ARCH="i386"
9022 ;;
9023 ppc)
9024 MACOSX_DEFAULT_ARCH="ppc"
9025 ;;
9026 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009027 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009028 ;;
9029 esac
9030 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009031 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032 i386)
9033 MACOSX_DEFAULT_ARCH="x86_64"
9034 ;;
9035 ppc)
9036 MACOSX_DEFAULT_ARCH="ppc64"
9037 ;;
9038 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009039 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040 ;;
9041 esac
9042
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 fi
9044
9045 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009046 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009047 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009048esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9050$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009051if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009052then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009053 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009055 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009056
Matthias Kloseb9621712010-04-24 17:59:49 +00009057$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9060$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009061 if test $enable_shared = "yes"
9062 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009063 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 +00009064 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009065else
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9067$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009068fi
9069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9071$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009072case $ac_sys_system/$ac_sys_release in
9073 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9078$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009079 ;;
9080 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9082$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009083 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009084esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009085
Guido van Rossum0a516c91994-09-12 10:58:40 +00009086# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009087
Michael W. Hudson54241132001-12-07 15:38:26 +00009088
9089
9090
9091
Benjamin Peterson99f03762010-04-11 22:15:28 +00009092
Thomas Wouters477c8d52006-05-27 19:21:47 +00009093
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009094# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9095# -- usually .so, .sl on HP-UX, .dll on Cygwin
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9097$as_echo_n "checking the extension of shared libraries... " >&6; }
9098if test -z "$SHLIB_SUFFIX"; then
9099 case $ac_sys_system in
9100 hp*|HP*)
9101 case `uname -m` in
9102 ia64) SHLIB_SUFFIX=.so;;
9103 *) SHLIB_SUFFIX=.sl;;
9104 esac
9105 ;;
9106 CYGWIN*) SHLIB_SUFFIX=.dll;;
9107 *) SHLIB_SUFFIX=.so;;
9108 esac
9109fi
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9111$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009112
Guido van Rossum0a516c91994-09-12 10:58:40 +00009113# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009114# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009115# (Shared libraries in this instance are shared modules to be loaded into
9116# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9118$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009119if test -z "$LDSHARED"
9120then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009121 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009122 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009123 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009124 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009125 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009127 if test "$GCC" = "yes" ; then
9128 LDSHARED='$(CC) -shared'
9129 LDCXXSHARED='$(CXX) -shared'
9130 else
9131 LDSHARED='$(CC) -G'
9132 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009133 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009134 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009135 if test "$GCC" = "yes" ; then
9136 LDSHARED='$(CC) -shared'
9137 LDCXXSHARED='$(CXX) -shared'
9138 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009139 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009140 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009141 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009142 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009143 LDSHARED='$(CC) -bundle'
9144 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009145 if test "$enable_framework" ; then
9146 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009147 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9148 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009149 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009150 else
9151 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009152 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009153 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009154 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009155 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009156 LDSHARED='$(CC) -bundle'
9157 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009158 if test "$enable_framework" ; then
9159 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009160 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9161 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009163 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009164 # No framework, use the Python app as bundle-loader
9165 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009166 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009167 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009168 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009169 Darwin/*)
9170 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9171 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009172
Ned Deily36820b62014-06-25 13:44:22 -07009173 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9174 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9175 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9176 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9177 if test ${dep_target_major} -eq 10 && \
9178 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009179 then
Ned Deily36820b62014-06-25 13:44:22 -07009180 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009181 LDSHARED='$(CC) -bundle'
9182 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009183 if test "$enable_framework" ; then
9184 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009185 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9186 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009187 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009188 else
9189 # No framework, use the Python app as bundle-loader
9190 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9191 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009193 fi
Ned Deily36820b62014-06-25 13:44:22 -07009194 else
9195 # building for OS X 10.3 and later
9196 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9197 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9198 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009199 fi
9200 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009201 Linux*|GNU*|QNX*)
9202 LDSHARED='$(CC) -shared'
9203 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009204 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009205 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009206 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -shared'
9208 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009209 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009210 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009211 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009212 OpenBSD*)
9213 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9214 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009215 LDSHARED='$(CC) -shared $(CCSHARED)'
9216 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009217 else
9218 case `uname -r` in
9219 [01].* | 2.[0-7] | 2.[0-7].*)
9220 LDSHARED="ld -Bshareable ${LDFLAGS}"
9221 ;;
9222 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009223 LDSHARED='$(CC) -shared $(CCSHARED)'
9224 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009225 ;;
9226 esac
9227 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009228 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009229 LDSHARED='$(CC) -shared'
9230 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009231 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232 if test "$GCC" = "yes" ; then
9233 LDSHARED='$(CC) -shared'
9234 LDCXXSHARED='$(CXX) -shared'
9235 else
9236 LDSHARED='$(CC) -G'
9237 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009238 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009239 SCO_SV*)
9240 LDSHARED='$(CC) -Wl,-G,-Bexport'
9241 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9242 CYGWIN*)
9243 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9244 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245 *) LDSHARED="ld";;
9246 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9249$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009250LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009251BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009252# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009253# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9255$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256if test -z "$CCSHARED"
9257then
Guido van Rossum07397971997-04-29 21:49:50 +00009258 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009259 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009260 then CCSHARED="-fPIC";
9261 elif test `uname -p` = sparc;
9262 then CCSHARED="-xcode=pic32";
9263 else CCSHARED="-Kpic";
9264 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009265 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009266 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009267 else CCSHARED="+z";
9268 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009269 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009270 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009271 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009272 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009273 if test "$GCC" = "yes"
9274 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009275 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009276 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009277 SCO_SV*)
9278 if test "$GCC" = "yes"
9279 then CCSHARED="-fPIC"
9280 else CCSHARED="-Kpic -belf"
9281 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009282 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9285$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009286# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009287# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9289$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009290if test -z "$LINKFORSHARED"
9291then
Guido van Rossum07397971997-04-29 21:49:50 +00009292 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009293 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009294 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009295 LINKFORSHARED="-Wl,-E -Wl,+s";;
9296# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009297 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009298 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009299 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009301 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009302
9303 # Issue #18075: the default maximum stack size (8MBytes) is too
9304 # small for the default recursion limit. Increase the stack size
9305 # to ensure that tests don't crash
9306 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9307
Jack Jansene578a632001-08-15 01:27:14 +00009308 if test "$enable_framework"
9309 then
Jack Jansenda49e192005-01-07 13:08:22 +00009310 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009311 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009312 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009313 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009314 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009315 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009316 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009317 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9318 then
9319 LINKFORSHARED="-Wl,--export-dynamic"
9320 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009321 SunOS/5*) case $CC in
9322 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009323 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009324 then
9325 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009326 fi;;
9327 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009328 CYGWIN*)
9329 if test $enable_shared = "no"
9330 then
9331 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9332 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009333 QNX*)
9334 # -Wl,-E causes the symbols to be added to the dynamic
9335 # symbol table so that they can be found when a module
9336 # is loaded. -N 2048K causes the stack size to be set
9337 # to 2048 kilobytes so that the stack doesn't overflow
9338 # when running test_compile.py.
9339 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9343$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344
Michael W. Hudson54241132001-12-07 15:38:26 +00009345
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9348$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009349if test ! "$LIBRARY" = "$LDLIBRARY"
9350then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009351 case $ac_sys_system in
9352 CYGWIN*)
9353 # Cygwin needs CCSHARED when building extension DLLs
9354 # but not when building the interpreter DLL.
9355 CFLAGSFORSHARED='';;
9356 *)
9357 CFLAGSFORSHARED='$(CCSHARED)'
9358 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9361$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009362
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009363# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9364# library (with --enable-shared).
9365# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009366# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9367# if it is not required, since it creates a dependency of the shared library
9368# to LIBS. This, in turn, means that applications linking the shared libpython
9369# don't need to link LIBS explicitly. The default should be only changed
9370# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9373$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009374case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009375 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009376 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009377esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9379$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009380
9381
Guido van Rossum627b2d71993-12-24 10:39:16 +00009382# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9384$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009385if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009386 $as_echo_n "(cached) " >&6
9387else
9388 ac_check_lib_save_LIBS=$LIBS
9389LIBS="-lsendfile $LIBS"
9390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391/* end confdefs.h. */
9392
9393/* Override any GCC internal prototype to avoid an error.
9394 Use char because int might match the return type of a GCC
9395 builtin and then its argument prototype would still apply. */
9396#ifdef __cplusplus
9397extern "C"
9398#endif
9399char sendfile ();
9400int
9401main ()
9402{
9403return sendfile ();
9404 ;
9405 return 0;
9406}
9407_ACEOF
9408if ac_fn_c_try_link "$LINENO"; then :
9409 ac_cv_lib_sendfile_sendfile=yes
9410else
9411 ac_cv_lib_sendfile_sendfile=no
9412fi
9413rm -f core conftest.err conftest.$ac_objext \
9414 conftest$ac_exeext conftest.$ac_ext
9415LIBS=$ac_check_lib_save_LIBS
9416fi
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9418$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009419if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009420 cat >>confdefs.h <<_ACEOF
9421#define HAVE_LIBSENDFILE 1
9422_ACEOF
9423
9424 LIBS="-lsendfile $LIBS"
9425
9426fi
9427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9429$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009430if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432else
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009434LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438/* Override any GCC internal prototype to avoid an error.
9439 Use char because int might match the return type of a GCC
9440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#ifdef __cplusplus
9442extern "C"
9443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009444char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009445int
9446main ()
9447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ;
9450 return 0;
9451}
9452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009460LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9463$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 cat >>confdefs.h <<_ACEOF
9466#define HAVE_LIBDL 1
9467_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009468
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009471fi
9472 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9474$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009475if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009477else
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009479LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483/* Override any GCC internal prototype to avoid an error.
9484 Use char because int might match the return type of a GCC
9485 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009486#ifdef __cplusplus
9487extern "C"
9488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009489char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009490int
9491main ()
9492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 ;
9495 return 0;
9496}
9497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009500else
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009503rm -f core conftest.err conftest.$ac_objext \
9504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009505LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9508$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009509if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 cat >>confdefs.h <<_ACEOF
9511#define HAVE_LIBDLD 1
9512_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009513
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009514 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009516fi
9517 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009518
Michael Felt0d3ccb42017-12-30 22:39:20 +01009519# checks for uuid.h location
9520for ac_header in uuid/uuid.h uuid.h
9521do :
9522 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9523ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9524if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9525 cat >>confdefs.h <<_ACEOF
9526#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9527_ACEOF
9528
9529fi
9530
9531done
9532
9533
Berker Peksag9a10ff42017-11-08 23:09:16 +03009534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9535$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9537/* end confdefs.h. */
9538#include <uuid/uuid.h>
9539int
9540main ()
9541{
9542
9543#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009544void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009545#endif
9546
9547 ;
9548 return 0;
9549}
9550_ACEOF
9551if ac_fn_c_try_compile "$LINENO"; then :
9552
9553$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9554
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9556$as_echo "yes" >&6; }
9557else
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9559$as_echo "no" >&6; }
9560
9561fi
9562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9563
Michael Felt0d3ccb42017-12-30 22:39:20 +01009564# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RFC4122 - uuid support on AIX" >&5
9566$as_echo_n "checking for RFC4122 - uuid support on AIX... " >&6; }
9567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9568/* end confdefs.h. */
9569#include <uuid.h>
9570int
9571main ()
9572{
9573
9574#ifndef uuid_create
9575void *x = uuid_create
9576#endif
9577
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582if ac_fn_c_try_compile "$LINENO"; then :
9583
9584$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9585
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9587$as_echo "yes" >&6; }
9588else
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9590$as_echo "no" >&6; }
9591
9592fi
9593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9594
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009595# 'Real Time' functions on Solaris
9596# posix4 on Solaris 2.6
9597# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009599$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009602else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009603 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607/* Override any GCC internal prototype to avoid an error.
9608 Use char because int might match the return type of a GCC
9609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009610#ifdef __cplusplus
9611extern "C"
9612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009613char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009614int
9615main ()
9616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 ;
9619 return 0;
9620}
9621_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622for ac_lib in '' pthread rt posix4; do
9623 if test -z "$ac_lib"; then
9624 ac_res="none required"
9625 else
9626 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009627 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632rm -f core conftest.err conftest.$ac_objext \
9633 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009634 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637done
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640else
9641 ac_cv_search_sem_init=no
9642fi
9643rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009644LIBS=$ac_func_search_save_LIBS
9645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9647$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009651
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009652fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009653
Martin v. Löwis519adae2003-09-20 10:47:47 +00009654
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9657$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009658if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009660else
9661 ac_check_lib_save_LIBS=$LIBS
9662LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666/* Override any GCC internal prototype to avoid an error.
9667 Use char because int might match the return type of a GCC
9668 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009669#ifdef __cplusplus
9670extern "C"
9671#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009673int
9674main ()
9675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009677 ;
9678 return 0;
9679}
9680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009682 ac_cv_lib_intl_textdomain=yes
9683else
Matthias Kloseb9621712010-04-24 17:59:49 +00009684 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009686rm -f core conftest.err conftest.$ac_objext \
9687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009688LIBS=$ac_check_lib_save_LIBS
9689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9691$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009692if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009695
Brett Cannonc6d936e2009-06-07 20:09:53 +00009696 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009697fi
9698
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009699
9700# checks for system dependent C++ extensions support
9701case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009702 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9703$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009705/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009706
Georg Brandl59e87bd2011-02-15 19:48:59 +00009707 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009708int
9709main ()
9710{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009711loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ;
9713 return 0;
9714}
Matthias Kloseb159a552010-04-25 21:00:44 +00009715
Martin v. Löwis11437992002-04-12 09:54:03 +00009716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009717if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009718
Matthias Kloseb159a552010-04-25 21:00:44 +00009719
Matthias Kloseb9621712010-04-24 17:59:49 +00009720$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009721
Matthias Kloseb159a552010-04-25 21:00:44 +00009722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009723$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009724
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009725else
Matthias Kloseb159a552010-04-25 21:00:44 +00009726
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009728$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009729
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009731rm -f core conftest.err conftest.$ac_objext \
9732 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009733 *) ;;
9734esac
9735
Christian Heimes985ecdc2013-11-20 11:46:18 +01009736# check for systems that require aligned memory access
9737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9738$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009739if ${ac_cv_aligned_required+:} false; then :
9740 $as_echo_n "(cached) " >&6
9741else
9742 if test "$cross_compiling" = yes; then :
9743 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009744else
9745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9746/* end confdefs.h. */
9747
9748int main()
9749{
9750 char s[16];
9751 int i, *p1, *p2;
9752 for (i=0; i < 16; i++)
9753 s[i] = i;
9754 p1 = (int*)(s+1);
9755 p2 = (int*)(s+2);
9756 if (*p1 == *p2)
9757 return 1;
9758 return 0;
9759}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009760_ACEOF
9761if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009762 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009763else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009764 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009765fi
9766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9767 conftest.$ac_objext conftest.beam conftest.$ac_ext
9768fi
9769
9770
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009771fi
9772
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9774$as_echo "$ac_cv_aligned_required" >&6; }
9775if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009776
9777$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9778
9779fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009780
9781# str, bytes and memoryview hash algorithm
9782
9783
9784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9785$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9786
9787# Check whether --with-hash_algorithm was given.
9788if test "${with_hash_algorithm+set}" = set; then :
9789 withval=$with_hash_algorithm;
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9791$as_echo "$withval" >&6; }
9792case "$withval" in
9793 siphash24)
9794 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9795
9796 ;;
9797 fnv)
9798 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9799
9800 ;;
9801 *)
9802 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9803 ;;
9804esac
9805
9806else
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9808$as_echo "default" >&6; }
9809fi
9810
9811
Charles-François Natalid30b0222014-05-08 23:08:51 +01009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9813$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9814
9815# Check whether --with-address_sanitizer was given.
9816if test "${with_address_sanitizer+set}" = set; then :
9817 withval=$with_address_sanitizer;
9818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9819$as_echo "$withval" >&6; }
9820BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9821LDFLAGS="-fsanitize=address $LDFLAGS"
9822
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826fi
9827
9828
Guido van Rossum70c7f481998-03-26 18:44:10 +00009829# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9831$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009832if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009834else
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009836LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840/* Override any GCC internal prototype to avoid an error.
9841 Use char because int might match the return type of a GCC
9842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009843#ifdef __cplusplus
9844extern "C"
9845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009846char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009847int
9848main ()
9849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ;
9852 return 0;
9853}
9854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009857else
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860rm -f core conftest.err conftest.$ac_objext \
9861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009862LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9865$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009866if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009867 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009868fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009869 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9871$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009872if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009874else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009876LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880/* Override any GCC internal prototype to avoid an error.
9881 Use char because int might match the return type of a GCC
9882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009883#ifdef __cplusplus
9884extern "C"
9885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009886char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009887int
9888main ()
9889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009890return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 ;
9892 return 0;
9893}
9894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009897else
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900rm -f core conftest.err conftest.$ac_objext \
9901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009902LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9905$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009906if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009907 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009908fi
9909 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009910
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9912$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009915if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9918$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009919LIBS="$withval $LIBS"
9920
9921else
Matthias Kloseb9621712010-04-24 17:59:49 +00009922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924fi
9925
Guido van Rossum7f43da71994-08-01 12:15:30 +00009926
Victor Stinner8291b5e2015-03-20 16:03:14 +01009927
9928
9929
9930
9931
9932
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009933
Victor Stinner8291b5e2015-03-20 16:03:14 +01009934if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9935 if test -n "$ac_tool_prefix"; then
9936 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9937set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9939$as_echo_n "checking for $ac_word... " >&6; }
9940if ${ac_cv_path_PKG_CONFIG+:} false; then :
9941 $as_echo_n "(cached) " >&6
9942else
9943 case $PKG_CONFIG in
9944 [\\/]* | ?:[\\/]*)
9945 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9946 ;;
9947 *)
9948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9949for as_dir in $PATH
9950do
9951 IFS=$as_save_IFS
9952 test -z "$as_dir" && as_dir=.
9953 for ac_exec_ext in '' $ac_executable_extensions; do
9954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9955 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9957 break 2
9958 fi
9959done
9960 done
9961IFS=$as_save_IFS
9962
9963 ;;
9964esac
9965fi
9966PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9967if test -n "$PKG_CONFIG"; then
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9969$as_echo "$PKG_CONFIG" >&6; }
9970else
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973fi
9974
9975
9976fi
9977if test -z "$ac_cv_path_PKG_CONFIG"; then
9978 ac_pt_PKG_CONFIG=$PKG_CONFIG
9979 # Extract the first word of "pkg-config", so it can be a program name with args.
9980set dummy pkg-config; ac_word=$2
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982$as_echo_n "checking for $ac_word... " >&6; }
9983if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9984 $as_echo_n "(cached) " >&6
9985else
9986 case $ac_pt_PKG_CONFIG in
9987 [\\/]* | ?:[\\/]*)
9988 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9989 ;;
9990 *)
9991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992for as_dir in $PATH
9993do
9994 IFS=$as_save_IFS
9995 test -z "$as_dir" && as_dir=.
9996 for ac_exec_ext in '' $ac_executable_extensions; do
9997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9998 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10000 break 2
10001 fi
10002done
10003 done
10004IFS=$as_save_IFS
10005
10006 ;;
10007esac
10008fi
10009ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10010if test -n "$ac_pt_PKG_CONFIG"; then
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10012$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10013else
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10015$as_echo "no" >&6; }
10016fi
10017
10018 if test "x$ac_pt_PKG_CONFIG" = x; then
10019 PKG_CONFIG=""
10020 else
10021 case $cross_compiling:$ac_tool_warned in
10022yes:)
10023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10025ac_tool_warned=yes ;;
10026esac
10027 PKG_CONFIG=$ac_pt_PKG_CONFIG
10028 fi
10029else
10030 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10031fi
10032
10033fi
10034if test -n "$PKG_CONFIG"; then
10035 _pkg_min_version=0.9.0
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10037$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10038 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10040$as_echo "yes" >&6; }
10041 else
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044 PKG_CONFIG=""
10045 fi
10046fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010047
10048# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10050$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010051
10052# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010054 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010055else
10056 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010057fi
10058
10059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10061$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010062
10063# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10065$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010066
10067# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010069 withval=$with_system_ffi;
10070fi
10071
10072
Zachary Waref40d4dd2016-09-17 01:25:24 -050010073if test "$ac_sys_system" = "Darwin"
10074then
10075 case "$with_system_ffi" in
10076 "")
10077 with_system_ffi="no"
10078 ;;
10079 yes|no)
10080 ;;
10081 *)
10082 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10083 ;;
10084 esac
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10086$as_echo "$with_system_ffi" >&6; }
10087else
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10089$as_echo "yes" >&6; }
10090 if test "$with_system_ffi" != ""
10091 then
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10093$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10094 fi
10095 with_system_ffi="yes"
10096fi
Zachary Ware935043d2016-09-09 17:01:21 -070010097
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010098if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010099 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10100else
10101 LIBFFI_INCLUDEDIR=""
10102fi
10103
10104
Stefan Krah60187b52012-03-23 19:06:27 +010010105# Check for use of the system libmpdec library
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10107$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10108
10109# Check whether --with-system_libmpdec was given.
10110if test "${with_system_libmpdec+set}" = set; then :
10111 withval=$with_system_libmpdec;
10112else
10113 with_system_libmpdec="no"
10114fi
10115
10116
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10118$as_echo "$with_system_libmpdec" >&6; }
10119
Benjamin Peterson076ed002010-10-31 17:11:02 +000010120# Check for support for loadable sqlite extensions
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10122$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10123# Check whether --enable-loadable-sqlite-extensions was given.
10124if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10125 enableval=$enable_loadable_sqlite_extensions;
10126else
10127 enable_loadable_sqlite_extensions="no"
10128fi
10129
10130
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10132$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10133
Ned Deilyd819b932013-09-06 01:07:05 -070010134# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10135
10136
10137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10138$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10139
10140# Check whether --with-tcltk-includes was given.
10141if test "${with_tcltk_includes+set}" = set; then :
10142 withval=$with_tcltk_includes;
10143else
10144 with_tcltk_includes="default"
10145fi
10146
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10148$as_echo "$with_tcltk_includes" >&6; }
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10150$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10151
10152# Check whether --with-tcltk-libs was given.
10153if test "${with_tcltk_libs+set}" = set; then :
10154 withval=$with_tcltk_libs;
10155else
10156 with_tcltk_libs="default"
10157fi
10158
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10160$as_echo "$with_tcltk_libs" >&6; }
10161if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10162then
10163 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10164 then
10165 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10166 fi
10167 TCLTK_INCLUDES=""
10168 TCLTK_LIBS=""
10169else
10170 TCLTK_INCLUDES="$with_tcltk_includes"
10171 TCLTK_LIBS="$with_tcltk_libs"
10172fi
10173
Matthias Klose55708cc2009-04-30 08:06:49 +000010174# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10176$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010177
10178# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010179if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010180 withval=$with_dbmliborder;
10181if test x$with_dbmliborder = xyes
10182then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010183as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010184else
10185 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10186 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10187 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010188 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010189 fi
10190 done
10191fi
10192fi
10193
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10195$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
10199# Templates for things AC_DEFINEd more than once.
10200# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010201
10202
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010203if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010204then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010207
10208 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010209elif test "$ac_cv_kpthread" = "yes"
10210then
10211 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010212 if test "$ac_cv_cxx_thread" = "yes"; then
10213 CXX="$CXX -Kpthread"
10214 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010215 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010216elif test "$ac_cv_kthread" = "yes"
10217then
10218 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010219 if test "$ac_cv_cxx_thread" = "yes"; then
10220 CXX="$CXX -Kthread"
10221 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010222 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010223elif test "$ac_cv_pthread" = "yes"
10224then
10225 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010226 if test "$ac_cv_cxx_thread" = "yes"; then
10227 CXX="$CXX -pthread"
10228 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010229 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010230else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010231 if test ! -z "$withval" -a -d "$withval"
10232 then LDFLAGS="$LDFLAGS -L$withval"
10233 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010234
10235 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010236 # define _POSIX_THREADS in unistd.h. Some apparently don't
10237 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10239$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010241/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010242
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010243#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010244#ifdef _POSIX_THREADS
10245yes
10246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
10248_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251 unistd_defines_pthreads=yes
10252else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010253 unistd_defines_pthreads=no
10254fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010255rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010256
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10258$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010259
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010261
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010262 # Just looking for pthread_create in libpthread is not enough:
10263 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10264 # So we really have to include pthread.h, and then link.
10265 _libs=$LIBS
10266 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10268$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010271
10272#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010273#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010274
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010275void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010276int
10277main ()
10278{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010279
10280pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 ;
10282 return 0;
10283}
10284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10288$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010289 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010290
Guido van Rossum02a1c402000-02-25 19:26:31 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010293 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010295if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010296
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010297 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010298
Guido van Rossumad678af1998-10-02 14:42:15 +000010299else
Guido van Rossumad678af1998-10-02 14:42:15 +000010300
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10302$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010303if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010307LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311/* Override any GCC internal prototype to avoid an error.
10312 Use char because int might match the return type of a GCC
10313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314#ifdef __cplusplus
10315extern "C"
10316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010317char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010318int
10319main ()
10320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010328else
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010331rm -f core conftest.err conftest.$ac_objext \
10332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010333LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10336$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010337if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010338
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010339 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010340 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010341
Greg Steinadf63d62000-07-05 10:38:09 +000010342else
Greg Steinadf63d62000-07-05 10:38:09 +000010343
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10345$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010346if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010348else
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010350LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354/* Override any GCC internal prototype to avoid an error.
10355 Use char because int might match the return type of a GCC
10356 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010357#ifdef __cplusplus
10358extern "C"
10359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010360char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010361int
10362main ()
10363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010371else
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010374rm -f core conftest.err conftest.$ac_objext \
10375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10379$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010380if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010381
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010382 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010383 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010384
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010385else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10388$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010391else
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010393LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397/* Override any GCC internal prototype to avoid an error.
10398 Use char because int might match the return type of a GCC
10399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010400#ifdef __cplusplus
10401extern "C"
10402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010403char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010404int
10405main ()
10406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010414else
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010419LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10422$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010423if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010424
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010425 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010426 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010427
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010428else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10431$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010434else
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010436LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440/* Override any GCC internal prototype to avoid an error.
10441 Use char because int might match the return type of a GCC
10442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010446char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010447int
10448main ()
10449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ;
10452 return 0;
10453}
10454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010460rm -f core conftest.err conftest.$ac_objext \
10461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010462LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10465$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010466if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010467
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010468 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010469 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010470
Guido van Rossumb93a8621998-05-07 13:27:32 +000010471else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010472
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010473 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10474
Guido van Rossum2d38f911996-06-26 19:47:01 +000010475fi
10476
Guido van Rossum627b2d71993-12-24 10:39:16 +000010477
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010478fi
10479
Guido van Rossum0be3e491997-05-22 20:33:33 +000010480fi
10481
Guido van Rossum49545951997-12-02 19:28:29 +000010482fi
10483
Guido van Rossumb93a8621998-05-07 13:27:32 +000010484fi
10485
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010487rm -f core conftest.err conftest.$ac_objext \
10488 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10491$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010492if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010494else
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010496LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500/* Override any GCC internal prototype to avoid an error.
10501 Use char because int might match the return type of a GCC
10502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010503#ifdef __cplusplus
10504extern "C"
10505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010506char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010507int
10508main ()
10509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ;
10512 return 0;
10513}
10514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010517else
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520rm -f core conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010522LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10525$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010526if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010527
Martin v. Löwis130fb172001-07-19 11:00:41 +000010528 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010529
Guido van Rossum627b2d71993-12-24 10:39:16 +000010530fi
10531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010532
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535if test "$posix_threads" = "yes"; then
10536 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010537
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010539
10540 fi
10541
10542 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10543 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010544 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010546
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010547 ;;
10548 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010549$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010550
10551 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010552 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010553$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010554
10555 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010556 esac
10557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10559$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010560 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010562else
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010564 ac_cv_pthread_system_supported=no
10565else
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010568
10569 #include <stdio.h>
10570 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010571 void *foo(void *parm) {
10572 return NULL;
10573 }
10574 main() {
10575 pthread_attr_t attr;
10576 pthread_t id;
10577 if (pthread_attr_init(&attr)) exit(-1);
10578 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10579 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10580 exit(0);
10581 }
10582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584 ac_cv_pthread_system_supported=yes
10585else
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010590fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592
Guido van Rossum627b2d71993-12-24 10:39:16 +000010593fi
10594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10596$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597 if test "$ac_cv_pthread_system_supported" = "yes"; then
10598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600
10601 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 for ac_func in pthread_sigmask
10603do :
10604 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010605if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010607#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010608_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010609 case $ac_sys_system in
10610 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010611
Matthias Kloseb9621712010-04-24 17:59:49 +000010612$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010613
10614 ;;
10615 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010616fi
10617done
10618
pdoxe14679c2017-10-05 00:01:56 -070010619 for ac_func in pthread_getcpuclockid
10620do :
10621 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10622if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10623 cat >>confdefs.h <<_ACEOF
10624#define HAVE_PTHREAD_GETCPUCLOCKID 1
10625_ACEOF
10626
10627fi
10628done
10629
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630fi
10631
10632
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010633# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010634
Matthias Kloseb9621712010-04-24 17:59:49 +000010635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10636$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010638if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643 ipv6=no
10644 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010645 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10646$as_echo "yes" >&6; }
10647 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648
10649 ipv6=yes
10650 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010652else
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010656 /* AF_INET6 available check */
10657#include <sys/types.h>
10658#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010659int
10660main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010662int domain = AF_INET6;
10663 ;
10664 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665}
Martin v. Löwis11437992002-04-12 09:54:03 +000010666_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010667if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10670$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010672
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010673else
Matthias Kloseb159a552010-04-25 21:00:44 +000010674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10676$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010677 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010682if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10684$as_echo_n "checking if RFC2553 API is available... " >&6; }
10685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010686/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010687
10688 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010689#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010690int
10691main ()
10692{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010693struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010694 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ;
10696 return 0;
10697}
Matthias Kloseb159a552010-04-25 21:00:44 +000010698
Martin v. Löwis11437992002-04-12 09:54:03 +000010699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010701
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010704 ipv6=yes
10705
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010706else
Matthias Kloseb159a552010-04-25 21:00:44 +000010707
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010710 ipv6=no
10711
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010714fi
10715
10716if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010718
10719fi
10720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721fi
10722
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723
10724ipv6type=unknown
10725ipv6lib=none
10726ipv6trylibc=no
10727
10728if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10730$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010731 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10732 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733 case $i in
10734 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010736/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738#include <netinet/in.h>
10739#ifdef IPV6_INRIA_VERSION
10740yes
10741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010742_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010745 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010747rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748
10749 ;;
10750 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010752/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010753
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754#include <netinet/in.h>
10755#ifdef __KAME__
10756yes
10757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761 ipv6type=$i;
10762 ipv6lib=inet6
10763 ipv6libdir=/usr/local/v6/lib
10764 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010766rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767
10768 ;;
10769 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773#include <features.h>
10774#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10775yes
10776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010777_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780 ipv6type=$i;
10781 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010783rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784
10785 ;;
10786 linux-inet6)
10787 if test -d /usr/inet6; then
10788 ipv6type=$i
10789 ipv6lib=inet6
10790 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010791 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 fi
10793 ;;
10794 solaris)
10795 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010796 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 ipv6type=$i
10798 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799 fi
10800 fi
10801 ;;
10802 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010805
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806#include <sys/param.h>
10807#ifdef _TOSHIBA_INET6
10808yes
10809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813 ipv6type=$i;
10814 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010815 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010817rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818
10819 ;;
10820 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010822/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010823
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824#include </usr/local/v6/include/sys/v6config.h>
10825#ifdef __V6D__
10826yes
10827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010828_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831 ipv6type=$i;
10832 ipv6lib=v6;
10833 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010834 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010836rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837
10838 ;;
10839 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010841/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843#include <sys/param.h>
10844#ifdef _ZETA_MINAMI_INET6
10845yes
10846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850 ipv6type=$i;
10851 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010852 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010854rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855
10856 ;;
10857 esac
10858 if test "$ipv6type" != "unknown"; then
10859 break
10860 fi
10861 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10863$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864fi
10865
10866if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10867 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10868 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10869 echo "using lib$ipv6lib"
10870 else
10871 if test $ipv6trylibc = "yes"; then
10872 echo "using libc"
10873 else
10874 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10875 echo "You need to fetch lib$ipv6lib.a from appropriate"
10876 echo 'ipv6 kit and compile beforehand.'
10877 exit 1
10878 fi
10879 fi
10880fi
10881
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10883$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885/* end confdefs.h. */
10886 /* CAN_RAW_FD_FRAMES available check */
10887#include <linux/can/raw.h>
10888int
10889main ()
10890{
10891int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896if ac_fn_c_try_compile "$LINENO"; then :
10897
10898
10899$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10900
10901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10902$as_echo "yes" >&6; }
10903
10904else
10905
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908
10909fi
10910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10911
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010912# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10914$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918 withval=$with_doc_strings;
10919fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010920
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010921
10922if test -z "$with_doc_strings"
10923then with_doc_strings="yes"
10924fi
10925if test "$with_doc_strings" != "no"
10926then
10927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010929
10930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10932$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010933
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010934# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10936$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010939if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940 withval=$with_pymalloc;
10941fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010942
Neil Schemenauera35c6882001-02-27 04:45:05 +000010943
Neil Schemenauer16c22972002-03-22 15:34:49 +000010944if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010945then
10946 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010947fi
10948if test "$with_pymalloc" != "no"
10949then
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010952
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010953 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10956$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010957
Nick Coghlan6ea41862017-06-11 13:16:15 +100010958# Check for --with-c-locale-coercion
10959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10960$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10961
10962# Check whether --with-c-locale-coercion was given.
10963if test "${with_c_locale_coercion+set}" = set; then :
10964 withval=$with_c_locale_coercion;
10965fi
10966
10967
10968if test -z "$with_c_locale_coercion"
10969then
10970 with_c_locale_coercion="yes"
10971fi
10972if test "$with_c_locale_coercion" != "no"
10973then
10974
10975$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10976
10977fi
10978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10979$as_echo "$with_c_locale_coercion" >&6; }
10980
10981# Check for --with-c-locale-warning
10982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10983$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10984
10985# Check whether --with-c-locale-warning was given.
10986if test "${with_c_locale_warning+set}" = set; then :
10987 withval=$with_c_locale_warning;
10988fi
10989
10990
10991if test -z "$with_c_locale_warning"
10992then
10993 with_c_locale_warning="yes"
10994fi
10995if test "$with_c_locale_warning" != "no"
10996then
10997
10998$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10999
11000fi
11001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11002$as_echo "$with_c_locale_warning" >&6; }
11003
Benjamin Peterson05159c42009-12-03 03:01:27 +000011004# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11006$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011007
11008# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011009if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011010 withval=$with_valgrind;
11011else
11012 with_valgrind=no
11013fi
11014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11016$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011017if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 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 +020011019if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011022
11023else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011024 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011025
11026fi
11027
11028
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011029 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011030fi
11031
Łukasz Langaa785c872016-09-09 17:37:37 -070011032# Check for DTrace support
11033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11034$as_echo_n "checking for --with-dtrace... " >&6; }
11035
11036# Check whether --with-dtrace was given.
11037if test "${with_dtrace+set}" = set; then :
11038 withval=$with_dtrace;
11039else
11040 with_dtrace=no
11041fi
11042
11043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11044$as_echo "$with_dtrace" >&6; }
11045
11046
11047
11048
11049
11050DTRACE=
11051DFLAGS=
11052DTRACE_HEADERS=
11053DTRACE_OBJS=
11054
11055if test "$with_dtrace" = "yes"
11056then
11057 # Extract the first word of "dtrace", so it can be a program name with args.
11058set dummy dtrace; ac_word=$2
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11060$as_echo_n "checking for $ac_word... " >&6; }
11061if ${ac_cv_path_DTRACE+:} false; then :
11062 $as_echo_n "(cached) " >&6
11063else
11064 case $DTRACE in
11065 [\\/]* | ?:[\\/]*)
11066 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11067 ;;
11068 *)
11069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11070for as_dir in $PATH
11071do
11072 IFS=$as_save_IFS
11073 test -z "$as_dir" && as_dir=.
11074 for ac_exec_ext in '' $ac_executable_extensions; do
11075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11076 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11078 break 2
11079 fi
11080done
11081 done
11082IFS=$as_save_IFS
11083
11084 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11085 ;;
11086esac
11087fi
11088DTRACE=$ac_cv_path_DTRACE
11089if test -n "$DTRACE"; then
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11091$as_echo "$DTRACE" >&6; }
11092else
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
11095fi
11096
11097
11098 if test "$DTRACE" = "not found"; then
11099 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11100 fi
11101
11102$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11103
11104 DTRACE_HEADERS="Include/pydtrace_probes.h"
11105
11106 # On OS X, DTrace providers do not need to be explicitly compiled and
11107 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11108 # generation flag '-G'. We check for presence of this flag, rather than
11109 # hardcoding support by OS, in the interest of robustness.
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11111$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11112if ${ac_cv_dtrace_link+:} false; then :
11113 $as_echo_n "(cached) " >&6
11114else
11115 ac_cv_dtrace_link=no
11116 echo 'BEGIN' > conftest.d
11117 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11118 ac_cv_dtrace_link=yes
11119
11120fi
11121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11122$as_echo "$ac_cv_dtrace_link" >&6; }
11123 if test "$ac_cv_dtrace_link" = "yes"; then
11124 DTRACE_OBJS="Python/pydtrace.o"
11125 fi
11126fi
11127
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011128# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011129
Guido van Rossum98935bf2001-09-05 19:13:16 +000011130DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011131
Guido van Rossume97ee181999-12-20 21:27:22 +000011132# the dlopen() function means we might want to use dynload_shlib.o. some
11133# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011134for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011135do :
11136 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011137if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011139#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011141
Guido van Rossume97ee181999-12-20 21:27:22 +000011142fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011143done
Guido van Rossume97ee181999-12-20 21:27:22 +000011144
Michael W. Hudson54241132001-12-07 15:38:26 +000011145
Guido van Rossume97ee181999-12-20 21:27:22 +000011146# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11147# loading of modules.
11148
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11150$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011151if test -z "$DYNLOADFILE"
11152then
11153 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011154 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11155 if test "$ac_cv_func_dlopen" = yes
11156 then DYNLOADFILE="dynload_shlib.o"
11157 else DYNLOADFILE="dynload_aix.o"
11158 fi
11159 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011160 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011161 *)
11162 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11163 # out any dynamic loading
11164 if test "$ac_cv_func_dlopen" = yes
11165 then DYNLOADFILE="dynload_shlib.o"
11166 else DYNLOADFILE="dynload_stub.o"
11167 fi
11168 ;;
11169 esac
11170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11172$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011173if test "$DYNLOADFILE" != "dynload_stub.o"
11174then
Martin v. Löwis11437992002-04-12 09:54:03 +000011175
Matthias Kloseb9621712010-04-24 17:59:49 +000011176$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011177
11178fi
11179
Neil Schemenauer4e425612001-06-19 15:44:15 +000011180# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11181
Michael W. Hudson54241132001-12-07 15:38:26 +000011182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11184$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011185if test -z "$MACHDEP_OBJS"
11186then
Jack Jansene578a632001-08-15 01:27:14 +000011187 MACHDEP_OBJS=$extra_machdep_objs
11188else
11189 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011190fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011191if test -z "$MACHDEP_OBJS"; then
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11193$as_echo "none" >&6; }
11194else
11195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11196$as_echo "$MACHDEP_OBJS" >&6; }
11197fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011198
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011200for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011201 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011202 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011203 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011204 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011205 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011206 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011207 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011208 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011209 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011210 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011211 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011212 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011213 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011214 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011215 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11216 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011217 sigaction sigaltstack siginterrupt sigpending sigrelse \
11218 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011219 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011220 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011221 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011222do :
11223 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11224ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011225if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011227#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011229
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011230fi
11231done
11232
Michael W. Hudson54241132001-12-07 15:38:26 +000011233
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011234ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11235 #include <dirent.h>
11236"
11237if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11238
11239$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11240
11241fi
11242
11243
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244# For some functions, having a definition is not sufficient, since
11245# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11247$as_echo_n "checking for chroot... " >&6; }
11248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011249/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011251int
11252main ()
11253{
11254void *x=chroot
11255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011260
Matthias Kloseb9621712010-04-24 17:59:49 +000011261$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262
Matthias Kloseb159a552010-04-25 21:00:44 +000011263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011268
11269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11272$as_echo_n "checking for link... " >&6; }
11273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011275#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011276int
11277main ()
11278{
11279void *x=link
11280 ;
11281 return 0;
11282}
11283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011287
Matthias Kloseb159a552010-04-25 21:00:44 +000011288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011289$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290else
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011293
11294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11297$as_echo_n "checking for symlink... " >&6; }
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011301int
11302main ()
11303{
11304void *x=symlink
11305 ;
11306 return 0;
11307}
11308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312
Matthias Kloseb159a552010-04-25 21:00:44 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011315else
Matthias Kloseb9621712010-04-24 17:59:49 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11317$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011318
11319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11322$as_echo_n "checking for fchdir... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011325#include <unistd.h>
11326int
11327main ()
11328{
11329void *x=fchdir
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337
Matthias Kloseb159a552010-04-25 21:00:44 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011343
11344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11347$as_echo_n "checking for fsync... " >&6; }
11348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011350#include <unistd.h>
11351int
11352main ()
11353{
11354void *x=fsync
11355 ;
11356 return 0;
11357}
11358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011362
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011364$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011368
11369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11372$as_echo_n "checking for fdatasync... " >&6; }
11373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011375#include <unistd.h>
11376int
11377main ()
11378{
11379void *x=fdatasync
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387
Matthias Kloseb159a552010-04-25 21:00:44 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011393
11394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11397$as_echo_n "checking for epoll... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011399/* end confdefs.h. */
11400#include <sys/epoll.h>
11401int
11402main ()
11403{
11404void *x=epoll_create
11405 ;
11406 return 0;
11407}
11408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011412
Matthias Kloseb159a552010-04-25 21:00:44 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011415else
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011418
11419fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11422$as_echo_n "checking for epoll_create1... " >&6; }
11423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11424/* end confdefs.h. */
11425#include <sys/epoll.h>
11426int
11427main ()
11428{
11429void *x=epoll_create1
11430 ;
11431 return 0;
11432}
11433_ACEOF
11434if ac_fn_c_try_compile "$LINENO"; then :
11435
11436$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11437
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11439$as_echo "yes" >&6; }
11440else
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
11443
11444fi
11445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11447$as_echo_n "checking for kqueue... " >&6; }
11448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011449/* end confdefs.h. */
11450
11451#include <sys/types.h>
11452#include <sys/event.h>
11453
11454int
11455main ()
11456{
11457int x=kqueue()
11458 ;
11459 return 0;
11460}
11461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011462if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465
Matthias Kloseb159a552010-04-25 21:00:44 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011467$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011468else
Matthias Kloseb9621712010-04-24 17:59:49 +000011469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011471
11472fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11475$as_echo_n "checking for prlimit... " >&6; }
11476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477/* end confdefs.h. */
11478
11479#include <sys/time.h>
11480#include <sys/resource.h>
11481
11482int
11483main ()
11484{
11485void *x=prlimit
11486 ;
11487 return 0;
11488}
11489_ACEOF
11490if ac_fn_c_try_compile "$LINENO"; then :
11491
11492$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11493
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11495$as_echo "yes" >&6; }
11496else
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11498$as_echo "no" >&6; }
11499
11500fi
11501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502
Martin v. Löwisd5843682002-11-21 20:41:28 +000011503# On some systems (eg. FreeBSD 5), we would find a definition of the
11504# functions ctermid_r, setgroups in the library, but no prototype
11505# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11506# address to avoid compiler warnings and potential miscompilations
11507# because of the missing prototypes.
11508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11510$as_echo_n "checking for ctermid_r... " >&6; }
11511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011512/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011513
Martin v. Löwisd5843682002-11-21 20:41:28 +000011514#include <stdio.h>
11515
Martin v. Löwisd5843682002-11-21 20:41:28 +000011516int
11517main ()
11518{
11519void* p = ctermid_r
11520 ;
11521 return 0;
11522}
11523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011527
Matthias Kloseb159a552010-04-25 21:00:44 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011529$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011533
11534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11536
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11538$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011539if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011540 $as_echo_n "(cached) " >&6
11541else
11542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011544#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011545int
11546main ()
11547{
11548void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011549
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011550 ;
11551 return 0;
11552}
11553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011554if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011555 ac_cv_flock_decl=yes
11556else
11557 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011558
11559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011561
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011562fi
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11564$as_echo "$ac_cv_flock_decl" >&6; }
11565if test "x${ac_cv_flock_decl}" = xyes; then
11566 for ac_func in flock
11567do :
11568 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011569if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011570 cat >>confdefs.h <<_ACEOF
11571#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011572_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011573
Antoine Pitroua3000072010-09-07 14:52:42 +000011574else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011576$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011577if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011578 $as_echo_n "(cached) " >&6
11579else
11580 ac_check_lib_save_LIBS=$LIBS
11581LIBS="-lbsd $LIBS"
11582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11583/* end confdefs.h. */
11584
11585/* Override any GCC internal prototype to avoid an error.
11586 Use char because int might match the return type of a GCC
11587 builtin and then its argument prototype would still apply. */
11588#ifdef __cplusplus
11589extern "C"
11590#endif
11591char flock ();
11592int
11593main ()
11594{
11595return flock ();
11596 ;
11597 return 0;
11598}
11599_ACEOF
11600if ac_fn_c_try_link "$LINENO"; then :
11601 ac_cv_lib_bsd_flock=yes
11602else
11603 ac_cv_lib_bsd_flock=no
11604fi
11605rm -f core conftest.err conftest.$ac_objext \
11606 conftest$ac_exeext conftest.$ac_ext
11607LIBS=$ac_check_lib_save_LIBS
11608fi
11609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11610$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011612 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011613
11614
11615$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11616
11617
11618fi
11619
11620
11621fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011622done
11623
Antoine Pitroua3000072010-09-07 14:52:42 +000011624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625
Matthias Kloseb9621712010-04-24 17:59:49 +000011626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11627$as_echo_n "checking for getpagesize... " >&6; }
11628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011629/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011630
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011631#include <unistd.h>
11632
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011633int
11634main ()
11635{
11636void* p = getpagesize
11637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011644
Matthias Kloseb159a552010-04-25 21:00:44 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011650
11651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011653
Victor Stinner984890f2011-11-24 13:53:38 +010011654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11655$as_echo_n "checking for broken unsetenv... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11657/* end confdefs.h. */
11658
11659#include <stdlib.h>
11660
11661int
11662main ()
11663{
11664int res = unsetenv("DUMMY")
11665 ;
11666 return 0;
11667}
11668_ACEOF
11669if ac_fn_c_try_compile "$LINENO"; then :
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11671$as_echo "no" >&6; }
11672else
11673
11674$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11675
11676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11677$as_echo "yes" >&6; }
11678
11679fi
11680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11681
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011682for ac_prog in true
11683do
11684 # Extract the first word of "$ac_prog", so it can be a program name with args.
11685set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11687$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011690else
11691 if test -n "$TRUE"; then
11692 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11693else
11694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11695for as_dir in $PATH
11696do
11697 IFS=$as_save_IFS
11698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011701 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 $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 +000011703 break 2
11704 fi
11705done
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011707IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011708
11709fi
11710fi
11711TRUE=$ac_cv_prog_TRUE
11712if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11714$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011718fi
11719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011721 test -n "$TRUE" && break
11722done
11723test -n "$TRUE" || TRUE="/bin/true"
11724
11725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11727$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011728if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011730else
11731 ac_check_lib_save_LIBS=$LIBS
11732LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011734/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736/* Override any GCC internal prototype to avoid an error.
11737 Use char because int might match the return type of a GCC
11738 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011739#ifdef __cplusplus
11740extern "C"
11741#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011742char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011743int
11744main ()
11745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011746return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011747 ;
11748 return 0;
11749}
11750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752 ac_cv_lib_c_inet_aton=yes
11753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011756rm -f core conftest.err conftest.$ac_objext \
11757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758LIBS=$ac_check_lib_save_LIBS
11759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11761$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011762if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011763 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011764else
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11766$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011767if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011769else
11770 ac_check_lib_save_LIBS=$LIBS
11771LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011773/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775/* Override any GCC internal prototype to avoid an error.
11776 Use char because int might match the return type of a GCC
11777 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011778#ifdef __cplusplus
11779extern "C"
11780#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011782int
11783main ()
11784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011785return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011786 ;
11787 return 0;
11788}
11789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011790if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011791 ac_cv_lib_resolv_inet_aton=yes
11792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011795rm -f core conftest.err conftest.$ac_objext \
11796 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011797LIBS=$ac_check_lib_save_LIBS
11798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11800$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802 cat >>confdefs.h <<_ACEOF
11803#define HAVE_LIBRESOLV 1
11804_ACEOF
11805
11806 LIBS="-lresolv $LIBS"
11807
11808fi
11809
11810
11811fi
11812
11813
Christian Heimesd0764e22007-12-04 15:00:33 +000011814# On Tru64, chflags seems to be present, but calling it will
11815# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11817$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011820else
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011822 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011823else
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011825/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011826
Christian Heimesd0764e22007-12-04 15:00:33 +000011827#include <sys/stat.h>
11828#include <unistd.h>
11829int main(int argc, char*argv[])
11830{
11831 if(chflags(argv[0], 0) != 0)
11832 return 1;
11833 return 0;
11834}
Ned Deily3eb67d52011-06-28 00:00:28 -070011835
Christian Heimesd0764e22007-12-04 15:00:33 +000011836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011838 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011839else
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011844fi
11845
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11849$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011850if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011853 ac_cv_have_chflags="yes"
11854else
11855 ac_cv_have_chflags="no"
11856fi
11857
11858fi
11859if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011862
11863fi
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11866$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011867if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011871 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011874/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011875
Christian Heimesd0764e22007-12-04 15:00:33 +000011876#include <sys/stat.h>
11877#include <unistd.h>
11878int main(int argc, char*argv[])
11879{
11880 if(lchflags(argv[0], 0) != 0)
11881 return 1;
11882 return 0;
11883}
Ned Deily3eb67d52011-06-28 00:00:28 -070011884
Christian Heimesd0764e22007-12-04 15:00:33 +000011885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011886if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011887 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011893fi
11894
11895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11898$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011899if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011902 ac_cv_have_lchflags="yes"
11903else
11904 ac_cv_have_lchflags="no"
11905fi
11906
11907fi
11908if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011911
11912fi
11913
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011914case $ac_sys_system/$ac_sys_release in
11915Darwin/*)
11916 _CUR_CFLAGS="${CFLAGS}"
11917 _CUR_LDFLAGS="${LDFLAGS}"
11918 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11919 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11920 ;;
11921esac
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11924$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011925if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011927else
11928 ac_check_lib_save_LIBS=$LIBS
11929LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011931/* end confdefs.h. */
11932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011933/* Override any GCC internal prototype to avoid an error.
11934 Use char because int might match the return type of a GCC
11935 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011936#ifdef __cplusplus
11937extern "C"
11938#endif
11939char inflateCopy ();
11940int
11941main ()
11942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011943return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011944 ;
11945 return 0;
11946}
11947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011949 ac_cv_lib_z_inflateCopy=yes
11950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011953rm -f core conftest.err conftest.$ac_objext \
11954 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011955LIBS=$ac_check_lib_save_LIBS
11956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11958$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011959if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011962
11963fi
11964
11965
11966case $ac_sys_system/$ac_sys_release in
11967Darwin/*)
11968 CFLAGS="${_CUR_CFLAGS}"
11969 LDFLAGS="${_CUR_LDFLAGS}"
11970 ;;
11971esac
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11974$as_echo_n "checking for hstrerror... " >&6; }
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011977
Martin v. Löwise9416172003-05-03 10:12:45 +000011978#include <netdb.h>
11979
Martin v. Löwise9416172003-05-03 10:12:45 +000011980int
11981main ()
11982{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011983void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011984 ;
11985 return 0;
11986}
11987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011991
Matthias Kloseb159a552010-04-25 21:00:44 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011993$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011997
11998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011999rm -f core conftest.err conftest.$ac_objext \
12000 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12003$as_echo_n "checking for inet_aton... " >&6; }
12004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012005/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012006
Martin v. Löwis86d66262006-02-17 08:40:11 +000012007#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012008#include <sys/socket.h>
12009#include <netinet/in.h>
12010#include <arpa/inet.h>
12011
Martin v. Löwise9416172003-05-03 10:12:45 +000012012int
12013main ()
12014{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012015void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012016 ;
12017 return 0;
12018}
12019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012023
Matthias Kloseb159a552010-04-25 21:00:44 +000012024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012025$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012026else
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12028$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012029
12030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012031rm -f core conftest.err conftest.$ac_objext \
12032 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12035$as_echo_n "checking for inet_pton... " >&6; }
12036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012038
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012039#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012040#include <sys/socket.h>
12041#include <netinet/in.h>
12042#include <arpa/inet.h>
12043
Martin v. Löwise9416172003-05-03 10:12:45 +000012044int
12045main ()
12046{
12047void* p = inet_pton
12048 ;
12049 return 0;
12050}
12051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012055
Matthias Kloseb159a552010-04-25 21:00:44 +000012056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012057$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012058else
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12060$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012061
12062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012064
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012065# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12067$as_echo_n "checking for setgroups... " >&6; }
12068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012069/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012070
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012071#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012072#ifdef HAVE_GRP_H
12073#include <grp.h>
12074#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012075
Martin v. Löwisd5843682002-11-21 20:41:28 +000012076int
12077main ()
12078{
12079void* p = setgroups
12080 ;
12081 return 0;
12082}
12083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012087
Matthias Kloseb159a552010-04-25 21:00:44 +000012088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012089$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12092$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012093
12094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012097# check for openpty and forkpty
12098
12099for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012100do :
12101 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012102if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012104#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012105_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012106
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012107else
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12109$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012112else
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012114LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118/* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012121#ifdef __cplusplus
12122extern "C"
12123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012124char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012125int
12126main ()
12127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 ;
12130 return 0;
12131}
12132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012140LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12143$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12149$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152else
12153 ac_check_lib_save_LIBS=$LIBS
12154LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012156/* end confdefs.h. */
12157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158/* Override any GCC internal prototype to avoid an error.
12159 Use char because int might match the return type of a GCC
12160 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012161#ifdef __cplusplus
12162extern "C"
12163#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012164char openpty ();
12165int
12166main ()
12167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174 ac_cv_lib_bsd_openpty=yes
12175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178rm -f core conftest.err conftest.$ac_objext \
12179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012180LIBS=$ac_check_lib_save_LIBS
12181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12183$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012186 LIBS="$LIBS -lbsd"
12187fi
12188
12189
12190fi
12191
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192
12193fi
12194done
12195
12196for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012197do :
12198 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012199if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012201#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012202_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204else
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12206$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012207if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209else
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215/* Override any GCC internal prototype to avoid an error.
12216 Use char because int might match the return type of a GCC
12217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012218#ifdef __cplusplus
12219extern "C"
12220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012221char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012222int
12223main ()
12224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 ;
12227 return 0;
12228}
12229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232else
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235rm -f core conftest.err conftest.$ac_objext \
12236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012237LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12240$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012243 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012244else
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12246$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012249else
12250 ac_check_lib_save_LIBS=$LIBS
12251LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012253/* end confdefs.h. */
12254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255/* Override any GCC internal prototype to avoid an error.
12256 Use char because int might match the return type of a GCC
12257 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012258#ifdef __cplusplus
12259extern "C"
12260#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012261char forkpty ();
12262int
12263main ()
12264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271 ac_cv_lib_bsd_forkpty=yes
12272else
Matthias Kloseb9621712010-04-24 17:59:49 +000012273 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012275rm -f core conftest.err conftest.$ac_objext \
12276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012277LIBS=$ac_check_lib_save_LIBS
12278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12280$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012281if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012283 LIBS="$LIBS -lbsd"
12284fi
12285
12286
12287fi
12288
Fred Drake8cef4cf2000-06-28 16:40:38 +000012289
12290fi
12291done
12292
Jack Jansendd19cf82001-12-06 22:36:17 +000012293
Michael W. Hudson54241132001-12-07 15:38:26 +000012294# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012295for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012296do :
12297 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12298ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012299if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012301#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012302_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012303
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012304fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012305done
12306
Michael W. Hudson54241132001-12-07 15:38:26 +000012307
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012308ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012309if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012310 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012311
Martin v. Löwis1142de32002-03-29 16:28:31 +000012312else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012314 *" dup2.$ac_objext "* ) ;;
12315 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012317esac
12318
Martin v. Löwis1142de32002-03-29 16:28:31 +000012319fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012320
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012321ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012322if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012323 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12324
12325else
12326 case " $LIBOBJS " in
12327 *" strdup.$ac_objext "* ) ;;
12328 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12329 ;;
12330esac
12331
12332fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012333
12334
12335for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012336do :
12337 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012338if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012345int
12346main ()
12347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Matthias Kloseb9621712010-04-24 17:59:49 +000012355$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012356
Guido van Rossum627b2d71993-12-24 10:39:16 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012359
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012361done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012362
Jack Jansen150753c2003-03-29 22:07:47 +000012363for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012364do :
12365 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012366if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012367 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012368#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012371/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012372#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012373int
12374main ()
12375{
12376setpgrp(0,0);
12377 ;
12378 return 0;
12379}
12380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012384
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012387
12388fi
12389done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012390
Thomas Wouters3a584202000-08-05 23:28:51 +000012391for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012392do :
12393 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012394if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012400#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012401int
12402main ()
12403{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 ;
12406 return 0;
12407}
12408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409if ac_fn_c_try_compile "$LINENO"; then :
12410
Guido van Rossum627b2d71993-12-24 10:39:16 +000012411else
Skip Montanaro6dead952003-09-25 14:50:04 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
Guido van Rossum627b2d71993-12-24 10:39:16 +000012416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012418
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012420done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421
Michael W. Hudson54241132001-12-07 15:38:26 +000012422
Victor Stinnere0be4232011-10-25 13:06:09 +020012423for ac_func in clock_gettime
12424do :
12425 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12426if test "x$ac_cv_func_clock_gettime" = xyes; then :
12427 cat >>confdefs.h <<_ACEOF
12428#define HAVE_CLOCK_GETTIME 1
12429_ACEOF
12430
12431else
12432
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12434$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12435if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12436 $as_echo_n "(cached) " >&6
12437else
12438 ac_check_lib_save_LIBS=$LIBS
12439LIBS="-lrt $LIBS"
12440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12441/* end confdefs.h. */
12442
12443/* Override any GCC internal prototype to avoid an error.
12444 Use char because int might match the return type of a GCC
12445 builtin and then its argument prototype would still apply. */
12446#ifdef __cplusplus
12447extern "C"
12448#endif
12449char clock_gettime ();
12450int
12451main ()
12452{
12453return clock_gettime ();
12454 ;
12455 return 0;
12456}
12457_ACEOF
12458if ac_fn_c_try_link "$LINENO"; then :
12459 ac_cv_lib_rt_clock_gettime=yes
12460else
12461 ac_cv_lib_rt_clock_gettime=no
12462fi
12463rm -f core conftest.err conftest.$ac_objext \
12464 conftest$ac_exeext conftest.$ac_ext
12465LIBS=$ac_check_lib_save_LIBS
12466fi
12467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12468$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12469if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12470
Victor Stinner7efb8332014-08-29 15:41:08 +020012471 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012472 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12473
12474
12475$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12476
12477
12478fi
12479
12480
12481fi
12482done
12483
12484
12485for ac_func in clock_getres
12486do :
12487 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12488if test "x$ac_cv_func_clock_getres" = xyes; then :
12489 cat >>confdefs.h <<_ACEOF
12490#define HAVE_CLOCK_GETRES 1
12491_ACEOF
12492
12493else
12494
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12496$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12497if ${ac_cv_lib_rt_clock_getres+:} false; then :
12498 $as_echo_n "(cached) " >&6
12499else
12500 ac_check_lib_save_LIBS=$LIBS
12501LIBS="-lrt $LIBS"
12502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12503/* end confdefs.h. */
12504
12505/* Override any GCC internal prototype to avoid an error.
12506 Use char because int might match the return type of a GCC
12507 builtin and then its argument prototype would still apply. */
12508#ifdef __cplusplus
12509extern "C"
12510#endif
12511char clock_getres ();
12512int
12513main ()
12514{
12515return clock_getres ();
12516 ;
12517 return 0;
12518}
12519_ACEOF
12520if ac_fn_c_try_link "$LINENO"; then :
12521 ac_cv_lib_rt_clock_getres=yes
12522else
12523 ac_cv_lib_rt_clock_getres=no
12524fi
12525rm -f core conftest.err conftest.$ac_objext \
12526 conftest$ac_exeext conftest.$ac_ext
12527LIBS=$ac_check_lib_save_LIBS
12528fi
12529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12530$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12531if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12532
12533 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12534
12535
12536fi
12537
12538
12539fi
12540done
12541
12542
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012543for ac_func in clock_settime
12544do :
12545 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12546if test "x$ac_cv_func_clock_settime" = xyes; then :
12547 cat >>confdefs.h <<_ACEOF
12548#define HAVE_CLOCK_SETTIME 1
12549_ACEOF
12550
12551else
12552
12553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12554$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12555if ${ac_cv_lib_rt_clock_settime+:} false; then :
12556 $as_echo_n "(cached) " >&6
12557else
12558 ac_check_lib_save_LIBS=$LIBS
12559LIBS="-lrt $LIBS"
12560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561/* end confdefs.h. */
12562
12563/* Override any GCC internal prototype to avoid an error.
12564 Use char because int might match the return type of a GCC
12565 builtin and then its argument prototype would still apply. */
12566#ifdef __cplusplus
12567extern "C"
12568#endif
12569char clock_settime ();
12570int
12571main ()
12572{
12573return clock_settime ();
12574 ;
12575 return 0;
12576}
12577_ACEOF
12578if ac_fn_c_try_link "$LINENO"; then :
12579 ac_cv_lib_rt_clock_settime=yes
12580else
12581 ac_cv_lib_rt_clock_settime=no
12582fi
12583rm -f core conftest.err conftest.$ac_objext \
12584 conftest$ac_exeext conftest.$ac_ext
12585LIBS=$ac_check_lib_save_LIBS
12586fi
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12588$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12589if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12590
12591 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12592
12593
12594fi
12595
12596
12597fi
12598done
12599
12600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12602$as_echo_n "checking for major... " >&6; }
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012605
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012606#if defined(MAJOR_IN_MKDEV)
12607#include <sys/mkdev.h>
12608#elif defined(MAJOR_IN_SYSMACROS)
12609#include <sys/sysmacros.h>
12610#else
12611#include <sys/types.h>
12612#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012613
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012614int
12615main ()
12616{
12617
12618 makedev(major(0),minor(0));
12619
12620 ;
12621 return 0;
12622}
12623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012625
12626
Matthias Kloseb9621712010-04-24 17:59:49 +000012627$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012628
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12630$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012631
12632else
Skip Montanaro6dead952003-09-25 14:50:04 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12635$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012636
12637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638rm -f core conftest.err conftest.$ac_objext \
12639 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012640
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012641# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012642# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12644$as_echo_n "checking for getaddrinfo... " >&6; }
12645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012647
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012648#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012649#include <sys/socket.h>
12650#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012651#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012652
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012656getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 ;
12658 return 0;
12659}
12660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012662 have_getaddrinfo=yes
12663else
Matthias Kloseb9621712010-04-24 17:59:49 +000012664 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012666rm -f core conftest.err conftest.$ac_objext \
12667 conftest$ac_exeext conftest.$ac_ext
12668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12669$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012670if test $have_getaddrinfo = yes
12671then
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12673$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012674 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012678
12679if test "${enable_ipv6+set}" = set; then
12680 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12681else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012682 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012683fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012684else
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012687
Stefan Krah19c21392012-11-22 23:47:32 +010012688#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012689#include <sys/types.h>
12690#include <netdb.h>
12691#include <string.h>
12692#include <sys/socket.h>
12693#include <netinet/in.h>
12694
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012695int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012696{
12697 int passive, gaierr, inet4 = 0, inet6 = 0;
12698 struct addrinfo hints, *ai, *aitop;
12699 char straddr[INET6_ADDRSTRLEN], strport[16];
12700
12701 for (passive = 0; passive <= 1; passive++) {
12702 memset(&hints, 0, sizeof(hints));
12703 hints.ai_family = AF_UNSPEC;
12704 hints.ai_flags = passive ? AI_PASSIVE : 0;
12705 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012706 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012707 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12708 (void)gai_strerror(gaierr);
12709 goto bad;
12710 }
12711 for (ai = aitop; ai; ai = ai->ai_next) {
12712 if (ai->ai_addr == NULL ||
12713 ai->ai_addrlen == 0 ||
12714 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12715 straddr, sizeof(straddr), strport, sizeof(strport),
12716 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12717 goto bad;
12718 }
12719 switch (ai->ai_family) {
12720 case AF_INET:
12721 if (strcmp(strport, "54321") != 0) {
12722 goto bad;
12723 }
12724 if (passive) {
12725 if (strcmp(straddr, "0.0.0.0") != 0) {
12726 goto bad;
12727 }
12728 } else {
12729 if (strcmp(straddr, "127.0.0.1") != 0) {
12730 goto bad;
12731 }
12732 }
12733 inet4++;
12734 break;
12735 case AF_INET6:
12736 if (strcmp(strport, "54321") != 0) {
12737 goto bad;
12738 }
12739 if (passive) {
12740 if (strcmp(straddr, "::") != 0) {
12741 goto bad;
12742 }
12743 } else {
12744 if (strcmp(straddr, "::1") != 0) {
12745 goto bad;
12746 }
12747 }
12748 inet6++;
12749 break;
12750 case AF_UNSPEC:
12751 goto bad;
12752 break;
12753 default:
12754 /* another family support? */
12755 break;
12756 }
12757 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012758 freeaddrinfo(aitop);
12759 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760 }
12761
12762 if (!(inet4 == 0 || inet4 == 2))
12763 goto bad;
12764 if (!(inet6 == 0 || inet6 == 2))
12765 goto bad;
12766
12767 if (aitop)
12768 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012769 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012770
12771 bad:
12772 if (aitop)
12773 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012774 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775}
12776
Martin v. Löwis11437992002-04-12 09:54:03 +000012777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012779 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012787fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12792$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12793
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012794if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012795then
12796 if test $ipv6 = yes
12797 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012798 echo 'Fatal: You must get working getaddrinfo() function.'
12799 echo ' or you can specify "--disable-ipv6"'.
12800 exit 1
12801 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012802else
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012805
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012806fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012807
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012808for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012809do :
12810 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012811if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012814_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012815
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816fi
12817done
12818
Michael W. Hudson54241132001-12-07 15:38:26 +000012819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012820# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12822$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012823if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012825else
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012827/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012828#include <sys/types.h>
12829#include <sys/time.h>
12830#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
Martin v. Löwis11437992002-04-12 09:54:03 +000012832int
12833main ()
12834{
12835if ((struct tm *) 0)
12836return 0;
12837 ;
12838 return 0;
12839}
12840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012841if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012843else
Matthias Kloseb9621712010-04-24 17:59:49 +000012844 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12849$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012850if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012853
12854fi
12855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12857$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012858if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012862/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012863#include <sys/types.h>
12864#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Martin v. Löwis11437992002-04-12 09:54:03 +000012866int
12867main ()
12868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869struct tm tm;
12870 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ;
12873 return 0;
12874}
12875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012876if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877 ac_cv_struct_tm=time.h
12878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12884$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012885if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888
12889fi
12890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891ac_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 +000012892#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894"
Victor Stinnere0be4232011-10-25 13:06:09 +020012895if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
12897cat >>confdefs.h <<_ACEOF
12898#define HAVE_STRUCT_TM_TM_ZONE 1
12899_ACEOF
12900
12901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012903
Martin v. Löwis11437992002-04-12 09:54:03 +000012904if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012907
12908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12910"
Victor Stinnere0be4232011-10-25 13:06:09 +020012911if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915fi
12916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012918#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919_ACEOF
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12922$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012923if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012927/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012928#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929#if !HAVE_DECL_TZNAME
12930extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Martin v. Löwis11437992002-04-12 09:54:03 +000012933int
12934main ()
12935{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012937 ;
12938 return 0;
12939}
12940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012941if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942 ac_cv_var_tzname=yes
12943else
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012946rm -f core conftest.err conftest.$ac_objext \
12947 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12950$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012951 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012955 fi
12956fi
12957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958ac_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 +020012959if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012960
12961cat >>confdefs.h <<_ACEOF
12962#define HAVE_STRUCT_STAT_ST_RDEV 1
12963_ACEOF
12964
12965
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012966fi
12967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968ac_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 +020012969if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971cat >>confdefs.h <<_ACEOF
12972#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12973_ACEOF
12974
12975
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012976fi
12977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978ac_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 +020012979if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012980
12981cat >>confdefs.h <<_ACEOF
12982#define HAVE_STRUCT_STAT_ST_FLAGS 1
12983_ACEOF
12984
12985
12986fi
12987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988ac_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 +020012989if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012990
12991cat >>confdefs.h <<_ACEOF
12992#define HAVE_STRUCT_STAT_ST_GEN 1
12993_ACEOF
12994
12995
12996fi
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998ac_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 +020012999if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013000
13001cat >>confdefs.h <<_ACEOF
13002#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13003_ACEOF
13004
13005
13006fi
13007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008ac_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 +020013009if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013010
Martin v. Löwis11437992002-04-12 09:54:03 +000013011cat >>confdefs.h <<_ACEOF
13012#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13013_ACEOF
13014
13015
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013016fi
13017
Stefan Krah267b6392016-04-26 01:09:18 +020013018ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13019 #include <sys/types.h>
13020 #include <pwd.h>
13021
13022"
13023if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13024
13025cat >>confdefs.h <<_ACEOF
13026#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13027_ACEOF
13028
13029
13030fi
13031ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13032 #include <sys/types.h>
13033 #include <pwd.h>
13034
13035"
13036if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13037
13038cat >>confdefs.h <<_ACEOF
13039#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13040_ACEOF
13041
13042
13043fi
13044
Zachary Ware6a6967e2016-10-01 00:47:27 -050013045# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13046ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13047"
13048if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13049
13050cat >>confdefs.h <<_ACEOF
13051#define HAVE_SIGINFO_T_SI_BAND 1
13052_ACEOF
13053
13054
13055fi
13056
Michael W. Hudson54241132001-12-07 15:38:26 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13059$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013060if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013062else
Matthias Kloseb159a552010-04-25 21:00:44 +000013063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013065/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013066#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013067int
13068main ()
13069{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076 ac_cv_header_time_altzone=yes
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082fi
13083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13085$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089
13090fi
13091
Guido van Rossumda88dad1995-01-26 00:46:29 +000013092was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13094$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013096/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013097
13098#include <sys/types.h>
13099#include <sys/select.h>
13100#include <sys/time.h>
13101
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013105;
Martin v. Löwis11437992002-04-12 09:54:03 +000013106 ;
13107 return 0;
13108}
13109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013111
13112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013114
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013115 was_it_defined=yes
13116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13120$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13123$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013124if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013128/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013129#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013130int
13131main ()
13132{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013133struct addrinfo a
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 :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013139 ac_cv_struct_addrinfo=yes
13140else
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13144fi
13145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13147$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151
13152fi
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13155$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013156if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158else
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013160/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013161
13162# include <sys/types.h>
13163# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013164int
13165main ()
13166{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 ;
13169 return 0;
13170}
13171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013172if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013173 ac_cv_struct_sockaddr_storage=yes
13174else
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13178fi
13179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13181$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013185
13186fi
13187
Christian Heimesdffa3942016-09-05 23:54:41 +020013188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13189$as_echo_n "checking for sockaddr_alg... " >&6; }
13190if ${ac_cv_struct_sockaddr_alg+:} false; then :
13191 $as_echo_n "(cached) " >&6
13192else
13193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13194/* end confdefs.h. */
13195
13196# include <sys/types.h>
13197# include <sys/socket.h>
13198# include <linux/if_alg.h>
13199int
13200main ()
13201{
13202struct sockaddr_alg s
13203 ;
13204 return 0;
13205}
13206_ACEOF
13207if ac_fn_c_try_compile "$LINENO"; then :
13208 ac_cv_struct_sockaddr_alg=yes
13209else
13210 ac_cv_struct_sockaddr_alg=no
13211fi
13212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13213fi
13214
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13216$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13217if test $ac_cv_struct_sockaddr_alg = yes; then
13218
13219$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13220
13221fi
13222
Guido van Rossum627b2d71993-12-24 10:39:16 +000013223# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013224
Matthias Kloseb9621712010-04-24 17:59:49 +000013225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13226$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013227if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013229else
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013232$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013233int
13234main ()
13235{
13236static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013237test_array [0] = 0;
13238return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
13240 ;
13241 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013242}
Martin v. Löwis11437992002-04-12 09:54:03 +000013243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013245 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013246else
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13252$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013253if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255
13256fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13259$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013260if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013264/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266int
13267main ()
13268{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013271 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013273 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013275 char const *const *pcpcc;
13276 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 /* NEC SVR4.0.2 mips cc rejects this. */
13278 struct point {int x, y;};
13279 static struct point const zero = {0,0};
13280 /* AIX XL C 1.02.0.0 rejects this.
13281 It does not let you subtract one const X* pointer from another in
13282 an arm of an if-expression whose if-part is not a constant
13283 expression */
13284 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013287 ++pcpcc;
13288 ppc = (char**) pcpcc;
13289 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013290 { /* SCO 3.2v4 cc rejects this sort of thing. */
13291 char tx;
13292 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013296 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 }
13298 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13299 int x[] = {25, 17};
13300 const int *foo = &x[0];
13301 ++foo;
13302 }
13303 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13304 typedef const int *iptr;
13305 iptr p = 0;
13306 ++p;
13307 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013308 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013310 struct s { int j; const int *ap[3]; } bx;
13311 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 }
13313 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13314 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013318#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013319
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 ;
13321 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013322}
Martin v. Löwis11437992002-04-12 09:54:03 +000013323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013324if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325 ac_cv_c_const=yes
13326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13332$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336
13337fi
13338
Michael W. Hudson54241132001-12-07 15:38:26 +000013339
Guido van Rossumda88dad1995-01-26 00:46:29 +000013340works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13342$as_echo_n "checking for working signed char... " >&6; }
13343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013344/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013345
Martin v. Löwis11437992002-04-12 09:54:03 +000013346int
13347main ()
13348{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 ;
13351 return 0;
13352}
13353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013355 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013356else
Skip Montanaro6dead952003-09-25 14:50:04 +000013357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013359
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013360
Guido van Rossum7f43da71994-08-01 12:15:30 +000013361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13364$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013365
Guido van Rossumda88dad1995-01-26 00:46:29 +000013366have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13368$as_echo_n "checking for prototypes... " >&6; }
13369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013370/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013371int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
13373main ()
13374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013375return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Matthias Kloseb159a552010-04-25 21:00:44 +000013384 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13388$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389
Guido van Rossumda88dad1995-01-26 00:46:29 +000013390works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13392$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013394/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013395
13396#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013397int foo(int x, ...) {
13398 va_list va;
13399 va_start(va, x);
13400 va_arg(va, int);
13401 va_arg(va, char *);
13402 va_arg(va, double);
13403 return 0;
13404}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Guido van Rossum90eea071996-08-30 20:58:57 +000013409return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
13412}
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
13416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013419 works=yes
13420
Guido van Rossum627b2d71993-12-24 10:39:16 +000013421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13424$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013425
Martin v. Löwisd6320502004-08-12 13:45:08 +000013426# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13428$as_echo_n "checking for socketpair... " >&6; }
13429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013430/* end confdefs.h. */
13431
13432#include <sys/types.h>
13433#include <sys/socket.h>
13434
13435int
13436main ()
13437{
13438void *x=socketpair
13439 ;
13440 return 0;
13441}
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013446
Matthias Kloseb159a552010-04-25 21:00:44 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13451$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013452
13453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013455
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013456# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13458$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013461#include <sys/types.h>
13462#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013463int
13464main ()
13465{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013466struct sockaddr x;
13467x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 ;
13469 return 0;
13470}
13471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if ac_fn_c_try_compile "$LINENO"; then :
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13474$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
Matthias Kloseb9621712010-04-24 17:59:49 +000013476$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013477
13478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13480$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013481
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013485# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
13487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013489if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13494$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013495 OLD_CFLAGS=$CFLAGS
13496 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013498/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013499
13500# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502int
13503main ()
13504{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505
13506 char *name;
13507 struct hostent *he, *res;
13508 char buffer[2048];
13509 int buflen = 2048;
13510 int h_errnop;
13511
13512 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013521
Martin v. Löwis11437992002-04-12 09:54:03 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13526$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013528else
Skip Montanaro6dead952003-09-25 14:50:04 +000013529
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13531$as_echo "no" >&6; }
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13533$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013537# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
Martin v. Löwis11437992002-04-12 09:54:03 +000013539int
13540main ()
13541{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013542
13543 char *name;
13544 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013545 char buffer[2048];
13546 int buflen = 2048;
13547 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013548
Matthias Kloseb159a552010-04-25 21:00:44 +000013549 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
13551 ;
13552 return 0;
13553}
13554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Matthias Kloseb159a552010-04-25 21:00:44 +000013560$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13563$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013565else
Skip Montanaro6dead952003-09-25 14:50:04 +000013566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13568$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13570$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13572/* end confdefs.h. */
13573
13574# include <netdb.h>
13575
13576int
13577main ()
13578{
13579
13580 char *name;
13581 struct hostent *he;
13582 struct hostent_data data;
13583
13584 (void) gethostbyname_r(name, he, &data);
13585
13586 ;
13587 return 0;
13588}
13589_ACEOF
13590if ac_fn_c_try_compile "$LINENO"; then :
13591
13592 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13593
13594
13595$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13596
13597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13598$as_echo "yes" >&6; }
13599
13600else
13601
13602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13603$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013613 CFLAGS=$OLD_CFLAGS
13614
13615else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 for ac_func in gethostbyname
13618do :
13619 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013620if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013623_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013625fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013626done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629fi
13630
Michael W. Hudson54241132001-12-07 15:38:26 +000013631
13632
13633
13634
13635
13636
Guido van Rossum627b2d71993-12-24 10:39:16 +000013637# checks for system services
13638# (none yet)
13639
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013641ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013642if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013643
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13646$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013647if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649else
Martin v. Löwis11437992002-04-12 09:54:03 +000013650 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013651LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655/* Override any GCC internal prototype to avoid an error.
13656 Use char because int might match the return type of a GCC
13657 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013658#ifdef __cplusplus
13659extern "C"
13660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013661char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013662int
13663main ()
13664{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013665return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 ;
13667 return 0;
13668}
13669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675rm -f core conftest.err conftest.$ac_objext \
13676 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013677LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13680$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013681if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013682 cat >>confdefs.h <<_ACEOF
13683#define HAVE_LIBIEEE 1
13684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013686 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013687
Guido van Rossum627b2d71993-12-24 10:39:16 +000013688fi
13689
Michael W. Hudson54241132001-12-07 15:38:26 +000013690
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013691fi
13692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693
Guido van Rossum7f253911997-05-09 02:42:48 +000013694# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13696$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013699if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013701if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013702then
13703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13707$as_echo "yes" >&6; }
13708else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13709$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013710fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13713$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714fi
13715
Guido van Rossum7f253911997-05-09 02:42:48 +000013716
Guido van Rossum7f43da71994-08-01 12:15:30 +000013717# check for --with-libm=...
13718
Guido van Rossum563e7081996-09-10 18:20:48 +000013719case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013720Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013721*) LIBM=-lm
13722esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13724$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013727if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013729if test "$withval" = no
13730then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13732$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013733elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013734then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13736$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013737else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013738fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13741$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742fi
13743
Guido van Rossum7f43da71994-08-01 12:15:30 +000013744
13745# check for --with-libc=...
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13748$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013750# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013751if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013753if test "$withval" = no
13754then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13756$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013757elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013758then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13760$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013761else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13765$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766fi
13767
Guido van Rossum7f43da71994-08-01 12:15:30 +000013768
Stefan Krah1919b7e2012-03-21 18:25:23 +010013769# **************************************
13770# * Check for gcc x64 inline assembler *
13771# **************************************
13772
13773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13774$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776/* end confdefs.h. */
13777
13778int
13779main ()
13780{
13781
13782 __asm__ __volatile__ ("movq %rcx, %rax");
13783
13784 ;
13785 return 0;
13786}
13787_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013788if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013789 have_gcc_asm_for_x64=yes
13790else
13791 have_gcc_asm_for_x64=no
13792fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013793rm -f core conftest.err conftest.$ac_objext \
13794 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13796$as_echo "$have_gcc_asm_for_x64" >&6; }
13797if test "$have_gcc_asm_for_x64" = yes
13798then
13799
13800$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13801
13802fi
13803
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804# **************************************************
13805# * Check for various properties of floating point *
13806# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13809$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013810if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013811 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812else
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815 ac_cv_little_endian_double=no
13816else
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818/* end confdefs.h. */
13819
13820#include <string.h>
13821int main() {
13822 double x = 9006104071832581.0;
13823 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13824 return 0;
13825 else
13826 return 1;
13827}
13828
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831 ac_cv_little_endian_double=yes
13832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013837fi
13838
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839fi
13840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13842$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013843if test "$ac_cv_little_endian_double" = yes
13844then
13845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847
13848fi
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13851$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013852if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854else
13855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857 ac_cv_big_endian_double=no
13858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860/* end confdefs.h. */
13861
13862#include <string.h>
13863int main() {
13864 double x = 9006104071832581.0;
13865 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13866 return 0;
13867 else
13868 return 1;
13869}
13870
13871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013872if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873 ac_cv_big_endian_double=yes
13874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879fi
13880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013881fi
13882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13884$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013885if test "$ac_cv_big_endian_double" = yes
13886then
13887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889
13890fi
13891
13892# Some ARM platforms use a mixed-endian representation for doubles.
13893# While Python doesn't currently have full support for these platforms
13894# (see e.g., issue 1762561), we can at least make sure that float <-> string
13895# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13897$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013898if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900else
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903 ac_cv_mixed_endian_double=no
13904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906/* end confdefs.h. */
13907
13908#include <string.h>
13909int main() {
13910 double x = 9006104071832581.0;
13911 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13912 return 0;
13913 else
13914 return 1;
13915}
13916
13917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013918if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013919 ac_cv_mixed_endian_double=yes
13920else
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013925fi
13926
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927fi
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13930$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013931if test "$ac_cv_mixed_endian_double" = yes
13932then
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935
13936fi
13937
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013938# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013939# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013940# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013941# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013942# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013943# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013944
13945# This inline assembler syntax may also work for suncc and icc,
13946# so we try it on all platforms.
13947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13949$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951/* end confdefs.h. */
13952
13953int
13954main ()
13955{
13956
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013957 unsigned short cw;
13958 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13959 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013960
13961 ;
13962 return 0;
13963}
13964_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013965if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013966 have_gcc_asm_for_x87=yes
13967else
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013969fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013970rm -f core conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13973$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013974if test "$have_gcc_asm_for_x87" = yes
13975then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013978
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013980
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13982$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13984/* end confdefs.h. */
13985
13986int
13987main ()
13988{
13989
13990 unsigned int fpcr;
13991 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13992 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13993
13994 ;
13995 return 0;
13996}
13997_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013998if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013999 have_gcc_asm_for_mc68881=yes
14000else
14001 have_gcc_asm_for_mc68881=no
14002fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014003rm -f core conftest.err conftest.$ac_objext \
14004 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14006$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14007if test "$have_gcc_asm_for_mc68881" = yes
14008then
14009
14010$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14011
14012fi
14013
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014014# Detect whether system arithmetic is subject to x87-style double
14015# rounding issues. The result of this test has little meaning on non
14016# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14017# mode is round-to-nearest and double rounding issues are present, and
14018# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14020$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014021# $BASECFLAGS may affect the result
14022ac_save_cc="$CC"
14023CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014024if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014025 ac_cv_x87_double_rounding=no
14026else
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014028/* end confdefs.h. */
14029
14030#include <stdlib.h>
14031#include <math.h>
14032int main() {
14033 volatile double x, y, z;
14034 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14035 x = 0.99999999999999989; /* 1-2**-53 */
14036 y = 1./x;
14037 if (y != 1.)
14038 exit(0);
14039 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14040 x = 1e16;
14041 y = 2.99999;
14042 z = x + y;
14043 if (z != 1e16+4.)
14044 exit(0);
14045 /* both tests show evidence of double rounding */
14046 exit(1);
14047}
14048
14049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014050if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014051 ac_cv_x87_double_rounding=no
14052else
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014057fi
14058
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014059CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14061$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014062if test "$ac_cv_x87_double_rounding" = yes
14063then
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014066
14067fi
14068
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014069# ************************************
14070# * Check for mathematical functions *
14071# ************************************
14072
14073LIBS_SAVE=$LIBS
14074LIBS="$LIBS $LIBM"
14075
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014076for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14077do :
14078 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14079ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014080if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014081 cat >>confdefs.h <<_ACEOF
14082#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14083_ACEOF
14084
14085fi
14086done
14087
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014088for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014089do :
14090 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14091ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014092if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014093 cat >>confdefs.h <<_ACEOF
14094#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14095_ACEOF
14096
14097fi
14098done
14099
14100ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14101"
Victor Stinnere0be4232011-10-25 13:06:09 +020014102if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014103 ac_have_decl=1
14104else
14105 ac_have_decl=0
14106fi
14107
14108cat >>confdefs.h <<_ACEOF
14109#define HAVE_DECL_ISINF $ac_have_decl
14110_ACEOF
14111ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14112"
Victor Stinnere0be4232011-10-25 13:06:09 +020014113if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014114 ac_have_decl=1
14115else
14116 ac_have_decl=0
14117fi
14118
14119cat >>confdefs.h <<_ACEOF
14120#define HAVE_DECL_ISNAN $ac_have_decl
14121_ACEOF
14122ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14123"
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125 ac_have_decl=1
14126else
14127 ac_have_decl=0
14128fi
14129
14130cat >>confdefs.h <<_ACEOF
14131#define HAVE_DECL_ISFINITE $ac_have_decl
14132_ACEOF
14133
14134
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014135# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14136# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14138$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014139if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014141else
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014144 ac_cv_tanh_preserves_zero_sign=no
14145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014147/* end confdefs.h. */
14148
14149#include <math.h>
14150#include <stdlib.h>
14151int main() {
14152 /* return 0 if either negative zeros don't exist
14153 on this platform or if negative zeros exist
14154 and tanh(-0.) == -0. */
14155 if (atan2(0., -1.) == atan2(-0., -1.) ||
14156 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14157 else exit(1);
14158}
14159
14160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014162 ac_cv_tanh_preserves_zero_sign=yes
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014168fi
14169
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014170fi
14171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14173$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014174if test "$ac_cv_tanh_preserves_zero_sign" = yes
14175then
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014178
14179fi
14180
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014181if test "$ac_cv_func_log1p" = yes
14182then
14183 # On some versions of AIX, log1p(-0.) returns 0. instead of
14184 # -0. See issue #9920.
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14186$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014187 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014188 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014190
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014191 if test "$cross_compiling" = yes; then :
14192 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14195/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014196
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014197 #include <math.h>
14198 #include <stdlib.h>
14199 int main() {
14200 /* Fail if the signs of log1p(-0.) and -0. can be
14201 distinguished. */
14202 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14203 return 0;
14204 else
14205 return 1;
14206 }
14207
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014208_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014209if ac_fn_c_try_run "$LINENO"; then :
14210 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014211else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014212 ac_cv_log1p_drops_zero_sign=yes
14213fi
14214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014216fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014217
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014218fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014219
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14221$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14222fi
14223if test "$ac_cv_log1p_drops_zero_sign" = yes
14224then
14225
14226$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14227
14228fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014229
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014230LIBS=$LIBS_SAVE
14231
Mark Dickinsona614f042009-11-28 12:48:43 +000014232# For multiprocessing module, check that sem_open
14233# actually works. For FreeBSD versions <= 7.2,
14234# the kernel module that provides POSIX semaphores
14235# isn't loaded by default, so an attempt to call
14236# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14238$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014239if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014243 ac_cv_posix_semaphores_enabled=yes
14244else
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014246/* end confdefs.h. */
14247
14248#include <unistd.h>
14249#include <fcntl.h>
14250#include <stdio.h>
14251#include <semaphore.h>
14252#include <sys/stat.h>
14253
14254int main(void) {
14255 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14256 if (a == SEM_FAILED) {
14257 perror("sem_open");
14258 return 1;
14259 }
14260 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014261 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014262 return 0;
14263}
14264
14265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014266if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014267 ac_cv_posix_semaphores_enabled=yes
14268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014273fi
14274
14275
Mark Dickinsona614f042009-11-28 12:48:43 +000014276fi
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14279$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014280if test $ac_cv_posix_semaphores_enabled = no
14281then
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014284
14285fi
14286
Mark Dickinson10683072009-04-18 21:18:19 +000014287# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14289$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014290if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014294 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014297/* end confdefs.h. */
14298
14299#include <unistd.h>
14300#include <fcntl.h>
14301#include <stdio.h>
14302#include <semaphore.h>
14303#include <sys/stat.h>
14304
14305int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014306 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014307 int count;
14308 int res;
14309 if(a==SEM_FAILED){
14310 perror("sem_open");
14311 return 1;
14312
14313 }
14314 res = sem_getvalue(a, &count);
14315 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014316 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014317 return res==-1 ? 1 : 0;
14318}
14319
Mark Dickinson10683072009-04-18 21:18:19 +000014320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014321if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014322 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014323else
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014328fi
14329
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014331fi
14332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14334$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014335if test $ac_cv_broken_sem_getvalue = yes
14336then
14337
Matthias Kloseb9621712010-04-24 17:59:49 +000014338$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014339
14340fi
14341
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014342ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14343"
14344if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14345 ac_have_decl=1
14346else
14347 ac_have_decl=0
14348fi
14349
14350cat >>confdefs.h <<_ACEOF
14351#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14352_ACEOF
14353ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14354"
14355if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14356 ac_have_decl=1
14357else
14358 ac_have_decl=0
14359fi
14360
14361cat >>confdefs.h <<_ACEOF
14362#define HAVE_DECL_RTLD_NOW $ac_have_decl
14363_ACEOF
14364ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14365"
14366if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14367 ac_have_decl=1
14368else
14369 ac_have_decl=0
14370fi
14371
14372cat >>confdefs.h <<_ACEOF
14373#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14374_ACEOF
14375ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14376"
14377if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14378 ac_have_decl=1
14379else
14380 ac_have_decl=0
14381fi
14382
14383cat >>confdefs.h <<_ACEOF
14384#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14385_ACEOF
14386ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14387"
14388if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14389 ac_have_decl=1
14390else
14391 ac_have_decl=0
14392fi
14393
14394cat >>confdefs.h <<_ACEOF
14395#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14396_ACEOF
14397ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14398"
14399if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14400 ac_have_decl=1
14401else
14402 ac_have_decl=0
14403fi
14404
14405cat >>confdefs.h <<_ACEOF
14406#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14407_ACEOF
14408ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14409"
14410if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14411 ac_have_decl=1
14412else
14413 ac_have_decl=0
14414fi
14415
14416cat >>confdefs.h <<_ACEOF
14417#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14418_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014419ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14420"
14421if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14422 ac_have_decl=1
14423else
14424 ac_have_decl=0
14425fi
14426
14427cat >>confdefs.h <<_ACEOF
14428#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14429_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014430
14431
Mark Dickinsonbd792642009-03-18 20:06:12 +000014432# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14434$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014435# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014436if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014437 enableval=$enable_big_digits; case $enable_big_digits in
14438yes)
14439 enable_big_digits=30 ;;
14440no)
14441 enable_big_digits=15 ;;
1444215|30)
14443 ;;
14444*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014445 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 +000014446esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14448$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014449
14450cat >>confdefs.h <<_ACEOF
14451#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14452_ACEOF
14453
14454
14455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14457$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014458fi
14459
14460
Guido van Rossumef2255b2000-03-10 22:30:29 +000014461# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014462ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014463if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014467
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014468 wchar_h="yes"
14469
Guido van Rossumef2255b2000-03-10 22:30:29 +000014470else
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014472
14473fi
14474
Michael W. Hudson54241132001-12-07 15:38:26 +000014475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014477# determine wchar_t size
14478if test "$wchar_h" = yes
14479then
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14483# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14485$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014486if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014488else
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14490"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014491
Martin v. Löwis11437992002-04-12 09:54:03 +000014492else
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 if test "$ac_cv_type_wchar_t" = yes; then
14494 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014496as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014497See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498 else
14499 ac_cv_sizeof_wchar_t=0
14500 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14505$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506
14507
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014510#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014511_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014512
Michael W. Hudson54241132001-12-07 15:38:26 +000014513
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014514fi
14515
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14517$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014518have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014520/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014521
14522#include <tcl.h>
14523#if TCL_UTF_MAX != 6
14524# error "NOT UCS4_TCL"
14525#endif
14526int
14527main ()
14528{
14529
14530 ;
14531 return 0;
14532}
14533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014535
14536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014538
14539 have_ucs4_tcl=yes
14540
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14544$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014545
Skip Montanaro6dead952003-09-25 14:50:04 +000014546# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014547if test "$wchar_h" = yes
14548then
14549 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14551$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014552 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014554else
14555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014557 ac_cv_wchar_t_signed=yes
14558else
Matthias Kloseb9621712010-04-24 17:59:49 +000014559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014560/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014561
14562 #include <wchar.h>
14563 int main()
14564 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014565 /* Success: exit code 0 */
14566 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014567 }
14568
14569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014570if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014571 ac_cv_wchar_t_signed=yes
14572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14576 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014577fi
14578
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014579fi
14580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14582$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583fi
14584
Georg Brandl52d168a2008-01-07 18:10:24 +000014585# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014586if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014587 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014588then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014589 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Georg Brandl52d168a2008-01-07 18:10:24 +000014593else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014594 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014595fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14597$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014598
14599# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14601$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014602if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014603 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014604else
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 ac_cv_c_bigendian=unknown
14606 # See if we're dealing with a universal compiler.
14607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14608/* end confdefs.h. */
14609#ifndef __APPLE_CC__
14610 not a universal capable compiler
14611 #endif
14612 typedef int dummy;
14613
Skip Montanaro6dead952003-09-25 14:50:04 +000014614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014615if ac_fn_c_try_compile "$LINENO"; then :
14616
14617 # Check for potential -arch flags. It is not universal unless
14618 # there are at least two -arch flags with different values.
14619 ac_arch=
14620 ac_prev=
14621 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14622 if test -n "$ac_prev"; then
14623 case $ac_word in
14624 i?86 | x86_64 | ppc | ppc64)
14625 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14626 ac_arch=$ac_word
14627 else
14628 ac_cv_c_bigendian=universal
14629 break
14630 fi
14631 ;;
14632 esac
14633 ac_prev=
14634 elif test "x$ac_word" = "x-arch"; then
14635 ac_prev=arch
14636 fi
14637 done
14638fi
14639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14640 if test $ac_cv_c_bigendian = unknown; then
14641 # See if sys/param.h defines the BYTE_ORDER macro.
14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014643/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014644#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647int
14648main ()
14649{
Matthias Kloseb9621712010-04-24 17:59:49 +000014650#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14651 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14652 && LITTLE_ENDIAN)
14653 bogus endian macros
14654 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656 ;
14657 return 0;
14658}
14659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014661 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014663/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014664#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014665 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014666
Martin v. Löwis11437992002-04-12 09:54:03 +000014667int
14668main ()
14669{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014670#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 not big endian
14672 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
14674 ;
14675 return 0;
14676}
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014679 ac_cv_c_bigendian=yes
14680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014684fi
14685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14686 fi
14687 if test $ac_cv_c_bigendian = unknown; then
14688 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014690/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014691#include <limits.h>
14692
Martin v. Löwis11437992002-04-12 09:54:03 +000014693int
14694main ()
14695{
Matthias Kloseb9621712010-04-24 17:59:49 +000014696#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14697 bogus endian macros
14698 #endif
14699
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 ;
14701 return 0;
14702}
14703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014704if ac_fn_c_try_compile "$LINENO"; then :
14705 # It does; now see whether it defined to _BIG_ENDIAN or not.
14706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14707/* end confdefs.h. */
14708#include <limits.h>
14709
14710int
14711main ()
14712{
14713#ifndef _BIG_ENDIAN
14714 not big endian
14715 #endif
14716
14717 ;
14718 return 0;
14719}
14720_ACEOF
14721if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014723else
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14727fi
14728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14729 fi
14730 if test $ac_cv_c_bigendian = unknown; then
14731 # Compile a test program.
14732 if test "$cross_compiling" = yes; then :
14733 # Try to guess by grepping values from an object file.
14734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14735/* end confdefs.h. */
14736short int ascii_mm[] =
14737 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14738 short int ascii_ii[] =
14739 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14740 int use_ascii (int i) {
14741 return ascii_mm[i] + ascii_ii[i];
14742 }
14743 short int ebcdic_ii[] =
14744 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14745 short int ebcdic_mm[] =
14746 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14747 int use_ebcdic (int i) {
14748 return ebcdic_mm[i] + ebcdic_ii[i];
14749 }
14750 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751
Matthias Kloseb9621712010-04-24 17:59:49 +000014752int
14753main ()
14754{
14755return use_ascii (foo) == use_ebcdic (foo);
14756 ;
14757 return 0;
14758}
14759_ACEOF
14760if ac_fn_c_try_compile "$LINENO"; then :
14761 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14762 ac_cv_c_bigendian=yes
14763 fi
14764 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14765 if test "$ac_cv_c_bigendian" = unknown; then
14766 ac_cv_c_bigendian=no
14767 else
14768 # finding both strings is unlikely to happen, but who knows?
14769 ac_cv_c_bigendian=unknown
14770 fi
14771 fi
14772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014774else
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014776/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014778int
14779main ()
14780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 /* Are we little or big endian? From Harbison&Steele. */
14783 union
14784 {
14785 long int l;
14786 char c[sizeof (long int)];
14787 } u;
14788 u.l = 1;
14789 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790
14791 ;
14792 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014793}
Martin v. Löwis11437992002-04-12 09:54:03 +000014794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014795if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014796 ac_cv_c_bigendian=no
14797else
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14807$as_echo "$ac_cv_c_bigendian" >&6; }
14808 case $ac_cv_c_bigendian in #(
14809 yes)
14810 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14811;; #(
14812 no)
14813 ;; #(
14814 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 ;; #(
14819 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014820 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014821 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014823
Michael W. Hudson54241132001-12-07 15:38:26 +000014824
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014825# ABI version string for Python extension modules. This appears between the
14826# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14827# from the following attributes which affect the ABI of this Python build (in
14828# this order):
14829#
14830# * The Python implementation (always 'cpython-' for us)
14831# * The major and minor version numbers
14832# * --with-pydebug (adds a 'd')
14833# * --with-pymalloc (adds a 'm')
14834# * --with-wide-unicode (adds a 'u')
14835#
14836# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014837# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14838# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014839
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14841$as_echo_n "checking ABIFLAGS... " >&6; }
14842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14843$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14845$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014846SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14848$as_echo "$SOABI" >&6; }
14849
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014850
14851case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014852 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014853 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14854 *)
14855 EXT_SUFFIX=${SHLIB_SUFFIX};;
14856esac
14857
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14859$as_echo_n "checking LDVERSION... " >&6; }
14860LDVERSION='$(VERSION)$(ABIFLAGS)'
14861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14862$as_echo "$LDVERSION" >&6; }
14863
doko@python.org87421192013-01-26 11:39:31 +010014864
doko@ubuntu.com55532312016-06-14 08:55:19 +020014865if test x$PLATFORM_TRIPLET = x; then
14866 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14867else
14868 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14869fi
doko@python.org87421192013-01-26 11:39:31 +010014870
14871
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014872# Check whether right shifting a negative integer extends the sign bit
14873# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14875$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014876if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014878else
Martin v. Löwis11437992002-04-12 09:54:03 +000014879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014881 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014882else
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014884/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014885
14886int main()
14887{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014888 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014889}
14890
Martin v. Löwis11437992002-04-12 09:54:03 +000014891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014892if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014893 ac_cv_rshift_extends_sign=yes
14894else
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014899fi
14900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901fi
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14904$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014905if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014906then
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014909
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014910fi
14911
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014912# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14914$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014915if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014917else
Martin v. Löwis11437992002-04-12 09:54:03 +000014918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014920/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014921#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014922int
14923main ()
14924{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014925
14926 FILE *f = fopen("/dev/null", "r");
14927 flockfile(f);
14928 getc_unlocked(f);
14929 funlockfile(f);
14930
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 ;
14932 return 0;
14933}
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014936 ac_cv_have_getc_unlocked=yes
14937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 ac_cv_have_getc_unlocked=no
14939fi
14940rm -f core conftest.err conftest.$ac_objext \
14941 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14945$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014946if test "$ac_cv_have_getc_unlocked" = yes
14947then
Martin v. Löwis11437992002-04-12 09:54:03 +000014948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014950
14951fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014952
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014953# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014954# save the value of LIBS so we don't actually link Python with readline
14955LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014956
Gregory P. Smith18820942008-09-07 06:24:49 +000014957# On some systems we need to link readline to a termcap compatible
14958# library. NOTE: Keep the precedence of listed libraries synchronised
14959# with setup.py.
14960py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14962$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014963for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014964 if test -z "$py_libtermcap"; then
14965 READLINE_LIBS="-lreadline"
14966 else
14967 READLINE_LIBS="-lreadline -l$py_libtermcap"
14968 fi
14969 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014971/* end confdefs.h. */
14972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973/* Override any GCC internal prototype to avoid an error.
14974 Use char because int might match the return type of a GCC
14975 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014976#ifdef __cplusplus
14977extern "C"
14978#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014979char readline ();
14980int
14981main ()
14982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014984 ;
14985 return 0;
14986}
14987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014988if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014989 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014991rm -f core conftest.err conftest.$ac_objext \
14992 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014993 if test $py_cv_lib_readline = yes; then
14994 break
14995 fi
14996done
14997# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14998#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014999if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15001$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015002else
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15004$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015007
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015008fi
15009
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015010# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015012/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015013#include <readline/readline.h>
15014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015015if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015016 have_readline=yes
15017else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015018 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015019
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015020fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015021rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015022if test $have_readline = yes
15023then
Matthias Kloseb9621712010-04-24 17:59:49 +000015024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015025/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015026#include <readline/readline.h>
15027
15028_ACEOF
15029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015033
15034fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015035rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015036
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015038/* end confdefs.h. */
15039#include <readline/readline.h>
15040
15041_ACEOF
15042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015046
15047fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015048rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015049
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015050fi
15051
Martin v. Löwis0daad592001-09-30 21:09:59 +000015052# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15054$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015055if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015057else
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015059LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063/* Override any GCC internal prototype to avoid an error.
15064 Use char because int might match the return type of a GCC
15065 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015066#ifdef __cplusplus
15067extern "C"
15068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015069char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015070int
15071main ()
15072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 ;
15075 return 0;
15076}
15077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015080else
Matthias Kloseb9621712010-04-24 17:59:49 +000015081 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015083rm -f core conftest.err conftest.$ac_objext \
15084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015085LIBS=$ac_check_lib_save_LIBS
15086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15088$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015089if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015090
Matthias Kloseb9621712010-04-24 17:59:49 +000015091$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015092
Martin v. Löwis0daad592001-09-30 21:09:59 +000015093fi
15094
Michael W. Hudson54241132001-12-07 15:38:26 +000015095
Thomas Wouters89d996e2007-09-08 17:39:28 +000015096# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15098$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015099if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015101else
15102 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015103LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015105/* end confdefs.h. */
15106
15107/* Override any GCC internal prototype to avoid an error.
15108 Use char because int might match the return type of a GCC
15109 builtin and then its argument prototype would still apply. */
15110#ifdef __cplusplus
15111extern "C"
15112#endif
15113char rl_completion_display_matches_hook ();
15114int
15115main ()
15116{
15117return rl_completion_display_matches_hook ();
15118 ;
15119 return 0;
15120}
15121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015122if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015123 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015127rm -f core conftest.err conftest.$ac_objext \
15128 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015129LIBS=$ac_check_lib_save_LIBS
15130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15132$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015133if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015136
15137fi
15138
15139
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015140# also in 4.0, but not in editline
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15142$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15143if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15144 $as_echo_n "(cached) " >&6
15145else
15146 ac_check_lib_save_LIBS=$LIBS
15147LIBS="-lreadline $READLINE_LIBS $LIBS"
15148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15149/* end confdefs.h. */
15150
15151/* Override any GCC internal prototype to avoid an error.
15152 Use char because int might match the return type of a GCC
15153 builtin and then its argument prototype would still apply. */
15154#ifdef __cplusplus
15155extern "C"
15156#endif
15157char rl_resize_terminal ();
15158int
15159main ()
15160{
15161return rl_resize_terminal ();
15162 ;
15163 return 0;
15164}
15165_ACEOF
15166if ac_fn_c_try_link "$LINENO"; then :
15167 ac_cv_lib_readline_rl_resize_terminal=yes
15168else
15169 ac_cv_lib_readline_rl_resize_terminal=no
15170fi
15171rm -f core conftest.err conftest.$ac_objext \
15172 conftest$ac_exeext conftest.$ac_ext
15173LIBS=$ac_check_lib_save_LIBS
15174fi
15175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15176$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15177if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15178
15179$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15180
15181fi
15182
15183
Martin v. Löwis0daad592001-09-30 21:09:59 +000015184# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15186$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015187if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015191LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195/* Override any GCC internal prototype to avoid an error.
15196 Use char because int might match the return type of a GCC
15197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015198#ifdef __cplusplus
15199extern "C"
15200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015201char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015202int
15203main ()
15204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ;
15207 return 0;
15208}
15209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015212else
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215rm -f core conftest.err conftest.$ac_objext \
15216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015217LIBS=$ac_check_lib_save_LIBS
15218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15220$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015221if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015224
Guido van Rossum353ae582001-07-10 16:45:32 +000015225fi
15226
Jack Jansendd19cf82001-12-06 22:36:17 +000015227
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015228# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015230/* end confdefs.h. */
15231#include <readline/readline.h>
15232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015233if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015234 have_readline=yes
15235else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015236 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015237
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015238fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015239rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015240if test $have_readline = yes
15241then
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015243/* end confdefs.h. */
15244#include <readline/readline.h>
15245
15246_ACEOF
15247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015251
15252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015253rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015254
15255fi
15256
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15258$as_echo_n "checking for append_history in -lreadline... " >&6; }
15259if ${ac_cv_lib_readline_append_history+:} false; then :
15260 $as_echo_n "(cached) " >&6
15261else
15262 ac_check_lib_save_LIBS=$LIBS
15263LIBS="-lreadline $READLINE_LIBS $LIBS"
15264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15265/* end confdefs.h. */
15266
15267/* Override any GCC internal prototype to avoid an error.
15268 Use char because int might match the return type of a GCC
15269 builtin and then its argument prototype would still apply. */
15270#ifdef __cplusplus
15271extern "C"
15272#endif
15273char append_history ();
15274int
15275main ()
15276{
15277return append_history ();
15278 ;
15279 return 0;
15280}
15281_ACEOF
15282if ac_fn_c_try_link "$LINENO"; then :
15283 ac_cv_lib_readline_append_history=yes
15284else
15285 ac_cv_lib_readline_append_history=no
15286fi
15287rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
15289LIBS=$ac_check_lib_save_LIBS
15290fi
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15292$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15293if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15294
15295$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15296
15297fi
15298
15299
Martin v. Löwis82bca632006-02-10 20:49:30 +000015300# End of readline checks: restore LIBS
15301LIBS=$LIBS_no_readline
15302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15304$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015305if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015307else
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015310 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015311else
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015313/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015314
15315int main()
15316{
15317 int val1 = nice(1);
15318 if (val1 != -1 && val1 == nice(2))
15319 exit(0);
15320 exit(1);
15321}
15322
Martin v. Löwis11437992002-04-12 09:54:03 +000015323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015324if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015325 ac_cv_broken_nice=yes
15326else
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15330 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015331fi
15332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333fi
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15336$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015337if test "$ac_cv_broken_nice" = yes
15338then
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015341
15342fi
15343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15345$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015346if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015348else
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015350 ac_cv_broken_poll=no
15351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015353/* end confdefs.h. */
15354
15355#include <poll.h>
15356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015357int main()
15358{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015359 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015360 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015361
15362 close (42);
15363
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015364 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015365 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015366 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015367 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015368 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015369 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015370 return 1;
15371}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015372
15373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015374if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015375 ac_cv_broken_poll=yes
15376else
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015382
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015383fi
15384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15386$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015387if test "$ac_cv_broken_poll" = yes
15388then
15389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015391
15392fi
15393
Brett Cannon43802422005-02-10 20:48:03 +000015394# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000015395# (which is not required by ISO C or UNIX spec) and/or if we support
15396# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015397ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Brett Cannon43802422005-02-10 20:48:03 +000015398#include <$ac_cv_struct_tm>
15399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400"
Victor Stinnere0be4232011-10-25 13:06:09 +020015401if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015402
15403cat >>confdefs.h <<_ACEOF
15404#define HAVE_STRUCT_TM_TM_ZONE 1
15405_ACEOF
15406
15407
15408fi
15409
15410if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015413
15414else
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15416"
Victor Stinnere0be4232011-10-25 13:06:09 +020015417if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419else
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421fi
15422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015424#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425_ACEOF
15426
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15428$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015429if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015430 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015433/* end confdefs.h. */
15434#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435#if !HAVE_DECL_TZNAME
15436extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015437#endif
15438
15439int
15440main ()
15441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015443 ;
15444 return 0;
15445}
15446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015447if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015448 ac_cv_var_tzname=yes
15449else
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015452rm -f core conftest.err conftest.$ac_objext \
15453 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15456$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015457 if test $ac_cv_var_tzname = yes; then
15458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015460
15461 fi
15462fi
15463
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015464
Martin v. Löwis1d459062005-03-14 21:23:33 +000015465# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15467$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015468if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015469 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015470else
15471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015473 ac_cv_working_tzset=no
15474else
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015476/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015477
15478#include <stdlib.h>
15479#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015480#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015481
15482#if HAVE_TZNAME
15483extern char *tzname[];
15484#endif
15485
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015486int main()
15487{
Brett Cannon18367812003-09-19 00:59:16 +000015488 /* Note that we need to ensure that not only does tzset(3)
15489 do 'something' with localtime, but it works as documented
15490 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015491 This includes making sure that tzname is set properly if
15492 tm->tm_zone does not exist since it is the alternative way
15493 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015494
15495 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015496 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015497 */
15498
Martin v. Löwis1d459062005-03-14 21:23:33 +000015499 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015500 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15501
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015502 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015503 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015504 if (localtime(&groundhogday)->tm_hour != 0)
15505 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015506#if HAVE_TZNAME
15507 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15508 if (strcmp(tzname[0], "UTC") ||
15509 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15510 exit(1);
15511#endif
Brett Cannon18367812003-09-19 00:59:16 +000015512
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015513 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015514 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015515 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015516 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015517#if HAVE_TZNAME
15518 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15519 exit(1);
15520#endif
Brett Cannon18367812003-09-19 00:59:16 +000015521
15522 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15523 tzset();
15524 if (localtime(&groundhogday)->tm_hour != 11)
15525 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015526#if HAVE_TZNAME
15527 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15528 exit(1);
15529#endif
15530
15531#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015532 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15533 exit(1);
15534 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15535 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015536#endif
Brett Cannon18367812003-09-19 00:59:16 +000015537
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015538 exit(0);
15539}
15540
15541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015542if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015543 ac_cv_working_tzset=yes
15544else
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015549fi
15550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551fi
15552
Matthias Kloseb9621712010-04-24 17:59:49 +000015553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15554$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015555if test "$ac_cv_working_tzset" = yes
15556then
15557
Matthias Kloseb9621712010-04-24 17:59:49 +000015558$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015559
15560fi
15561
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015562# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15564$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015565if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015569/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015570#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015571int
15572main ()
15573{
15574
15575struct stat st;
15576st.st_mtim.tv_nsec = 1;
15577
15578 ;
15579 return 0;
15580}
15581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015583 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015584else
Matthias Kloseb9621712010-04-24 17:59:49 +000015585 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15588fi
15589
Matthias Kloseb9621712010-04-24 17:59:49 +000015590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15591$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015592if test "$ac_cv_stat_tv_nsec" = yes
15593then
15594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015596
15597fi
15598
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015599# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15601$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015602if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015606/* end confdefs.h. */
15607#include <sys/stat.h>
15608int
15609main ()
15610{
15611
15612struct stat st;
15613st.st_mtimespec.tv_nsec = 1;
15614
15615 ;
15616 return 0;
15617}
15618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015620 ac_cv_stat_tv_nsec2=yes
15621else
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15625fi
15626
Matthias Kloseb9621712010-04-24 17:59:49 +000015627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15628$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015629if test "$ac_cv_stat_tv_nsec2" = yes
15630then
15631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015633
15634fi
15635
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015636# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015637ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015638if test "$cross_compiling" = no; then
15639 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15640fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015641
15642for ac_header in curses.h ncurses.h
15643do :
15644 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15645ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15646if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15647 cat >>confdefs.h <<_ACEOF
15648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15649_ACEOF
15650
15651fi
15652
15653done
15654
15655
15656# On Solaris, term.h requires curses.h
15657for ac_header in term.h
15658do :
15659 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15660#ifdef HAVE_CURSES_H
15661#include <curses.h>
15662#endif
15663
15664"
15665if test "x$ac_cv_header_term_h" = xyes; then :
15666 cat >>confdefs.h <<_ACEOF
15667#define HAVE_TERM_H 1
15668_ACEOF
15669
15670fi
15671
15672done
15673
15674
Jack Jansen666b1e72001-10-31 12:11:48 +000015675# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15677$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015678if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015679 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015680else
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015682/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015683#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015684int
15685main ()
15686{
Jack Jansen666b1e72001-10-31 12:11:48 +000015687
15688 int rtn;
15689 rtn = mvwdelch(0,0,0);
15690
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 ;
15692 return 0;
15693}
15694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015695if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015696 ac_cv_mvwdelch_is_expression=yes
15697else
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15701fi
15702
Matthias Kloseb9621712010-04-24 17:59:49 +000015703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15704$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015705
15706if test "$ac_cv_mvwdelch_is_expression" = yes
15707then
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
Matthias Kloseb9621712010-04-24 17:59:49 +000015709$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015710
15711fi
15712
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015713# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15714# structs since version 5.7. If the macro is defined as zero before including
15715# [n]curses.h, ncurses will expose fields of the structs regardless of the
15716# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15718$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015719if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015720 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015721else
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015723/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015724
15725 #define NCURSES_OPAQUE 0
15726 #include <curses.h>
15727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728int
15729main ()
15730{
Jack Jansen666b1e72001-10-31 12:11:48 +000015731
15732 WINDOW *w;
15733 w->_flags = 0;
15734
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 ;
15736 return 0;
15737}
15738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015739if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015740 ac_cv_window_has_flags=yes
15741else
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745fi
15746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15748$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015749
Jack Jansen666b1e72001-10-31 12:11:48 +000015750
15751if test "$ac_cv_window_has_flags" = yes
15752then
Martin v. Löwis11437992002-04-12 09:54:03 +000015753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015755
15756fi
15757
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15759$as_echo_n "checking for is_pad... " >&6; }
15760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15761/* end confdefs.h. */
15762#include <curses.h>
15763int
15764main ()
15765{
15766
15767#ifndef is_pad
15768void *x=is_pad
15769#endif
15770
15771 ;
15772 return 0;
15773}
15774_ACEOF
15775if ac_fn_c_try_compile "$LINENO"; then :
15776
15777$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15778
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15780$as_echo "yes" >&6; }
15781else
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15783$as_echo "no" >&6; }
15784
15785fi
15786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15789$as_echo_n "checking for is_term_resized... " >&6; }
15790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015791/* end confdefs.h. */
15792#include <curses.h>
15793int
15794main ()
15795{
15796void *x=is_term_resized
15797 ;
15798 return 0;
15799}
15800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015801if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015804
Matthias Kloseb159a552010-04-25 21:00:44 +000015805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015806$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015807else
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15809$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015810
15811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15815$as_echo_n "checking for resize_term... " >&6; }
15816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015817/* end confdefs.h. */
15818#include <curses.h>
15819int
15820main ()
15821{
15822void *x=resize_term
15823 ;
15824 return 0;
15825}
15826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015827if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015830
Matthias Kloseb159a552010-04-25 21:00:44 +000015831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015832$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015833else
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15835$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015836
15837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15839
Matthias Kloseb9621712010-04-24 17:59:49 +000015840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15841$as_echo_n "checking for resizeterm... " >&6; }
15842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015843/* end confdefs.h. */
15844#include <curses.h>
15845int
15846main ()
15847{
15848void *x=resizeterm
15849 ;
15850 return 0;
15851}
15852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015853if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015856
Matthias Kloseb159a552010-04-25 21:00:44 +000015857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015858$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015859else
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15861$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015862
15863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015865
15866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15867$as_echo_n "checking for immedok... " >&6; }
15868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15869/* end confdefs.h. */
15870#include <curses.h>
15871int
15872main ()
15873{
15874
15875#ifndef immedok
15876void *x=immedok
15877#endif
15878
15879 ;
15880 return 0;
15881}
15882_ACEOF
15883if ac_fn_c_try_compile "$LINENO"; then :
15884
15885$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15886
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15888$as_echo "yes" >&6; }
15889else
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15891$as_echo "no" >&6; }
15892
15893fi
15894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15895
15896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15897$as_echo_n "checking for syncok... " >&6; }
15898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15899/* end confdefs.h. */
15900#include <curses.h>
15901int
15902main ()
15903{
15904
15905#ifndef syncok
15906void *x=syncok
15907#endif
15908
15909 ;
15910 return 0;
15911}
15912_ACEOF
15913if ac_fn_c_try_compile "$LINENO"; then :
15914
15915$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15916
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15918$as_echo "yes" >&6; }
15919else
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15921$as_echo "no" >&6; }
15922
15923fi
15924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15925
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15927$as_echo_n "checking for wchgat... " >&6; }
15928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15929/* end confdefs.h. */
15930#include <curses.h>
15931int
15932main ()
15933{
15934
15935#ifndef wchgat
15936void *x=wchgat
15937#endif
15938
15939 ;
15940 return 0;
15941}
15942_ACEOF
15943if ac_fn_c_try_compile "$LINENO"; then :
15944
15945$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15946
15947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15948$as_echo "yes" >&6; }
15949else
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15951$as_echo "no" >&6; }
15952
15953fi
15954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15955
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15957$as_echo_n "checking for filter... " >&6; }
15958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15959/* end confdefs.h. */
15960#include <curses.h>
15961int
15962main ()
15963{
15964
15965#ifndef filter
15966void *x=filter
15967#endif
15968
15969 ;
15970 return 0;
15971}
15972_ACEOF
15973if ac_fn_c_try_compile "$LINENO"; then :
15974
15975$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15976
15977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15978$as_echo "yes" >&6; }
15979else
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15981$as_echo "no" >&6; }
15982
15983fi
15984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985
15986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15987$as_echo_n "checking for has_key... " >&6; }
15988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15989/* end confdefs.h. */
15990#include <curses.h>
15991int
15992main ()
15993{
15994
15995#ifndef has_key
15996void *x=has_key
15997#endif
15998
15999 ;
16000 return 0;
16001}
16002_ACEOF
16003if ac_fn_c_try_compile "$LINENO"; then :
16004
16005$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16006
16007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16008$as_echo "yes" >&6; }
16009else
16010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16011$as_echo "no" >&6; }
16012
16013fi
16014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16015
16016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16017$as_echo_n "checking for typeahead... " >&6; }
16018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16019/* end confdefs.h. */
16020#include <curses.h>
16021int
16022main ()
16023{
16024
16025#ifndef typeahead
16026void *x=typeahead
16027#endif
16028
16029 ;
16030 return 0;
16031}
16032_ACEOF
16033if ac_fn_c_try_compile "$LINENO"; then :
16034
16035$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16036
16037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16038$as_echo "yes" >&6; }
16039else
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16041$as_echo "no" >&6; }
16042
16043fi
16044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16045
16046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16047$as_echo_n "checking for use_env... " >&6; }
16048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16049/* end confdefs.h. */
16050#include <curses.h>
16051int
16052main ()
16053{
16054
16055#ifndef use_env
16056void *x=use_env
16057#endif
16058
16059 ;
16060 return 0;
16061}
16062_ACEOF
16063if ac_fn_c_try_compile "$LINENO"; then :
16064
16065$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16066
16067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16068$as_echo "yes" >&6; }
16069else
16070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16071$as_echo "no" >&6; }
16072
16073fi
16074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016075# last curses configure check
16076CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16079$as_echo "$as_me: checking for device files" >&6;}
16080
16081if test "x$cross_compiling" = xyes; then
16082 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16084$as_echo_n "checking for /dev/ptmx... " >&6; }
16085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16086$as_echo "not set" >&6; }
16087 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16088 fi
16089 if test "${ac_cv_file__dev_ptc+set}" != set; then
16090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16091$as_echo_n "checking for /dev/ptc... " >&6; }
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16093$as_echo "not set" >&6; }
16094 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16095 fi
16096fi
16097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16099$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016100if ${ac_cv_file__dev_ptmx+:} false; then :
16101 $as_echo_n "(cached) " >&6
16102else
16103 test "$cross_compiling" = yes &&
16104 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16105if test -r "/dev/ptmx"; then
16106 ac_cv_file__dev_ptmx=yes
16107else
16108 ac_cv_file__dev_ptmx=no
16109fi
16110fi
16111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16112$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16113if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016114
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016115fi
16116
16117if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016118
Matthias Kloseb9621712010-04-24 17:59:49 +000016119$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016120
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16123$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016124if ${ac_cv_file__dev_ptc+:} false; then :
16125 $as_echo_n "(cached) " >&6
16126else
16127 test "$cross_compiling" = yes &&
16128 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16129if test -r "/dev/ptc"; then
16130 ac_cv_file__dev_ptc=yes
16131else
16132 ac_cv_file__dev_ptc=no
16133fi
16134fi
16135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16136$as_echo "$ac_cv_file__dev_ptc" >&6; }
16137if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016138
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016139fi
16140
16141if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016144
Neal Norwitz865400f2003-03-21 01:42:58 +000016145fi
16146
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016147if test $ac_sys_system = Darwin
16148then
16149 LIBS="$LIBS -framework CoreFoundation"
16150fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016151
Matthias Kloseb9621712010-04-24 17:59:49 +000016152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16153$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016154if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016155 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016156else
Matthias Kloseb9621712010-04-24 17:59:49 +000016157 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016158 ac_cv_have_size_t_format="cross -- assuming yes"
16159
Thomas Wouters477c8d52006-05-27 19:21:47 +000016160else
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016162/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016163
Thomas Wouters477c8d52006-05-27 19:21:47 +000016164#include <stdio.h>
16165#include <stddef.h>
16166#include <string.h>
16167
Christian Heimes2c181612007-12-17 20:04:13 +000016168#ifdef HAVE_SYS_TYPES_H
16169#include <sys/types.h>
16170#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016171
16172#ifdef HAVE_SSIZE_T
16173typedef ssize_t Py_ssize_t;
16174#elif SIZEOF_VOID_P == SIZEOF_LONG
16175typedef long Py_ssize_t;
16176#else
16177typedef int Py_ssize_t;
16178#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016179
Christian Heimes2c181612007-12-17 20:04:13 +000016180int main()
16181{
16182 char buffer[256];
16183
Thomas Wouters477c8d52006-05-27 19:21:47 +000016184 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16185 return 1;
16186
Thomas Wouters89f507f2006-12-13 04:49:30 +000016187 if (strcmp(buffer, "123"))
16188 return 1;
16189
16190 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16191 return 1;
16192
16193 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016194 return 1;
16195
16196 return 0;
16197}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016198
Thomas Wouters477c8d52006-05-27 19:21:47 +000016199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016200if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016201 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016202else
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016207fi
16208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16211$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016212if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016213
Matthias Kloseb9621712010-04-24 17:59:49 +000016214$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016215
16216fi
16217
Matthias Kloseb9621712010-04-24 17:59:49 +000016218ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016219#ifdef HAVE_SYS_TYPES_H
16220#include <sys/types.h>
16221#endif
16222#ifdef HAVE_SYS_SOCKET_H
16223#include <sys/socket.h>
16224#endif
16225
Matthias Kloseb9621712010-04-24 17:59:49 +000016226"
Victor Stinnere0be4232011-10-25 13:06:09 +020016227if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016228
Martin v. Löwis11437992002-04-12 09:54:03 +000016229else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016232
16233fi
16234
Michael W. Hudson54241132001-12-07 15:38:26 +000016235
Matthias Kloseb9621712010-04-24 17:59:49 +000016236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16237$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016238if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016239 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016240else
Matthias Kloseb9621712010-04-24 17:59:49 +000016241 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016242 ac_cv_broken_mbstowcs=no
16243else
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016245/* end confdefs.h. */
16246
Stefan Krah19c21392012-11-22 23:47:32 +010016247#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016248#include<stdlib.h>
16249int main() {
16250 size_t len = -1;
16251 const char *str = "text";
16252 len = mbstowcs(NULL, str, 0);
16253 return (len != 4);
16254}
16255
16256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016257if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016258 ac_cv_broken_mbstowcs=no
16259else
Matthias Kloseb9621712010-04-24 17:59:49 +000016260 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016264fi
16265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016266fi
16267
Matthias Kloseb9621712010-04-24 17:59:49 +000016268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16269$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016270if test "$ac_cv_broken_mbstowcs" = yes
16271then
16272
Matthias Kloseb9621712010-04-24 17:59:49 +000016273$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016274
16275fi
16276
Antoine Pitroub52ec782009-01-25 16:34:23 +000016277# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16279$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016280
16281# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016282if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016283 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016284if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016285then
16286
Matthias Kloseb9621712010-04-24 17:59:49 +000016287$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16290$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016291fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016292if test "$withval" = no
16293then
16294
16295$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16296
Matthias Kloseb9621712010-04-24 17:59:49 +000016297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16298$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016299fi
16300
Antoine Pitrou042b1282010-08-13 21:15:58 +000016301else
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16303$as_echo "no value specified" >&6; }
16304fi
16305
Antoine Pitroub52ec782009-01-25 16:34:23 +000016306
Matthias Kloseb17289e2012-03-15 19:51:34 +010016307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16308$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16309if ${ac_cv_computed_gotos+:} false; then :
16310 $as_echo_n "(cached) " >&6
16311else
16312 if test "$cross_compiling" = yes; then :
16313 if test "${with_computed_gotos+set}" = set; then
16314 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16315 else
16316 ac_cv_computed_gotos=no
16317 fi
16318else
16319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320/* end confdefs.h. */
16321
16322int main(int argc, char **argv)
16323{
16324 static void *targets[1] = { &&LABEL1 };
16325 goto LABEL2;
16326LABEL1:
16327 return 0;
16328LABEL2:
16329 goto *targets[0];
16330 return 1;
16331}
16332
16333_ACEOF
16334if ac_fn_c_try_run "$LINENO"; then :
16335 ac_cv_computed_gotos=yes
16336else
16337 ac_cv_computed_gotos=no
16338fi
16339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16340 conftest.$ac_objext conftest.beam conftest.$ac_ext
16341fi
16342
16343fi
16344
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16346$as_echo "$ac_cv_computed_gotos" >&6; }
16347case "$ac_cv_computed_gotos" in yes*)
16348
16349$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16350
16351esac
16352
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016353case $ac_sys_system in
16354AIX*)
16355
16356$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16357 ;;
16358esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016359
Michael W. Hudson54241132001-12-07 15:38:26 +000016360
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016361
16362
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016363for h in `(cd $srcdir;echo Python/thread_*.h)`
16364do
16365 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16366done
16367
Michael W. Hudson54241132001-12-07 15:38:26 +000016368
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016369SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16371$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016372for dir in $SRCDIRS; do
16373 if test ! -d $dir; then
16374 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016375 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016376done
Matthias Kloseb9621712010-04-24 17:59:49 +000016377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16378$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016379
Stefan Krah1919b7e2012-03-21 18:25:23 +010016380# Availability of -O2:
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16382$as_echo_n "checking for -O2... " >&6; }
16383saved_cflags="$CFLAGS"
16384CFLAGS="-O2"
16385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16386/* end confdefs.h. */
16387
16388int
16389main ()
16390{
16391
16392
16393 ;
16394 return 0;
16395}
16396_ACEOF
16397if ac_fn_c_try_compile "$LINENO"; then :
16398 have_O2=yes
16399else
16400 have_O2=no
16401fi
16402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16404$as_echo "$have_O2" >&6; }
16405CFLAGS="$saved_cflags"
16406
16407# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16408# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16410$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16411saved_cflags="$CFLAGS"
16412CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16413if test "$have_O2" = no; then
16414 CFLAGS=""
16415fi
16416if test "$cross_compiling" = yes; then :
16417 have_glibc_memmove_bug=undefined
16418else
16419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16420/* end confdefs.h. */
16421
16422#include <stdio.h>
16423#include <stdlib.h>
16424#include <string.h>
16425void foo(void *p, void *q) { memmove(p, q, 19); }
16426int main() {
16427 char a[32] = "123456789000000000";
16428 foo(&a[9], a);
16429 if (strcmp(a, "123456789123456789000000000") != 0)
16430 return 1;
16431 foo(a, &a[9]);
16432 if (strcmp(a, "123456789000000000") != 0)
16433 return 1;
16434 return 0;
16435}
16436
16437_ACEOF
16438if ac_fn_c_try_run "$LINENO"; then :
16439 have_glibc_memmove_bug=no
16440else
16441 have_glibc_memmove_bug=yes
16442fi
16443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16444 conftest.$ac_objext conftest.beam conftest.$ac_ext
16445fi
16446
16447CFLAGS="$saved_cflags"
16448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16449$as_echo "$have_glibc_memmove_bug" >&6; }
16450if test "$have_glibc_memmove_bug" = yes; then
16451
16452$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16453
16454fi
16455
16456if test "$have_gcc_asm_for_x87" = yes; then
16457 # Some versions of gcc miscompile inline asm:
16458 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16459 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16460 case $CC in
16461 *gcc*)
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16463$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16464 saved_cflags="$CFLAGS"
16465 CFLAGS="-O2"
16466 if test "$cross_compiling" = yes; then :
16467 have_ipa_pure_const_bug=undefined
16468else
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470/* end confdefs.h. */
16471
16472 __attribute__((noinline)) int
16473 foo(int *p) {
16474 int r;
16475 asm ( "movl \$6, (%1)\n\t"
16476 "xorl %0, %0\n\t"
16477 : "=r" (r) : "r" (p) : "memory"
16478 );
16479 return r;
16480 }
16481 int main() {
16482 int p = 8;
16483 if ((foo(&p) ? : p) != 6)
16484 return 1;
16485 return 0;
16486 }
16487
16488_ACEOF
16489if ac_fn_c_try_run "$LINENO"; then :
16490 have_ipa_pure_const_bug=no
16491else
16492 have_ipa_pure_const_bug=yes
16493fi
16494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16495 conftest.$ac_objext conftest.beam conftest.$ac_ext
16496fi
16497
16498 CFLAGS="$saved_cflags"
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16500$as_echo "$have_ipa_pure_const_bug" >&6; }
16501 if test "$have_ipa_pure_const_bug" = yes; then
16502
16503$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16504
16505 fi
16506 ;;
16507 esac
16508fi
16509
Victor Stinner4f5366e2015-01-09 02:13:19 +010016510# Check for stdatomic.h
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16512$as_echo_n "checking for stdatomic.h... " >&6; }
16513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16514/* end confdefs.h. */
16515
16516
16517 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016518 atomic_int value = ATOMIC_VAR_INIT(1);
16519 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016520 int main() {
16521 int loaded_value = atomic_load(&value);
16522 return 0;
16523 }
16524
16525
16526_ACEOF
16527if ac_fn_c_try_link "$LINENO"; then :
16528 have_stdatomic_h=yes
16529else
16530 have_stdatomic_h=no
16531fi
16532rm -f core conftest.err conftest.$ac_objext \
16533 conftest$ac_exeext conftest.$ac_ext
16534
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16536$as_echo "$have_stdatomic_h" >&6; }
16537
16538if test "$have_stdatomic_h" = yes; then
16539
16540$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16541
16542fi
16543
16544# Check for GCC >= 4.7 __atomic builtins
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16546$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16548/* end confdefs.h. */
16549
16550
16551 volatile int val = 1;
16552 int main() {
16553 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16554 return 0;
16555 }
16556
16557
16558_ACEOF
16559if ac_fn_c_try_link "$LINENO"; then :
16560 have_builtin_atomic=yes
16561else
16562 have_builtin_atomic=no
16563fi
16564rm -f core conftest.err conftest.$ac_objext \
16565 conftest$ac_exeext conftest.$ac_ext
16566
16567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16568$as_echo "$have_builtin_atomic" >&6; }
16569
16570if test "$have_builtin_atomic" = yes; then
16571
16572$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16573
16574fi
16575
Ned Deily322f5ba2013-11-21 23:01:59 -080016576# ensurepip option
16577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16578$as_echo_n "checking for ensurepip... " >&6; }
16579
16580# Check whether --with-ensurepip was given.
16581if test "${with_ensurepip+set}" = set; then :
16582 withval=$with_ensurepip;
16583else
16584 with_ensurepip=upgrade
16585fi
16586
16587case $with_ensurepip in #(
16588 yes|upgrade) :
16589 ENSUREPIP=upgrade ;; #(
16590 install) :
16591 ENSUREPIP=install ;; #(
16592 no) :
16593 ENSUREPIP=no ;; #(
16594 *) :
16595 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16596esac
16597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16598$as_echo "$ENSUREPIP" >&6; }
16599
16600
Victor Stinner35a97c02015-03-08 02:59:09 +010016601# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16603$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605/* end confdefs.h. */
16606
16607
16608 #include <dirent.h>
16609
16610 int main() {
16611 struct dirent entry;
16612 return entry.d_type == DT_UNKNOWN;
16613 }
16614
16615
16616_ACEOF
16617if ac_fn_c_try_link "$LINENO"; then :
16618 have_dirent_d_type=yes
16619else
16620 have_dirent_d_type=no
16621fi
16622rm -f core conftest.err conftest.$ac_objext \
16623 conftest$ac_exeext conftest.$ac_ext
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16625$as_echo "$have_dirent_d_type" >&6; }
16626
16627if test "$have_dirent_d_type" = yes; then
16628
16629$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16630
16631fi
16632
Victor Stinner9eb57c52015-03-19 22:21:49 +010016633# check if the Linux getrandom() syscall is available
16634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16635$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16637/* end confdefs.h. */
16638
16639
Victor Stinner1b80b242016-04-12 22:34:58 +020016640 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016641 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016642 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016643
16644 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016645 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016646 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016647 const int flags = GRND_NONBLOCK;
16648 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016649 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016650 return 0;
16651 }
16652
16653
16654_ACEOF
16655if ac_fn_c_try_link "$LINENO"; then :
16656 have_getrandom_syscall=yes
16657else
16658 have_getrandom_syscall=no
16659fi
16660rm -f core conftest.err conftest.$ac_objext \
16661 conftest$ac_exeext conftest.$ac_ext
16662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16663$as_echo "$have_getrandom_syscall" >&6; }
16664
16665if test "$have_getrandom_syscall" = yes; then
16666
16667$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16668
16669fi
16670
Victor Stinner3abf44e2015-09-18 15:38:37 +020016671# check if the getrandom() function is available
16672# the test was written for the Solaris function of <sys/random.h>
16673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16674$as_echo_n "checking for the getrandom() function... " >&6; }
16675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16676/* end confdefs.h. */
16677
16678
16679 #include <sys/random.h>
16680
16681 int main() {
16682 char buffer[1];
16683 const size_t buflen = sizeof(buffer);
16684 const int flags = 0;
16685 /* ignore the result, Python checks for ENOSYS at runtime */
16686 (void)getrandom(buffer, buflen, flags);
16687 return 0;
16688 }
16689
16690
16691_ACEOF
16692if ac_fn_c_try_link "$LINENO"; then :
16693 have_getrandom=yes
16694else
16695 have_getrandom=no
16696fi
16697rm -f core conftest.err conftest.$ac_objext \
16698 conftest$ac_exeext conftest.$ac_ext
16699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16700$as_echo "$have_getrandom" >&6; }
16701
16702if test "$have_getrandom" = yes; then
16703
16704$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16705
16706fi
16707
Guido van Rossum627b2d71993-12-24 10:39:16 +000016708# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016709ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016710
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016711ac_config_files="$ac_config_files Modules/ld_so_aix"
16712
Martin v. Löwis11437992002-04-12 09:54:03 +000016713cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714# This file is a shell script that caches the results of configure
16715# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016716# scripts and configure runs, see configure's option --config-cache.
16717# It is not useful on other systems. If it contains results you don't
16718# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016719#
Martin v. Löwis11437992002-04-12 09:54:03 +000016720# config.status only pays attention to the cache file if you give it
16721# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016722#
Skip Montanaro6dead952003-09-25 14:50:04 +000016723# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016724# loading this file, other *unset* `ac_cv_foo' will be assigned the
16725# following values.
16726
16727_ACEOF
16728
Guido van Rossumf78abae1997-01-21 22:02:36 +000016729# The following way of writing the cache mishandles newlines in values,
16730# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016732# Ultrix sh set writes to stderr and can't be redirected directly,
16733# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734(
16735 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16736 eval ac_val=\$$ac_var
16737 case $ac_val in #(
16738 *${as_nl}*)
16739 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16741$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742 esac
16743 case $ac_var in #(
16744 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016745 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16746 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 esac ;;
16748 esac
16749 done
16750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16753 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016754 # `set' does not quote correctly, so add quotes: double-quote
16755 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 "s/'/'\\\\''/g;
16758 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 *)
16761 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016762 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764 esac |
16765 sort
16766) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16772 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16774 :end' >>confcache
16775if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16776 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016777 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016778 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16779$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016780 if test ! -f "$cache_file" || test -h "$cache_file"; then
16781 cat confcache >"$cache_file"
16782 else
16783 case $cache_file in #(
16784 */* | ?:*)
16785 mv -f confcache "$cache_file"$$ &&
16786 mv -f "$cache_file"$$ "$cache_file" ;; #(
16787 *)
16788 mv -f confcache "$cache_file" ;;
16789 esac
16790 fi
16791 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016792 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016793 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16794$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016795 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016796fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016797rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016799test "x$prefix" = xNONE && prefix=$ac_default_prefix
16800# Let make expand exec_prefix.
16801test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016802
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016803DEFS=-DHAVE_CONFIG_H
16804
Skip Montanaro6dead952003-09-25 14:50:04 +000016805ac_libobjs=
16806ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016807U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016808for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16809 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016811 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16813 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016814 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16815 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016816done
16817LIBOBJS=$ac_libobjs
16818
16819LTLIBOBJS=$ac_ltlibobjs
16820
16821
Martin v. Löwis11437992002-04-12 09:54:03 +000016822
Matthias Kloseb9621712010-04-24 17:59:49 +000016823
Victor Stinnere0be4232011-10-25 13:06:09 +020016824: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016825ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016826ac_clean_files_save=$ac_clean_files
16827ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016828{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16829$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16830as_write_fail=0
16831cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016832#! $SHELL
16833# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016834# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016835# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016836# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016837
Martin v. Löwis11437992002-04-12 09:54:03 +000016838debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016839ac_cs_recheck=false
16840ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016841
Matthias Kloseb9621712010-04-24 17:59:49 +000016842SHELL=\${CONFIG_SHELL-$SHELL}
16843export SHELL
16844_ASEOF
16845cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16846## -------------------- ##
16847## M4sh Initialization. ##
16848## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850# Be more Bourne compatible
16851DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016852if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016853 emulate sh
16854 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016856 # is contrary to our usage. Disable this feature.
16857 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016859else
Matthias Kloseb9621712010-04-24 17:59:49 +000016860 case `(set -o) 2>/dev/null` in #(
16861 *posix*) :
16862 set -o posix ;; #(
16863 *) :
16864 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016866fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016867
16868
Matthias Kloseb9621712010-04-24 17:59:49 +000016869as_nl='
16870'
16871export as_nl
16872# Printing a long string crashes Solaris 7 /usr/bin/printf.
16873as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16874as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16875as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16876# Prefer a ksh shell builtin over an external printf program on Solaris,
16877# but without wasting forks for bash or zsh.
16878if test -z "$BASH_VERSION$ZSH_VERSION" \
16879 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16880 as_echo='print -r --'
16881 as_echo_n='print -rn --'
16882elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16883 as_echo='printf %s\n'
16884 as_echo_n='printf %s'
16885else
16886 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16887 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16888 as_echo_n='/usr/ucb/echo -n'
16889 else
16890 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16891 as_echo_n_body='eval
16892 arg=$1;
16893 case $arg in #(
16894 *"$as_nl"*)
16895 expr "X$arg" : "X\\(.*\\)$as_nl";
16896 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16897 esac;
16898 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16899 '
16900 export as_echo_n_body
16901 as_echo_n='sh -c $as_echo_n_body as_echo'
16902 fi
16903 export as_echo_body
16904 as_echo='sh -c $as_echo_body as_echo'
16905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
16907# The user is always right.
16908if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016909 PATH_SEPARATOR=:
16910 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16911 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16912 PATH_SEPARATOR=';'
16913 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916
16917# IFS
16918# We need space, tab and new line, in precisely that order. Quoting is
16919# there to prevent editors from complaining about space-tab.
16920# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16921# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016922IFS=" "" $as_nl"
16923
16924# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016925as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016926case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927 *[\\/]* ) as_myself=$0 ;;
16928 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016929for as_dir in $PATH
16930do
16931 IFS=$as_save_IFS
16932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016933 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16934 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937 ;;
16938esac
16939# We did not find ourselves, most probably we were run as `sh COMMAND'
16940# in which case we are not to be found in the path.
16941if test "x$as_myself" = x; then
16942 as_myself=$0
16943fi
16944if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016945 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16946 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947fi
16948
Matthias Kloseb9621712010-04-24 17:59:49 +000016949# Unset variables that we do not need and which cause bugs (e.g. in
16950# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16951# suppresses any "Segmentation fault" message there. '((' could
16952# trigger a bug in pdksh 5.2.14.
16953for as_var in BASH_ENV ENV MAIL MAILPATH
16954do eval test x\${$as_var+set} = xset \
16955 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956done
16957PS1='$ '
16958PS2='> '
16959PS4='+ '
16960
16961# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016962LC_ALL=C
16963export LC_ALL
16964LANGUAGE=C
16965export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966
Matthias Kloseb9621712010-04-24 17:59:49 +000016967# CDPATH.
16968(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16969
16970
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016971# as_fn_error STATUS ERROR [LINENO LOG_FD]
16972# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016973# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16974# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016975# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016976as_fn_error ()
16977{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016978 as_status=$1; test $as_status -eq 0 && as_status=1
16979 if test "$4"; then
16980 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16981 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016982 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016983 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 as_fn_exit $as_status
16985} # as_fn_error
16986
16987
16988# as_fn_set_status STATUS
16989# -----------------------
16990# Set $? to STATUS, without forking.
16991as_fn_set_status ()
16992{
16993 return $1
16994} # as_fn_set_status
16995
16996# as_fn_exit STATUS
16997# -----------------
16998# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16999as_fn_exit ()
17000{
17001 set +e
17002 as_fn_set_status $1
17003 exit $1
17004} # as_fn_exit
17005
17006# as_fn_unset VAR
17007# ---------------
17008# Portably unset VAR.
17009as_fn_unset ()
17010{
17011 { eval $1=; unset $1;}
17012}
17013as_unset=as_fn_unset
17014# as_fn_append VAR VALUE
17015# ----------------------
17016# Append the text in VALUE to the end of the definition contained in VAR. Take
17017# advantage of any shell optimizations that allow amortized linear growth over
17018# repeated appends, instead of the typical quadratic growth present in naive
17019# implementations.
17020if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17021 eval 'as_fn_append ()
17022 {
17023 eval $1+=\$2
17024 }'
17025else
17026 as_fn_append ()
17027 {
17028 eval $1=\$$1\$2
17029 }
17030fi # as_fn_append
17031
17032# as_fn_arith ARG...
17033# ------------------
17034# Perform arithmetic evaluation on the ARGs, and store the result in the
17035# global $as_val. Take advantage of shells that can avoid forks. The arguments
17036# must be portable across $(()) and expr.
17037if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17038 eval 'as_fn_arith ()
17039 {
17040 as_val=$(( $* ))
17041 }'
17042else
17043 as_fn_arith ()
17044 {
17045 as_val=`expr "$@" || test $? -eq 1`
17046 }
17047fi # as_fn_arith
17048
17049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050if expr a : '\(a\)' >/dev/null 2>&1 &&
17051 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17052 as_expr=expr
17053else
17054 as_expr=false
17055fi
17056
17057if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17058 as_basename=basename
17059else
17060 as_basename=false
17061fi
17062
Matthias Kloseb9621712010-04-24 17:59:49 +000017063if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17064 as_dirname=dirname
17065else
17066 as_dirname=false
17067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069as_me=`$as_basename -- "$0" ||
17070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17071 X"$0" : 'X\(//\)$' \| \
17072 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017073$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074 sed '/^.*\/\([^/][^/]*\)\/*$/{
17075 s//\1/
17076 q
17077 }
17078 /^X\/\(\/\/\)$/{
17079 s//\1/
17080 q
17081 }
17082 /^X\/\(\/\).*/{
17083 s//\1/
17084 q
17085 }
17086 s/.*/./; q'`
17087
Matthias Kloseb9621712010-04-24 17:59:49 +000017088# Avoid depending upon Character Ranges.
17089as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17090as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17091as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17092as_cr_digits='0123456789'
17093as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094
17095ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017096case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017098 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017100 xy) ECHO_C='\c';;
17101 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17102 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 esac;;
17104*)
17105 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017107
Martin v. Löwis11437992002-04-12 09:54:03 +000017108rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109if test -d conf$$.dir; then
17110 rm -f conf$$.dir/conf$$.file
17111else
17112 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017113 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017115if (echo >conf$$.file) 2>/dev/null; then
17116 if ln -s conf$$.file conf$$ 2>/dev/null; then
17117 as_ln_s='ln -s'
17118 # ... but there are two gotchas:
17119 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17120 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017121 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017123 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017124 elif ln conf$$.file conf$$ 2>/dev/null; then
17125 as_ln_s=ln
17126 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017127 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017129else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017130 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17133rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017134
Matthias Kloseb9621712010-04-24 17:59:49 +000017135
17136# as_fn_mkdir_p
17137# -------------
17138# Create "$as_dir" as a directory, including parents if necessary.
17139as_fn_mkdir_p ()
17140{
17141
17142 case $as_dir in #(
17143 -*) as_dir=./$as_dir;;
17144 esac
17145 test -d "$as_dir" || eval $as_mkdir_p || {
17146 as_dirs=
17147 while :; do
17148 case $as_dir in #(
17149 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17150 *) as_qdir=$as_dir;;
17151 esac
17152 as_dirs="'$as_qdir' $as_dirs"
17153 as_dir=`$as_dirname -- "$as_dir" ||
17154$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17155 X"$as_dir" : 'X\(//\)[^/]' \| \
17156 X"$as_dir" : 'X\(//\)$' \| \
17157 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17158$as_echo X"$as_dir" |
17159 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17160 s//\1/
17161 q
17162 }
17163 /^X\(\/\/\)[^/].*/{
17164 s//\1/
17165 q
17166 }
17167 /^X\(\/\/\)$/{
17168 s//\1/
17169 q
17170 }
17171 /^X\(\/\).*/{
17172 s//\1/
17173 q
17174 }
17175 s/.*/./; q'`
17176 test -d "$as_dir" && break
17177 done
17178 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017179 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017180
17181
17182} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017183if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017184 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017185else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017186 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017187 as_mkdir_p=false
17188fi
17189
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017190
17191# as_fn_executable_p FILE
17192# -----------------------
17193# Test if FILE is an executable regular file.
17194as_fn_executable_p ()
17195{
17196 test -f "$1" && test -x "$1"
17197} # as_fn_executable_p
17198as_test_x='test -x'
17199as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017200
17201# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017202as_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 +000017203
17204# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017205as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017206
17207
Martin v. Löwis11437992002-04-12 09:54:03 +000017208exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017209## ----------------------------------- ##
17210## Main body of $CONFIG_STATUS script. ##
17211## ----------------------------------- ##
17212_ASEOF
17213test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017214
Matthias Kloseb9621712010-04-24 17:59:49 +000017215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17216# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017217# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218# values after options handling.
17219ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017220This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017221generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017222
17223 CONFIG_FILES = $CONFIG_FILES
17224 CONFIG_HEADERS = $CONFIG_HEADERS
17225 CONFIG_LINKS = $CONFIG_LINKS
17226 CONFIG_COMMANDS = $CONFIG_COMMANDS
17227 $ $0 $@
17228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229on `(hostname || uname -n) 2>/dev/null | sed 1q`
17230"
17231
Martin v. Löwis11437992002-04-12 09:54:03 +000017232_ACEOF
17233
Matthias Kloseb9621712010-04-24 17:59:49 +000017234case $ac_config_files in *"
17235"*) set x $ac_config_files; shift; ac_config_files=$*;;
17236esac
17237
17238case $ac_config_headers in *"
17239"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17240esac
17241
17242
17243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017244# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017245config_files="$ac_config_files"
17246config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017249
Matthias Kloseb9621712010-04-24 17:59:49 +000017250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017251ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017252\`$as_me' instantiates files and other configuration actions
17253from templates according to the current configuration. Unless the files
17254and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017255
Matthias Kloseb9621712010-04-24 17:59:49 +000017256Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017257
17258 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 --config print configuration, then exit
17261 -q, --quiet, --silent
17262 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 -d, --debug don't remove temporary files
17264 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017265 --file=FILE[:TEMPLATE]
17266 instantiate the configuration file FILE
17267 --header=FILE[:TEMPLATE]
17268 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017269
17270Configuration files:
17271$config_files
17272
17273Configuration headers:
17274$config_headers
17275
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017276Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17280ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017281ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017282python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017283configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017284 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017285
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017286Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017287This config.status script is free software; the Free Software Foundation
17288gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289
17290ac_pwd='$ac_pwd'
17291srcdir='$srcdir'
17292INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017293MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017294test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017295_ACEOF
17296
Matthias Kloseb9621712010-04-24 17:59:49 +000017297cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17298# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017299ac_need_defaults=:
17300while test $# != 0
17301do
17302 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017303 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17305 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017306 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017307 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017308 --*=)
17309 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17310 ac_optarg=
17311 ac_shift=:
17312 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017314 ac_option=$1
17315 ac_optarg=$2
17316 ac_shift=shift
17317 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017318 esac
17319
Skip Montanaro6dead952003-09-25 14:50:04 +000017320 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017322 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17323 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 $as_echo "$ac_cs_version"; exit ;;
17326 --config | --confi | --conf | --con | --co | --c )
17327 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017328 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017329 debug=: ;;
17330 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017331 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017332 case $ac_optarg in
17333 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017334 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 esac
17336 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017337 ac_need_defaults=false;;
17338 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017339 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017340 case $ac_optarg in
17341 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17342 esac
17343 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017344 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345 --he | --h)
17346 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017347 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017348Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017351 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17352 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17353 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017354
17355 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017356 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017357Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017358
Matthias Kloseb9621712010-04-24 17:59:49 +000017359 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017361
17362 esac
17363 shift
17364done
17365
Skip Montanaro6dead952003-09-25 14:50:04 +000017366ac_configure_extra_args=
17367
17368if $ac_cs_silent; then
17369 exec 6>/dev/null
17370 ac_configure_extra_args="$ac_configure_extra_args --silent"
17371fi
17372
17373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017375if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017376 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 shift
17378 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17379 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017381 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017382fi
17383
Martin v. Löwis11437992002-04-12 09:54:03 +000017384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386exec 5>>config.log
17387{
17388 echo
17389 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17390## Running $as_me. ##
17391_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017392 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017398
Matthias Kloseb9621712010-04-24 17:59:49 +000017399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400
17401# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017402for ac_config_target in $ac_config_targets
17403do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 case $ac_config_target in
17405 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17406 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17407 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017408 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17409 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017411 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017412 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017413 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414
Victor Stinnere0be4232011-10-25 13:06:09 +020017415 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 esac
17417done
17418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419
Martin v. Löwis11437992002-04-12 09:54:03 +000017420# If the user did not use the arguments to specify the items to instantiate,
17421# then the envvar interface is used. Set only those that are not.
17422# We use the long form for the default assignment because of an extremely
17423# bizarre bug on SunOS 4.1.3.
17424if $ac_need_defaults; then
17425 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17426 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17427fi
17428
Skip Montanaro6dead952003-09-25 14:50:04 +000017429# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017431# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432# Hook for its removal unless debugging.
17433# Note that there is a small window in which the directory will not be cleaned:
17434# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017435$debug ||
17436{
Victor Stinnere0be4232011-10-25 13:06:09 +020017437 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017439 : "${ac_tmp:=$tmp}"
17440 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017442 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017443}
Martin v. Löwis11437992002-04-12 09:54:03 +000017444# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017445
Martin v. Löwis11437992002-04-12 09:54:03 +000017446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017448 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017449} ||
17450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 tmp=./conf$$-$RANDOM
17452 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017454ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017455
Matthias Kloseb9621712010-04-24 17:59:49 +000017456# Set up the scripts for CONFIG_FILES section.
17457# No need to generate them if there are no CONFIG_FILES.
17458# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017460
Matthias Kloseb9621712010-04-24 17:59:49 +000017461
17462ac_cr=`echo X | tr X '\015'`
17463# On cygwin, bash can eat \r inside `` if the user requested igncr.
17464# But we know of no other shell where ac_cr would be empty at this
17465# point, so we can use a bashism as a fallback.
17466if test "x$ac_cr" = x; then
17467 eval ac_cr=\$\'\\r\'
17468fi
17469ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17470if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017471 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017472else
17473 ac_cs_awk_cr=$ac_cr
17474fi
17475
Victor Stinnere0be4232011-10-25 13:06:09 +020017476echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017477_ACEOF
17478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479
Matthias Kloseb9621712010-04-24 17:59:49 +000017480{
17481 echo "cat >conf$$subs.awk <<_ACEOF" &&
17482 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17483 echo "_ACEOF"
17484} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017485 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17486ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487ac_delim='%!_!# '
17488for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017489 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017490 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491
Matthias Kloseb9621712010-04-24 17:59:49 +000017492 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17493 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494 break
17495 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017496 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497 else
17498 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017499 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500done
Matthias Kloseb9621712010-04-24 17:59:49 +000017501rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502
Matthias Kloseb9621712010-04-24 17:59:49 +000017503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017504cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017506sed -n '
17507h
17508s/^/S["/; s/!.*/"]=/
17509p
17510g
17511s/^[^!]*!//
17512:repl
17513t repl
17514s/'"$ac_delim"'$//
17515t delim
17516:nl
17517h
17518s/\(.\{148\}\)..*/\1/
17519t more1
17520s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17521p
17522n
17523b repl
17524:more1
17525s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17526p
17527g
17528s/.\{148\}//
17529t nl
17530:delim
17531h
17532s/\(.\{148\}\)..*/\1/
17533t more2
17534s/["\\]/\\&/g; s/^/"/; s/$/"/
17535p
17536b
17537:more2
17538s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17539p
17540g
17541s/.\{148\}//
17542t delim
17543' <conf$$subs.awk | sed '
17544/^[^""]/{
17545 N
17546 s/\n//
17547}
17548' >>$CONFIG_STATUS || ac_write_fail=1
17549rm -f conf$$subs.awk
17550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17551_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017552cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 for (key in S) S_is_set[key] = 1
17554 FS = ""
17555
17556}
17557{
17558 line = $ 0
17559 nfields = split(line, field, "@")
17560 substed = 0
17561 len = length(field[1])
17562 for (i = 2; i < nfields; i++) {
17563 key = field[i]
17564 keylen = length(key)
17565 if (S_is_set[key]) {
17566 value = S[key]
17567 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17568 len += length(value) + length(field[++i])
17569 substed = 1
17570 } else
17571 len += 1 + keylen
17572 }
17573
17574 print line
17575}
17576
17577_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17580if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17581 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17582else
17583 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017584fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017585 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017586_ACEOF
17587
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017588# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17589# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590# trailing colons and then remove the whole line if VPATH becomes empty
17591# (actually we leave an empty line to preserve line numbers).
17592if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017593 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17594h
17595s///
17596s/^/:/
17597s/[ ]*$/:/
17598s/:\$(srcdir):/:/g
17599s/:\${srcdir}:/:/g
17600s/:@srcdir@:/:/g
17601s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017603x
17604s/\(=[ ]*\).*/\1/
17605G
17606s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017607s/^[^=]*=[ ]*$//
17608}'
17609fi
17610
Matthias Kloseb9621712010-04-24 17:59:49 +000017611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017612fi # test -n "$CONFIG_FILES"
17613
Matthias Kloseb9621712010-04-24 17:59:49 +000017614# Set up the scripts for CONFIG_HEADERS section.
17615# No need to generate them if there are no CONFIG_HEADERS.
17616# This happens for instance with `./config.status Makefile'.
17617if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017618cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017619BEGIN {
17620_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621
Matthias Kloseb9621712010-04-24 17:59:49 +000017622# Transform confdefs.h into an awk script `defines.awk', embedded as
17623# here-document in config.status, that substitutes the proper values into
17624# config.h.in to produce config.h.
17625
17626# Create a delimiter string that does not exist in confdefs.h, to ease
17627# handling of long lines.
17628ac_delim='%!_!# '
17629for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017630 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17631 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 break
17633 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017634 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017635 else
17636 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17637 fi
17638done
17639
17640# For the awk script, D is an array of macro values keyed by name,
17641# likewise P contains macro parameters if any. Preserve backslash
17642# newline sequences.
17643
17644ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17645sed -n '
17646s/.\{148\}/&'"$ac_delim"'/g
17647t rset
17648:rset
17649s/^[ ]*#[ ]*define[ ][ ]*/ /
17650t def
17651d
17652:def
17653s/\\$//
17654t bsnl
17655s/["\\]/\\&/g
17656s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17657D["\1"]=" \3"/p
17658s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17659d
17660:bsnl
17661s/["\\]/\\&/g
17662s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17663D["\1"]=" \3\\\\\\n"\\/p
17664t cont
17665s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17666t cont
17667d
17668:cont
17669n
17670s/.\{148\}/&'"$ac_delim"'/g
17671t clear
17672:clear
17673s/\\$//
17674t bsnlc
17675s/["\\]/\\&/g; s/^/"/; s/$/"/p
17676d
17677:bsnlc
17678s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17679b cont
17680' <confdefs.h | sed '
17681s/'"$ac_delim"'/"\\\
17682"/g' >>$CONFIG_STATUS || ac_write_fail=1
17683
17684cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17685 for (key in D) D_is_set[key] = 1
17686 FS = ""
17687}
17688/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17689 line = \$ 0
17690 split(line, arg, " ")
17691 if (arg[1] == "#") {
17692 defundef = arg[2]
17693 mac1 = arg[3]
17694 } else {
17695 defundef = substr(arg[1], 2)
17696 mac1 = arg[2]
17697 }
17698 split(mac1, mac2, "(") #)
17699 macro = mac2[1]
17700 prefix = substr(line, 1, index(line, defundef) - 1)
17701 if (D_is_set[macro]) {
17702 # Preserve the white space surrounding the "#".
17703 print prefix "define", macro P[macro] D[macro]
17704 next
17705 } else {
17706 # Replace #undef with comments. This is necessary, for example,
17707 # in the case of _POSIX_SOURCE, which is predefined and required
17708 # on some systems where configure will not decide to define it.
17709 if (defundef == "undef") {
17710 print "/*", prefix defundef, macro, "*/"
17711 next
17712 }
17713 }
17714}
17715{ print }
17716_ACAWK
17717_ACEOF
17718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017719 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017720fi # test -n "$CONFIG_HEADERS"
17721
17722
17723eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17724shift
17725for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726do
17727 case $ac_tag in
17728 :[FHLC]) ac_mode=$ac_tag; continue;;
17729 esac
17730 case $ac_mode$ac_tag in
17731 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017732 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 :[FH]-) ac_tag=-:-;;
17734 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17735 esac
17736 ac_save_IFS=$IFS
17737 IFS=:
17738 set x $ac_tag
17739 IFS=$ac_save_IFS
17740 shift
17741 ac_file=$1
17742 shift
17743
17744 case $ac_mode in
17745 :L) ac_source=$1;;
17746 :[FH])
17747 ac_file_inputs=
17748 for ac_f
17749 do
17750 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017751 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 *) # Look for the file first in the build tree, then in the source tree
17753 # (if the path is not absolute). The absolute path cannot be DOS-style,
17754 # because $ac_f cannot contain `:'.
17755 test -f "$ac_f" ||
17756 case $ac_f in
17757 [\\/$]*) false;;
17758 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17759 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017760 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017762 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17763 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 done
17765
17766 # Let's still pretend it is `configure' which instantiates (i.e., don't
17767 # use $as_me), people would be surprised to read:
17768 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017769 configure_input='Generated from '`
17770 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17771 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 if test x"$ac_file" != x-; then
17773 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017774 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17775$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017777 # Neutralize special characters interpreted by sed in replacement strings.
17778 case $configure_input in #(
17779 *\&* | *\|* | *\\* )
17780 ac_sed_conf_input=`$as_echo "$configure_input" |
17781 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17782 *) ac_sed_conf_input=$configure_input;;
17783 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017784
17785 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017786 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17787 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 esac
17789 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 esac
17791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017792 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017794 X"$ac_file" : 'X\(//\)[^/]' \| \
17795 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017797$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17799 s//\1/
17800 q
17801 }
17802 /^X\(\/\/\)[^/].*/{
17803 s//\1/
17804 q
17805 }
17806 /^X\(\/\/\)$/{
17807 s//\1/
17808 q
17809 }
17810 /^X\(\/\).*/{
17811 s//\1/
17812 q
17813 }
17814 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017815 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 ac_builddir=.
17817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818case "$ac_dir" in
17819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17820*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017821 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017823 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824 case $ac_top_builddir_sub in
17825 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17826 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17827 esac ;;
17828esac
17829ac_abs_top_builddir=$ac_pwd
17830ac_abs_builddir=$ac_pwd$ac_dir_suffix
17831# for backward compatibility:
17832ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017833
17834case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017835 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837 ac_top_srcdir=$ac_top_builddir_sub
17838 ac_abs_top_srcdir=$ac_pwd ;;
17839 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017840 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841 ac_top_srcdir=$srcdir
17842 ac_abs_top_srcdir=$srcdir ;;
17843 *) # Relative name.
17844 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17845 ac_top_srcdir=$ac_top_build_prefix$srcdir
17846 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017847esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017849
Martin v. Löwis11437992002-04-12 09:54:03 +000017850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851 case $ac_mode in
17852 :F)
17853 #
17854 # CONFIG_FILE
17855 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017856
17857 case $INSTALL in
17858 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017860 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017861 ac_MKDIR_P=$MKDIR_P
17862 case $MKDIR_P in
17863 [\\/$]* | ?:[\\/]* ) ;;
17864 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17865 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017866_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017867
Matthias Kloseb9621712010-04-24 17:59:49 +000017868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869# If the template does not know about datarootdir, expand it.
17870# FIXME: This hack should be removed a few years after 2.60.
17871ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017872ac_sed_dataroot='
17873/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874 p
17875 q
17876}
17877/@datadir@/p
17878/@docdir@/p
17879/@infodir@/p
17880/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017881/@mandir@/p'
17882case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017883*datarootdir*) ac_datarootdir_seen=yes;;
17884*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17886$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017888cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017889 ac_datarootdir_hack='
17890 s&@datadir@&$datadir&g
17891 s&@docdir@&$docdir&g
17892 s&@infodir@&$infodir&g
17893 s&@localedir@&$localedir&g
17894 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017895 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896esac
17897_ACEOF
17898
17899# Neutralize VPATH when `$srcdir' = `.'.
17900# Shell code in configure.ac might set extrasub.
17901# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17903ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017904$extrasub
17905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017907:t
17908/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017909s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017911s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912s&@srcdir@&$ac_srcdir&;t t
17913s&@abs_srcdir@&$ac_abs_srcdir&;t t
17914s&@top_srcdir@&$ac_top_srcdir&;t t
17915s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17916s&@builddir@&$ac_builddir&;t t
17917s&@abs_builddir@&$ac_abs_builddir&;t t
17918s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17919s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017920s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017922"
Victor Stinnere0be4232011-10-25 13:06:09 +020017923eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17924 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017927 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17928 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17929 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017931which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017932$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017933which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017934
Victor Stinnere0be4232011-10-25 13:06:09 +020017935 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017937 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17938 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017939 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017940 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 ;;
17942 :H)
17943 #
17944 # CONFIG_HEADER
17945 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017947 {
17948 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017949 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17950 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017951 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017952 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17954$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017956 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017957 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017958 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 fi
17960 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017961 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017962 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017963 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017967
17968 esac
17969
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017970
17971 case $ac_file$ac_mode in
17972 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17973
17974 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975done # for ac_tag
17976
Guido van Rossum627b2d71993-12-24 10:39:16 +000017977
Matthias Kloseb9621712010-04-24 17:59:49 +000017978as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017979_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017980ac_clean_files=$ac_clean_files_save
17981
Matthias Kloseb9621712010-04-24 17:59:49 +000017982test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017983 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017984
Martin v. Löwis11437992002-04-12 09:54:03 +000017985
17986# configure is writing to config.log, and then calls config.status.
17987# config.status does its own redirection, appending to config.log.
17988# Unfortunately, on DOS this fails, as config.log is still kept open
17989# by configure, so config.status won't be able to write to it; its
17990# output is simply discarded. So we exec the FD to /dev/null,
17991# effectively closing config.log, so it can be properly (re)opened and
17992# appended to by config.status. When coming back to configure, we
17993# need to make the FD available again.
17994if test "$no_create" != yes; then
17995 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017996 ac_config_status_args=
17997 test "$silent" = yes &&
17998 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018000 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018001 exec 5>>config.log
18002 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18003 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018004 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018005fi
18006if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18008$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018009fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018010
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018011
Christian Heimes75ed8902013-11-20 01:11:18 +010018012echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018013if test ! -f Modules/Setup
18014then
18015 cp $srcdir/Modules/Setup.dist Modules/Setup
18016fi
18017
Christian Heimes75ed8902013-11-20 01:11:18 +010018018echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018019if test ! -f Modules/Setup.local
18020then
18021 echo "# Edit this file for local setup changes" >Modules/Setup.local
18022fi
18023
Christian Heimes75ed8902013-11-20 01:11:18 +010018024echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018025$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018026 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018027 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018028mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018029
18030if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18031 echo "" >&6
18032 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018033 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 +000018034 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018035 echo "" >&6
18036 echo "" >&6
18037fi
18038