blob: 420c07639b5cc47f6be424b1725c078ea1353c7a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
784localstatedir
785sharedstatedir
786sysconfdir
787datadir
788datarootdir
789libexecdir
790sbindir
791bindir
792program_transform_name
793prefix
794exec_prefix
795PACKAGE_URL
796PACKAGE_BUGREPORT
797PACKAGE_STRING
798PACKAGE_VERSION
799PACKAGE_TARNAME
800PACKAGE_NAME
801PATH_SEPARATOR
802SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000803ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_user_opts='
805enable_option_checking
806enable_universalsdk
807with_universal_archs
808with_framework_name
809enable_framework
810with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600811with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_libs
823with_system_expat
824with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100825with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000826enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700827with_tcltk_includes
828with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000830enable_ipv6
831with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000833with_c_locale_coercion
834with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700836with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_libm
838with_libc
839enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800841with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100842with_openssl
Matthias Kloseb9621712010-04-24 17:59:49 +0000843'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 ac_precious_vars='build_alias
845host_alias
846target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100847MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848CC
849CFLAGS
850LDFLAGS
851LIBS
852CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100853CPP
854PKG_CONFIG
855PKG_CONFIG_PATH
856PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
Guido van Rossum627b2d71993-12-24 10:39:16 +0000858
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860ac_init_help=
861ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000862ac_unrecognized_opts=
863ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# The variables have the same names as the options, with
865# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000866cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869no_recursion=
870prefix=NONE
871program_prefix=NONE
872program_suffix=NONE
873program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878x_includes=NONE
879x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881# Installation directory options.
882# These are left unexpanded so users can "make install exec_prefix=/foo"
883# and all the variables that are supposed to be based on exec_prefix
884# by default will actually change.
885# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887bindir='${exec_prefix}/bin'
888sbindir='${exec_prefix}/sbin'
889libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890datarootdir='${prefix}/share'
891datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892sysconfdir='${prefix}/etc'
893sharedstatedir='${prefix}/com'
894localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895includedir='${prefix}/include'
896oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898infodir='${datarootdir}/info'
899htmldir='${docdir}'
900dvidir='${docdir}'
901pdfdir='${docdir}'
902psdir='${docdir}'
903libdir='${exec_prefix}/lib'
904localedir='${datarootdir}/locale'
905mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 # If the previous option needs an argument, assign it.
912 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 ac_prev=
915 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200919 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920 *=) ac_optarg= ;;
921 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Accept the important Cygnus configure options, so we can diagnose typos.
925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 case $ac_dashdash$ac_option in
927 --)
928 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -bindir | --bindir | --bindi | --bind | --bin | --bi)
931 ac_prev=bindir ;;
932 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
935 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 -cache-file | --cache-file | --cache-fil | --cache-fi \
941 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942 ac_prev=cache_file ;;
943 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 cache_file=$ac_optarg ;;
946
947 --config-cache | -C)
948 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956 | --dataroo | --dataro | --datar)
957 ac_prev=datarootdir ;;
958 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960 datarootdir=$ac_optarg ;;
961
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977
978 -docdir | --docdir | --docdi | --doc | --do)
979 ac_prev=docdir ;;
980 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981 docdir=$ac_optarg ;;
982
983 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984 ac_prev=dvidir ;;
985 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200992 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt_orig=$ac_useropt
994 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995 case $ac_user_opts in
996 *"
997"enable_$ac_useropt"
998"*) ;;
999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000 ac_unrecognized_sep=', ';;
1001 esac
1002 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006 | --exec | --exe | --ex)
1007 ac_prev=exec_prefix ;;
1008 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Obsolete; use --with-gas.
1015 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 -help | --help | --hel | --he | -h)
1018 ac_init_help=long ;;
1019 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020 ac_init_help=recursive ;;
1021 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030 ac_prev=htmldir ;;
1031 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032 | --ht=*)
1033 htmldir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -includedir | --includedir | --includedi | --included | --include \
1036 | --includ | --inclu | --incl | --inc)
1037 ac_prev=includedir ;;
1038 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -infodir | --infodir | --infodi | --infod | --info | --inf)
1043 ac_prev=infodir ;;
1044 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libdir | --libdir | --libdi | --libd)
1048 ac_prev=libdir ;;
1049 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053 | --libexe | --libex | --libe)
1054 ac_prev=libexecdir ;;
1055 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 -localedir | --localedir | --localedi | --localed | --locale)
1060 ac_prev=localedir ;;
1061 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062 localedir=$ac_optarg ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 ac_prev=localstatedir ;;
1067 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072 ac_prev=mandir ;;
1073 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Obsolete; use --without-fp.
1078 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 no_create=yes ;;
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090 | --oldin | --oldi | --old | --ol | --o)
1091 ac_prev=oldincludedir ;;
1092 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098 ac_prev=prefix ;;
1099 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103 | --program-pre | --program-pr | --program-p)
1104 ac_prev=program_prefix ;;
1105 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110 | --program-suf | --program-su | --program-s)
1111 ac_prev=program_suffix ;;
1112 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-transform-name | --program-transform-name \
1117 | --program-transform-nam | --program-transform-na \
1118 | --program-transform-n | --program-transform- \
1119 | --program-transform | --program-transfor \
1120 | --program-transfo | --program-transf \
1121 | --program-trans | --program-tran \
1122 | --progr-tra | --program-tr | --program-t)
1123 ac_prev=program_transform_name ;;
1124 -program-transform-name=* | --program-transform-name=* \
1125 | --program-transform-nam=* | --program-transform-na=* \
1126 | --program-transform-n=* | --program-transform-=* \
1127 | --program-transform=* | --program-transfor=* \
1128 | --program-transfo=* | --program-transf=* \
1129 | --program-trans=* | --program-tran=* \
1130 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134 ac_prev=pdfdir ;;
1135 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136 pdfdir=$ac_optarg ;;
1137
1138 -psdir | --psdir | --psdi | --psd | --ps)
1139 ac_prev=psdir ;;
1140 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141 psdir=$ac_optarg ;;
1142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144 | -silent | --silent | --silen | --sile | --sil)
1145 silent=yes ;;
1146
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148 ac_prev=sbindir ;;
1149 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
1153 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155 | --sharedst | --shareds | --shared | --share | --shar \
1156 | --sha | --sh)
1157 ac_prev=sharedstatedir ;;
1158 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 -site | --site | --sit)
1165 ac_prev=site ;;
1166 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170 ac_prev=srcdir ;;
1171 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175 | --syscon | --sysco | --sysc | --sys | --sy)
1176 ac_prev=sysconfdir ;;
1177 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187 verbose=yes ;;
1188
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 -version | --version | --versio | --versi | --vers | -V)
1190 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt_orig=$ac_useropt
1214 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215 case $ac_user_opts in
1216 *"
1217"with_$ac_useropt"
1218"*) ;;
1219 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220 ac_unrecognized_sep=', ';;
1221 esac
1222 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 --x)
1225 # Obsolete; use --with-x.
1226 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229 | --x-incl | --x-inc | --x-in | --x-i)
1230 ac_prev=x_includes ;;
1231 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237 ac_prev=x_libraries ;;
1238 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001242 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 *=*)
1247 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 case $ac_envvar in #(
1250 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 export $ac_envvar ;;
1255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001256 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001261 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ;;
1263
1264 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265done
1266
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270fi
1271
Matthias Kloseb9621712010-04-24 17:59:49 +00001272if test -n "$ac_unrecognized_opts"; then
1273 case $enable_option_checking in
1274 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1277 esac
1278fi
1279
1280# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282 datadir sysconfdir sharedstatedir localstatedir includedir \
1283 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimesff5be6e2018-01-20 13:19:21 +01001284 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001287 # Remove trailing slashes.
1288 case $ac_val in
1289 */ )
1290 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291 eval $ac_var=\$ac_val;;
1292 esac
1293 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 [\\/$]* | ?:[\\/]* ) continue;;
1296 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001299done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# There might be people who depend on the old broken behavior: `$host'
1302# used to hold the argument of --host etc.
1303# FIXME: To remove some day.
1304build=$build_alias
1305host=$host_alias
1306target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# FIXME: To remove some day.
1309if test "x$host_alias" != x; then
1310 if test "x$build_alias" = x; then
1311 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 elif test "x$build_alias" != "x$host_alias"; then
1313 cross_compiling=yes
1314 fi
1315fi
1316
1317ac_tool_prefix=
1318test -n "$host_alias" && ac_tool_prefix=$host_alias-
1319
1320test "$silent" = yes && exec 6>/dev/null
1321
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324ac_ls_di=`ls -di .` &&
1325ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001326 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331# Find the source files, if location was not specified.
1332if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 ac_confdir=`$as_dirname -- "$as_myself" ||
1336$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337 X"$as_myself" : 'X\(//\)[^/]' \| \
1338 X"$as_myself" : 'X\(//\)$' \| \
1339 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)[^/].*/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\).*/{
1354 s//\1/
1355 q
1356 }
1357 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001358 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360 srcdir=..
1361 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362else
1363 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365if test ! -r "$srcdir/$ac_unique_file"; then
1366 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001367 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 pwd)`
1373# When building in place, set srcdir=.
1374if test "$ac_abs_confdir" = "$ac_pwd"; then
1375 srcdir=.
1376fi
1377# Remove unnecessary trailing slashes from srcdir.
1378# Double slashes in file names in object file debugging info
1379# mess up M-x gdb in Emacs.
1380case $srcdir in
1381*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382esac
1383for ac_var in $ac_precious_vars; do
1384 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_env_${ac_var}_value=\$${ac_var}
1386 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390#
1391# Report the --help message.
1392#
1393if test "$ac_init_help" = "long"; then
1394 # Omit some internal or obsolete options to make the list less imposing.
1395 # This message is too long to be a string in the A/UX 3.1 sh.
1396 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001397\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399Usage: $0 [OPTION]... [VAR=VALUE]...
1400
1401To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402VAR=VALUE. See below for descriptions of some of the useful variables.
1403
1404Defaults for the options are specified in brackets.
1405
1406Configuration:
1407 -h, --help display this help and exit
1408 --help=short display options specific to this package
1409 --help=recursive display the short help of all the included packages
1410 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001411 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 --cache-file=FILE cache test results in FILE [disabled]
1413 -C, --config-cache alias for \`--cache-file=config.cache'
1414 -n, --no-create do not create output files
1415 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1416
Martin v. Löwis11437992002-04-12 09:54:03 +00001417Installation directories:
1418 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001419 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423By default, \`make install' will install all the files in
1424\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1425an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426for instance \`--prefix=\$HOME'.
1427
1428For better control, use the options below.
1429
1430Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 --bindir=DIR user executables [EPREFIX/bin]
1432 --sbindir=DIR system admin executables [EPREFIX/sbin]
1433 --libexecdir=DIR program executables [EPREFIX/libexec]
1434 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1435 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1436 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1437 --libdir=DIR object code libraries [EPREFIX/lib]
1438 --includedir=DIR C header files [PREFIX/include]
1439 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1440 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1441 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1442 --infodir=DIR info documentation [DATAROOTDIR/info]
1443 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1444 --mandir=DIR man documentation [DATAROOTDIR/man]
1445 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1446 --htmldir=DIR html documentation [DOCDIR]
1447 --dvidir=DIR dvi documentation [DOCDIR]
1448 --pdfdir=DIR pdf documentation [DOCDIR]
1449 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451
1452 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001453
1454System types:
1455 --build=BUILD configure for building on BUILD [guessed]
1456 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001457 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459fi
1460
1461if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001462 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001463 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 cat <<\_ACEOF
1466
1467Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1470 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001471 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001472 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --enable-framework[=INSTALLDIR]
1474 Build (MacOSX|Darwin) framework
1475 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001476 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001477 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1478 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001479 --enable-loadable-sqlite-extensions
1480 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --enable-ipv6 Enable ipv6 (with ipv4) support
1482 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001483 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486Optional Packages:
1487 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1488 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001489 --with-universal-archs=ARCH
1490 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001491 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001492 --with-framework-name=FRAMEWORK
1493 specify an alternate name of the framework built
1494 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001496 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001497 --with-cxx-main=<compiler>
1498 compile main() and link python executable with C++
1499 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-suffix=.exe set executable suffix
1501 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001502 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001503 --with-lto Enable Link Time Optimization in any build. Disabled
1504 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001505 --with-hash-algorithm=[fnv|siphash24]
1506 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001507 --with-address-sanitizer
1508 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001510 --with-system-expat build pyexpat module using an installed expat
1511 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001512 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001513 --with-system-libmpdec build _decimal module using an installed libmpdec
1514 library
Ned Deilyd819b932013-09-06 01:07:05 -07001515 --with-tcltk-includes='-I...'
1516 override search for Tcl and Tk include files
1517 --with-tcltk-libs='-L...'
1518 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001519 --with-dbmliborder=db1:db2:...
1520 order to check db backends for dbm. Valid value is a
1521 colon separated string with the backend names
1522 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001523 --with(out)-doc-strings disable/enable documentation strings
1524 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001525 --with(out)-c-locale-coercion
1526 disable/enable C locale coercion to a UTF-8 based
1527 locale
1528 --with(out)-c-locale-warning
1529 disable/enable locale compatibility warning in the C
1530 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001531 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001532 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001540 --with-openssl=DIR root of the OpenSSL directory
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001624python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Ned Deily4829bc62016-09-12 17:29:04 -04002333It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# 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 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$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 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Christian Heimesff5be6e2018-01-20 13:19:21 +01002683
2684
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002685if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002686 # If we're building out-of-tree, we need to make sure the following
2687 # resources get picked up before their $srcdir counterparts.
2688 # Objects/ -> typeslots.inc
2689 # Include/ -> Python-ast.h, graminit.h
2690 # Python/ -> importlib.h
2691 # (A side effect of this is that these resources will automatically be
2692 # regenerated when building out-of-tree, regardless of whether or not
2693 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2694 # off.)
2695 BASECPPFLAGS="-IObjects -IInclude -IPython"
2696else
2697 BASECPPFLAGS=""
2698fi
2699
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002700
2701
2702
2703
Victor Stinner9ed34a82017-05-02 22:35:58 +02002704if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002706# Extract the first word of "git", so it can be a program name with args.
2707set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2709$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002710if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711 $as_echo_n "(cached) " >&6
2712else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713 if test -n "$HAS_GIT"; then
2714 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715else
2716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2717for as_dir in $PATH
2718do
2719 IFS=$as_save_IFS
2720 test -z "$as_dir" && as_dir=.
2721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2725 break 2
2726 fi
2727done
2728 done
2729IFS=$as_save_IFS
2730
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732fi
2733fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734HAS_GIT=$ac_cv_prog_HAS_GIT
2735if test -n "$HAS_GIT"; then
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2737$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738else
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2740$as_echo "no" >&6; }
2741fi
2742
2743
2744else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002747if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748then
Ned Deily554626a2017-03-20 23:41:52 -04002749 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2750 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753 GITVERSION=""
2754 GITTAG=""
2755 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
2757
2758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002760
2761
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002762ac_aux_dir=
2763for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2764 if test -f "$ac_dir/install-sh"; then
2765 ac_aux_dir=$ac_dir
2766 ac_install_sh="$ac_aux_dir/install-sh -c"
2767 break
2768 elif test -f "$ac_dir/install.sh"; then
2769 ac_aux_dir=$ac_dir
2770 ac_install_sh="$ac_aux_dir/install.sh -c"
2771 break
2772 elif test -f "$ac_dir/shtool"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/shtool install -c"
2775 break
2776 fi
2777done
2778if test -z "$ac_aux_dir"; then
2779 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2780fi
2781
2782# These three variables are undocumented and unsupported,
2783# and are intended to be withdrawn in a future Autoconf release.
2784# They can cause serious problems if a builder's source tree is in a directory
2785# whose full name contains unusual characters.
2786ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2787ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2788ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2789
2790
2791# Make sure we can run config.sub.
2792$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2793 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2794
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2796$as_echo_n "checking build system type... " >&6; }
2797if ${ac_cv_build+:} false; then :
2798 $as_echo_n "(cached) " >&6
2799else
2800 ac_build_alias=$build_alias
2801test "x$ac_build_alias" = x &&
2802 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2803test "x$ac_build_alias" = x &&
2804 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2805ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2806 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2807
2808fi
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2810$as_echo "$ac_cv_build" >&6; }
2811case $ac_cv_build in
2812*-*-*) ;;
2813*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2814esac
2815build=$ac_cv_build
2816ac_save_IFS=$IFS; IFS='-'
2817set x $ac_cv_build
2818shift
2819build_cpu=$1
2820build_vendor=$2
2821shift; shift
2822# Remember, the first character of IFS is used to create $*,
2823# except with old shells:
2824build_os=$*
2825IFS=$ac_save_IFS
2826case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2827
2828
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2830$as_echo_n "checking host system type... " >&6; }
2831if ${ac_cv_host+:} false; then :
2832 $as_echo_n "(cached) " >&6
2833else
2834 if test "x$host_alias" = x; then
2835 ac_cv_host=$ac_cv_build
2836else
2837 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2838 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2839fi
2840
2841fi
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2843$as_echo "$ac_cv_host" >&6; }
2844case $ac_cv_host in
2845*-*-*) ;;
2846*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2847esac
2848host=$ac_cv_host
2849ac_save_IFS=$IFS; IFS='-'
2850set x $ac_cv_host
2851shift
2852host_cpu=$1
2853host_vendor=$2
2854shift; shift
2855# Remember, the first character of IFS is used to create $*,
2856# except with old shells:
2857host_os=$*
2858IFS=$ac_save_IFS
2859case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2860
2861
2862
doko@python.orga10e4a92013-01-25 18:45:12 +01002863
2864
Ned Deilyfcbc2462014-08-22 13:32:49 -07002865# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2866rm -f pybuilddir.txt
2867
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002868for ac_prog in python$PACKAGE_VERSION python3 python
2869do
2870 # Extract the first word of "$ac_prog", so it can be a program name with args.
2871set dummy $ac_prog; ac_word=$2
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2873$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002874if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002875 $as_echo_n "(cached) " >&6
2876else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002877 if test -n "$PYTHON_FOR_REGEN"; then
2878 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002879else
2880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2881for as_dir in $PATH
2882do
2883 IFS=$as_save_IFS
2884 test -z "$as_dir" && as_dir=.
2885 for ac_exec_ext in '' $ac_executable_extensions; do
2886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2889 break 2
2890 fi
2891done
2892 done
2893IFS=$as_save_IFS
2894
2895fi
2896fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2898if test -n "$PYTHON_FOR_REGEN"; then
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2900$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002901else
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2903$as_echo "no" >&6; }
2904fi
2905
2906
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002909test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911
2912
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002913if test "$cross_compiling" = yes; then
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2915$as_echo_n "checking for python interpreter for cross build... " >&6; }
2916 if test -z "$PYTHON_FOR_BUILD"; then
2917 for interp in python$PACKAGE_VERSION python3 python; do
2918 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002919 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 +02002920 break
2921 fi
2922 interp=
2923 done
2924 if test x$interp = x; then
2925 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2926 fi
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2928$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002929 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 +02002930 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002931elif test "$cross_compiling" = maybe; then
2932 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002933else
2934 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2935fi
2936
2937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Benjamin Petersond23f8222009-04-05 19:13:16 +00002939if test "$prefix" != "/"; then
2940 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
2945
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002946# We don't use PACKAGE_ variables, and they cause conflicts
2947# with other autoconf-based packages that include Python.h
2948grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2949rm confdefs.h
2950mv confdefs.h.new confdefs.h
2951
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002952
Ned Deily4829bc62016-09-12 17:29:04 -04002953VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002954
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002955# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002956
2957SOVERSION=1.0
2958
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002959# The later defininition of _XOPEN_SOURCE disables certain features
2960# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002963
2964
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2966# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2967# them.
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970
2971
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977
2978
Martin v. Löwisd6320502004-08-12 13:45:08 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002980# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002984
2985
2986
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002987define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002988
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002989# Arguments passed to configure.
2990
2991CONFIG_ARGS="$ac_configure_args"
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2994$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002996if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002998 case $enableval in
2999 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003000 # Locate the best usable SDK, see Mac/README.txt for more
3001 # information
3002 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003003 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003004 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003005 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3006 if test ! -d "${enableval}"
3007 then
3008 enableval=/
3009 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011 ;;
3012 esac
3013 case $enableval in
3014 no)
3015 UNIVERSALSDK=
3016 enable_universalsdk=
3017 ;;
3018 *)
3019 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 if test ! -d "${UNIVERSALSDK}"
3021 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003022 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ;;
3025 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027
Thomas Wouters477c8d52006-05-27 19:21:47 +00003028else
3029
3030 UNIVERSALSDK=
3031 enable_universalsdk=
3032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035if test -n "${UNIVERSALSDK}"
3036then
Matthias Kloseb9621712010-04-24 17:59:49 +00003037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3038$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039else
Matthias Kloseb9621712010-04-24 17:59:49 +00003040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3041$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003045
Ned Deily87adb6e2013-10-18 21:09:56 -07003046ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003047
Ned Deilycbfb9a52012-06-23 16:02:19 -07003048# For backward compatibility reasons we prefer to select '32-bit' if available,
3049# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003050UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051if test "`uname -s`" = "Darwin"
3052then
3053 if test -n "${UNIVERSALSDK}"
3054 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003055 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056 then
3057 UNIVERSAL_ARCHS="intel"
3058 fi
3059 fi
3060fi
3061
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003062
Matthias Kloseb9621712010-04-24 17:59:49 +00003063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3064$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003065
3066# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003067if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069 UNIVERSAL_ARCHS="$withval"
3070
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071fi
3072
Ned Deily87adb6e2013-10-18 21:09:56 -07003073if test -n "${UNIVERSALSDK}"
3074then
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3076$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3077else
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3079$as_echo "no" >&6; }
3080fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003082
3083# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003084if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003085 withval=$with_framework_name;
3086 PYTHONFRAMEWORK=${withval}
3087 PYTHONFRAMEWORKDIR=${withval}.framework
3088 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3089
3090else
3091
3092 PYTHONFRAMEWORK=Python
3093 PYTHONFRAMEWORKDIR=Python.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3095
3096fi
3097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003098# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003099if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003100 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003101 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003102 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003103 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003104 esac
3105 case $enableval in
3106 no)
3107 PYTHONFRAMEWORK=
3108 PYTHONFRAMEWORKDIR=no-framework
3109 PYTHONFRAMEWORKPREFIX=
3110 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003111 FRAMEWORKINSTALLFIRST=
3112 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003113 FRAMEWORKALTINSTALLFIRST=
3114 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003115 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003116 if test "x${prefix}" = "xNONE"; then
3117 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3118 else
3119 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3120 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003122 ;;
3123 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003124 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003127 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003128 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3129 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003130 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003131 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003133 if test "x${prefix}" = "xNONE" ; then
3134 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003135
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139
3140 case "${enableval}" in
3141 /System*)
3142 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3143 if test "${prefix}" = "NONE" ; then
3144 # See below
3145 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3146 fi
3147 ;;
3148
3149 /Library*)
3150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3151 ;;
3152
3153 */Library/Frameworks)
3154 MDIR="`dirname "${enableval}"`"
3155 MDIR="`dirname "${MDIR}"`"
3156 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3157
3158 if test "${prefix}" = "NONE"; then
3159 # User hasn't specified the
3160 # --prefix option, but wants to install
3161 # the framework in a non-default location,
3162 # ensure that the compatibility links get
3163 # installed relative to that prefix as well
3164 # instead of in /usr/local.
3165 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3166 fi
3167 ;;
3168
3169 *)
3170 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3171 ;;
3172 esac
3173
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003176 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3183
3184 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3185
Jack Jansene578a632001-08-15 01:27:14 +00003186 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003187
Guido van Rossum563e7081996-09-10 18:20:48 +00003188else
Martin v. Löwis11437992002-04-12 09:54:03 +00003189
Jack Jansene578a632001-08-15 01:27:14 +00003190 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003192 PYTHONFRAMEWORKPREFIX=
3193 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194 FRAMEWORKINSTALLFIRST=
3195 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003196 FRAMEWORKALTINSTALLFIRST=
3197 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003198 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 if test "x${prefix}" = "xNONE" ; then
3200 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Jack Jansene578a632001-08-15 01:27:14 +00003204 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003205
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207fi
3208
Thomas Wouters477c8d52006-05-27 19:21:47 +00003209
3210
Michael W. Hudson54241132001-12-07 15:38:26 +00003211
3212
3213
3214
Jack Jansene578a632001-08-15 01:27:14 +00003215
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003216
3217
3218
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003219
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003220
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003222
3223cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003224#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003225_ACEOF
3226
3227
Jack Jansene578a632001-08-15 01:27:14 +00003228##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003229## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003230## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003231##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003232# Set name for machine-dependent library files
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3235$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003236if test -z "$MACHDEP"
3237then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003238 # avoid using uname for cross builds
3239 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003240 # ac_sys_system and ac_sys_release are used for setting
3241 # a lot of different things including 'define_xopen_source'
3242 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003244 *-*-linux-android*)
3245 ac_sys_system=Linux-android
3246 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 *-*-linux*)
3248 ac_sys_system=Linux
3249 ;;
3250 *-*-cygwin*)
3251 ac_sys_system=Cygwin
3252 ;;
3253 *)
3254 # for now, limit cross builds to known configurations
3255 MACHDEP="unknown"
3256 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3257 esac
3258 ac_sys_release=
3259 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003260 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003261 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003262 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003266 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003267 fi
3268 ac_md_system=`echo $ac_sys_system |
3269 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3270 ac_md_release=`echo $ac_sys_release |
3271 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3272 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003273
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003275 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003276 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003277 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003278 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003280fi
Guido van Rossum91922671997-10-09 20:24:13 +00003281
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003282
3283if test "$cross_compiling" = yes; then
3284 case "$host" in
3285 *-*-linux*)
3286 case "$host_cpu" in
3287 arm*)
3288 _host_cpu=arm
3289 ;;
3290 *)
3291 _host_cpu=$host_cpu
3292 esac
3293 ;;
3294 *-*-cygwin*)
3295 _host_cpu=
3296 ;;
3297 *)
3298 # for now, limit cross builds to known configurations
3299 MACHDEP="unknown"
3300 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3301 esac
3302 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3303fi
3304
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003305# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3306# disable features if it is defined, without any means to access these
3307# features as extensions. For these systems, we skip the definition of
3308# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3309# some feature, make sure there is no alternative way to access this
3310# feature. Also, when using wildcards, make sure you have verified the
3311# need for not defining _XOPEN_SOURCE on all systems matching the
3312# wildcard, and that the wildcard does not include future systems
3313# (which may remove their limitations).
3314case $ac_sys_system/$ac_sys_release in
3315 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3316 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003317 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003318 # In addition, Stefan Krah confirms that issue #1244610 exists through
3319 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003320 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003321 define_xopen_source=no
3322 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3323 # also defined. This can be overridden by defining _BSD_SOURCE
3324 # As this has a different meaning on Linux, only define it on OpenBSD
3325
Matthias Kloseb9621712010-04-24 17:59:49 +00003326$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003327
3328 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003329 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003330 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3331 # also defined. This can be overridden by defining _BSD_SOURCE
3332 # As this has a different meaning on Linux, only define it on OpenBSD
3333
Matthias Kloseb9621712010-04-24 17:59:49 +00003334$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335
3336 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003337 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3338 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3339 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003340 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 +00003341 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003342 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3343 # request to enable features supported by the standard as a request
3344 # to disable features not supported by the standard. The best way
3345 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3346 # entirely and define __EXTENSIONS__ instead.
3347 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003348 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003349 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3350 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003351 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003352 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003353 define_xopen_source=no;;
3354 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003355 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003357 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003358 # On FreeBSD 4, the math functions C89 does not cover are never defined
3359 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3360 FreeBSD/4.*)
3361 define_xopen_source=no;;
3362 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3363 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3364 # identifies itself as Darwin/7.*
3365 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3366 # disables platform specific features beyond repair.
3367 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3368 # has no effect, don't bother defining them
3369 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003370 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003371 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003372 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003373 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3374 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3375 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003376 AIX/4)
3377 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003378 AIX/5)
3379 if test `uname -r` -eq 1; then
3380 define_xopen_source=no
3381 fi
3382 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003383 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3384 # defining NI_NUMERICHOST.
3385 QNX/6.3.2)
3386 define_xopen_source=no
3387 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003388
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003389esac
3390
3391if test $define_xopen_source = yes
3392then
Victor Stinner14d098d2011-09-07 22:29:43 +02003393 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003394
Victor Stinner14d098d2011-09-07 22:29:43 +02003395$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
3398 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3399 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3400 # several APIs are not declared. Since this is also needed in some
3401 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
Matthias Kloseb9621712010-04-24 17:59:49 +00003403$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003407$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003409fi
3410
Christian Heimes647cd872013-12-07 23:39:33 +01003411# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3412case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003413 hp*|HP*)
3414 define_stdc_a1=yes;;
3415 *)
3416 define_stdc_a1=no;;
3417esac
3418
3419if test $define_stdc_a1 = yes
3420then
Christian Heimes647cd872013-12-07 23:39:33 +01003421
3422$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3423
Christian Heimesb02bcae2013-12-08 15:21:08 +01003424fi
Christian Heimes647cd872013-12-07 23:39:33 +01003425
Jack Jansen6b08a402004-06-03 12:41:45 +00003426# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3427# it may influence the way we can build extensions, so distutils
3428# needs to check it
3429
Thomas Wouters477c8d52006-05-27 19:21:47 +00003430
Jack Jansen6b08a402004-06-03 12:41:45 +00003431CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003432EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003433
Guido van Rossum627b2d71993-12-24 10:39:16 +00003434# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003435
3436# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3437# for debug/optimization stuff. BASECFLAGS is for flags that are required
3438# just to get things to compile and link. Users are free to override OPT
3439# when running configure or make. The build should not break if they do.
3440# BASECFLAGS should generally not be messed with, however.
3441
3442# XXX shouldn't some/most/all of this code be merged with the stuff later
3443# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3445$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003448if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003450 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003451 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003452 without_gcc=yes;;
3453 yes) CC=gcc
3454 without_gcc=no;;
3455 *) CC=$withval
3456 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003457 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003458else
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003460 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003461 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003462 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003463 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003464 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465fi
3466
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3468$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003469
Zachary Ware5af85642015-12-21 12:09:17 -06003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3471$as_echo_n "checking for --with-icc... " >&6; }
3472
3473# Check whether --with-icc was given.
3474if test "${with_icc+set}" = set; then :
3475 withval=$with_icc;
3476 case $withval in
3477 no) CC=${CC:-cc}
3478 with_icc=no;;
3479 yes) CC=icc
3480 CXX=icpc
3481 with_icc=yes;;
3482 *) CC=$withval
3483 with_icc=$withval;;
3484 esac
3485else
3486
3487 with_icc=no
3488fi
3489
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3491$as_echo "$with_icc" >&6; }
3492
Guido van Rossum8b131c51995-03-09 14:10:13 +00003493# If the user switches compilers, we can't believe the cache
3494if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3495then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003496 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003497(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003498fi
3499
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003500# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3501# when the compiler supports them, but we don't always want -O2, and
3502# we set -g later.
3503if test -z "$CFLAGS"; then
3504 CFLAGS=
3505fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003506
3507if test "$ac_sys_system" = "Darwin"
3508then
3509 # Compiler selection on MacOSX is more complicated than
3510 # AC_PROG_CC can handle, see Mac/README.txt for more
3511 # information
3512 if test -z "${CC}"
3513 then
3514 found_gcc=
3515 found_clang=
3516 as_save_IFS=$IFS; IFS=:
3517 for as_dir in $PATH
3518 do
3519 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003520 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003521 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003522 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523 fi
3524 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003525 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003526 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003527 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 fi
3529 fi
3530 done
3531 IFS=$as_save_IFS
3532
3533 if test -n "$found_gcc" -a -n "$found_clang"
3534 then
3535 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3536 then
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3538$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3539 CC="$found_clang"
3540 CXX="$found_clang++"
3541 fi
3542
3543
3544 elif test -z "$found_gcc" -a -n "$found_clang"
3545 then
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3547$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3548 CC="$found_clang"
3549 CXX="$found_clang++"
3550
3551 elif test -z "$found_gcc" -a -z "$found_clang"
3552 then
3553 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3554 if test -n "${found_clang}"
3555 then
3556 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3557$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3558 CC="${found_clang}"
3559 CXX="`/usr/bin/xcrun -find clang++`"
3560
3561 # else: use default behaviour
3562 fi
3563 fi
3564 fi
3565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003566ac_ext=c
3567ac_cpp='$CPP $CPPFLAGS'
3568ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3569ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3570ac_compiler_gnu=$ac_cv_c_compiler_gnu
3571if test -n "$ac_tool_prefix"; then
3572 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3573set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3575$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003576if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003578else
3579 if test -n "$CC"; then
3580 ac_cv_prog_CC="$CC" # Let the user override the test.
3581else
Martin v. Löwis11437992002-04-12 09:54:03 +00003582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3583for as_dir in $PATH
3584do
3585 IFS=$as_save_IFS
3586 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003587 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 $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 +00003591 break 2
3592 fi
3593done
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003596
Jack Jansendd19cf82001-12-06 22:36:17 +00003597fi
3598fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003599CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003600if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3602$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003603else
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606fi
3607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610if test -z "$ac_cv_prog_CC"; then
3611 ac_ct_CC=$CC
3612 # Extract the first word of "gcc", so it can be a program name with args.
3613set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3615$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003616if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003618else
3619 if test -n "$ac_ct_CC"; then
3620 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3621else
3622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3623for as_dir in $PATH
3624do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $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 +00003631 break 2
3632 fi
3633done
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003636
3637fi
3638fi
3639ac_ct_CC=$ac_cv_prog_ac_ct_CC
3640if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3642$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643else
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3645$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648 if test "x$ac_ct_CC" = x; then
3649 CC=""
3650 else
3651 case $cross_compiling:$ac_tool_warned in
3652yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655ac_tool_warned=yes ;;
3656esac
3657 CC=$ac_ct_CC
3658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
3660 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003661fi
3662
Jack Jansendd19cf82001-12-06 22:36:17 +00003663if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664 if test -n "$ac_tool_prefix"; then
3665 # 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 +00003666set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003669if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003671else
3672 if test -n "$CC"; then
3673 ac_cv_prog_CC="$CC" # Let the user override the test.
3674else
Martin v. Löwis11437992002-04-12 09:54:03 +00003675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3676for as_dir in $PATH
3677do
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $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 +00003684 break 2
3685 fi
3686done
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690fi
3691fi
3692CC=$ac_cv_prog_CC
3693if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3695$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703fi
3704if test -z "$CC"; then
3705 # Extract the first word of "cc", so it can be a program name with args.
3706set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3708$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003709if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003711else
3712 if test -n "$CC"; then
3713 ac_cv_prog_CC="$CC" # Let the user override the test.
3714else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3717for as_dir in $PATH
3718do
3719 IFS=$as_save_IFS
3720 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3724 ac_prog_rejected=yes
3725 continue
3726 fi
3727 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $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 +00003729 break 2
3730 fi
3731done
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003734
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735if test $ac_prog_rejected = yes; then
3736 # We found a bogon in the path, so make sure we never use it.
3737 set dummy $ac_cv_prog_CC
3738 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740 # We chose a different compiler from the bogus one.
3741 # However, it has the same basename, so the bogon will be chosen
3742 # first if we set CC to just the basename; use the full file name.
3743 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003744 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745 fi
3746fi
3747fi
3748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003749CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003750if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3752$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753else
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3755$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756fi
3757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758
Martin v. Löwis11437992002-04-12 09:54:03 +00003759fi
3760if test -z "$CC"; then
3761 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 do
3764 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3765set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003768if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003770else
3771 if test -n "$CC"; then
3772 ac_cv_prog_CC="$CC" # Let the user override the test.
3773else
Martin v. Löwis11437992002-04-12 09:54:03 +00003774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777 IFS=$as_save_IFS
3778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003785done
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003788
3789fi
3790fi
3791CC=$ac_cv_prog_CC
3792if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3794$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003798fi
3799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 test -n "$CC" && break
3802 done
3803fi
3804if test -z "$CC"; then
3805 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003807do
3808 # Extract the first word of "$ac_prog", so it can be a program name with args.
3809set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003814else
3815 if test -n "$ac_ct_CC"; then
3816 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3817else
3818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 $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 +00003827 break 2
3828 fi
3829done
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833fi
3834fi
3835ac_ct_CC=$ac_cv_prog_ac_ct_CC
3836if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3838$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839else
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3841$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 test -n "$ac_ct_CC" && break
3846done
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848 if test "x$ac_ct_CC" = x; then
3849 CC=""
3850 else
3851 case $cross_compiling:$ac_tool_warned in
3852yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855ac_tool_warned=yes ;;
3856esac
3857 CC=$ac_ct_CC
3858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
3860
3861fi
3862
3863
Matthias Kloseb9621712010-04-24 17:59:49 +00003864test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003866as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003867See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868
3869# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003870$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3871set X $ac_compile
3872ac_compiler=$2
3873for ac_option in --version -v -V -qversion; do
3874 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875case "(($ac_try" in
3876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3877 *) ac_try_echo=$ac_try;;
3878esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3880$as_echo "$ac_try_echo"; } >&5
3881 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 if test -s conftest.err; then
3884 sed '10a\
3885... rest of stderr output deleted ...
3886 10q' conftest.err >conftest.er1
3887 cat conftest.er1 >&5
3888 fi
3889 rm -f conftest.er1 conftest.err
3890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3891 test $ac_status = 0; }
3892done
Martin v. Löwis11437992002-04-12 09:54:03 +00003893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003895/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003896
Martin v. Löwis11437992002-04-12 09:54:03 +00003897int
3898main ()
3899{
3900
3901 ;
3902 return 0;
3903}
3904_ACEOF
3905ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003906ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003907# Try to create an executable without -o first, disregard a.out.
3908# It will help us diagnose broken compilers, and finding out an intuition
3909# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3911$as_echo_n "checking whether the C compiler works... " >&6; }
3912ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3913
3914# The possible output files:
3915ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917ac_rmfiles=
3918for ac_file in $ac_files
3919do
3920 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3923 esac
3924done
3925rm -f $ac_rmfiles
3926
Matthias Kloseb9621712010-04-24 17:59:49 +00003927if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928case "(($ac_try" in
3929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3930 *) ac_try_echo=$ac_try;;
3931esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3933$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3937 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3939# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3940# in a Makefile. We should not override ac_cv_exeext if it was cached,
3941# so that the user can short-circuit this test for compilers unknown to
3942# Autoconf.
3943for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003944do
3945 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003948 ;;
3949 [ab].out )
3950 # We found the default executable, but exeext='' is most
3951 # certainly right.
3952 break;;
3953 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 then :; else
3956 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3957 fi
3958 # We set ac_cv_exeext here because the later test for it is not
3959 # safe: cross compilers may not add the suffix if given an `-o'
3960 # argument, so we may need to know it at that point already.
3961 # Even if this section looks crufty: it has the advantage of
3962 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003963 break;;
3964 * )
3965 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 esac
3967done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968test "$ac_cv_exeext" = no && ac_cv_exeext=
3969
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003970else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 ac_file=''
3972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003973if test -z "$ac_file"; then :
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3975$as_echo "no" >&6; }
3976$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003977sed 's/^/| /' conftest.$ac_ext >&5
3978
Matthias Kloseb9621712010-04-24 17:59:49 +00003979{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003981as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003982See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003983else
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3985$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3988$as_echo_n "checking for C compiler default output file name... " >&6; }
3989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3990$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003991ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992
Matthias Kloseb9621712010-04-24 17:59:49 +00003993rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3996$as_echo_n "checking for suffix of executables... " >&6; }
3997if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998case "(($ac_try" in
3999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4000 *) ac_try_echo=$ac_try;;
4001esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4003$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004005 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4007 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4009# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4010# work properly (i.e., refer to `conftest.exe'), while it won't with
4011# `rm'.
4012for ac_file in conftest.exe conftest conftest.*; do
4013 test -f "$ac_file" || continue
4014 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4017 break;;
4018 * ) break;;
4019 esac
4020done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021else
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004024as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004025See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004027rm -f conftest conftest$ac_cv_exeext
4028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4029$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030
4031rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004032EXEEXT=$ac_cv_exeext
4033ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4035/* end confdefs.h. */
4036#include <stdio.h>
4037int
4038main ()
4039{
4040FILE *f = fopen ("conftest.out", "w");
4041 return ferror (f) || fclose (f) != 0;
4042
4043 ;
4044 return 0;
4045}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004047ac_clean_files="$ac_clean_files conftest.out"
4048# Check that the compiler produces executables we can run. If not, either
4049# the compiler is broken, or we cross compile.
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4051$as_echo_n "checking whether we are cross compiling... " >&6; }
4052if test "$cross_compiling" != yes; then
4053 { { ac_try="$ac_link"
4054case "(($ac_try" in
4055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4056 *) ac_try_echo=$ac_try;;
4057esac
4058eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4059$as_echo "$ac_try_echo"; } >&5
4060 (eval "$ac_link") 2>&5
4061 ac_status=$?
4062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4063 test $ac_status = 0; }
4064 if { ac_try='./conftest$ac_cv_exeext'
4065 { { case "(($ac_try" in
4066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4067 *) ac_try_echo=$ac_try;;
4068esac
4069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4070$as_echo "$ac_try_echo"; } >&5
4071 (eval "$ac_try") 2>&5
4072 ac_status=$?
4073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4074 test $ac_status = 0; }; }; then
4075 cross_compiling=no
4076 else
4077 if test "$cross_compiling" = maybe; then
4078 cross_compiling=yes
4079 else
4080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004082as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004083If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004084See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 fi
4086 fi
4087fi
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4089$as_echo "$cross_compiling" >&6; }
4090
4091rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4092ac_clean_files=$ac_clean_files_save
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4094$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004095if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo_n "(cached) " >&6
4097else
4098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004099/* end confdefs.h. */
4100
4101int
4102main ()
4103{
4104
4105 ;
4106 return 0;
4107}
4108_ACEOF
4109rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004110if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111case "(($ac_try" in
4112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4113 *) ac_try_echo=$ac_try;;
4114esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004115eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4116$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4120 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 for ac_file in conftest.o conftest.obj conftest.*; do
4122 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004123 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004124 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4126 break;;
4127 esac
4128done
4129else
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004131sed 's/^/| /' conftest.$ac_ext >&5
4132
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004136See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004137fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004138rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4141$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142OBJEXT=$ac_cv_objext
4143ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4145$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004148else
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004151
Martin v. Löwis11437992002-04-12 09:54:03 +00004152int
4153main ()
4154{
4155#ifndef __GNUC__
4156 choke me
4157#endif
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 ac_compiler_gnu=yes
4165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004169ac_cv_c_compiler_gnu=$ac_compiler_gnu
4170
4171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4173$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4174if test $ac_compiler_gnu = yes; then
4175 GCC=yes
4176else
4177 GCC=
4178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004179ac_test_CFLAGS=${CFLAGS+set}
4180ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4182$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186 ac_save_c_werror_flag=$ac_c_werror_flag
4187 ac_c_werror_flag=yes
4188 ac_cv_prog_cc_g=no
4189 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004192
Martin v. Löwis11437992002-04-12 09:54:03 +00004193int
4194main ()
4195{
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004202 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203else
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 CFLAGS=""
4205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206/* end confdefs.h. */
4207
4208int
4209main ()
4210{
4211
4212 ;
4213 return 0;
4214}
4215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217
Matthias Kloseb9621712010-04-24 17:59:49 +00004218else
4219 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222/* end confdefs.h. */
4223
4224int
4225main ()
4226{
4227
4228 ;
4229 return 0;
4230}
4231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004232if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4240 ac_c_werror_flag=$ac_save_c_werror_flag
4241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4243$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004244if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246elif test $ac_cv_prog_cc_g = yes; then
4247 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004248 CFLAGS="-g -O2"
4249 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251 fi
4252else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253 if test "$GCC" = yes; then
4254 CFLAGS="-O2"
4255 else
4256 CFLAGS=
4257 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4260$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004261if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004263else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004265ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004267/* end confdefs.h. */
4268#include <stdarg.h>
4269#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004270struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004271/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4272struct buf { int x; };
4273FILE * (*rcsopen) (struct buf *, struct stat *, int);
4274static char *e (p, i)
4275 char **p;
4276 int i;
4277{
4278 return p[i];
4279}
4280static char *f (char * (*g) (char **, int), char **p, ...)
4281{
4282 char *s;
4283 va_list v;
4284 va_start (v,p);
4285 s = g (p, va_arg (v,int));
4286 va_end (v);
4287 return s;
4288}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004289
4290/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4291 function prototypes and stuff, but not '\xHH' hex character constants.
4292 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4295 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4300 inside strings and character constants. */
4301#define FOO(x) 'x'
4302int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4303
Skip Montanaro6dead952003-09-25 14:50:04 +00004304int test (int i, double x);
4305struct s1 {int (*f) (int a);};
4306struct s2 {int (*f) (double a);};
4307int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4308int argc;
4309char **argv;
4310int
4311main ()
4312{
4313return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4314 ;
4315 return 0;
4316}
4317_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4319 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004320do
4321 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325rm -f core conftest.err conftest.$ac_objext
4326 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004327done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004329CC=$ac_save_CC
4330
4331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332# AC_CACHE_VAL
4333case "x$ac_cv_prog_cc_c89" in
4334 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4336$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4339$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004340 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4343$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004344esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004345if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004346
Matthias Kloseb9621712010-04-24 17:59:49 +00004347fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004348
Martin v. Löwis11437992002-04-12 09:54:03 +00004349ac_ext=c
4350ac_cpp='$CPP $CPPFLAGS'
4351ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4352ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4353ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004355ac_ext=c
4356ac_cpp='$CPP $CPPFLAGS'
4357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4359ac_compiler_gnu=$ac_cv_c_compiler_gnu
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4361$as_echo_n "checking how to run the C preprocessor... " >&6; }
4362# On Suns, sometimes $CPP names a directory.
4363if test -n "$CPP" && test -d "$CPP"; then
4364 CPP=
4365fi
4366if test -z "$CPP"; then
4367 if ${ac_cv_prog_CPP+:} false; then :
4368 $as_echo_n "(cached) " >&6
4369else
4370 # Double quotes because CPP needs to be expanded
4371 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4372 do
4373 ac_preproc_ok=false
4374for ac_c_preproc_warn_flag in '' yes
4375do
4376 # Use a header file that comes with gcc, so configuring glibc
4377 # with a fresh cross-compiler works.
4378 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4379 # <limits.h> exists even on freestanding compilers.
4380 # On the NeXT, cc -E runs the code through the compiler's parser,
4381 # not just through cpp. "Syntax error" is here to catch this case.
4382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4383/* end confdefs.h. */
4384#ifdef __STDC__
4385# include <limits.h>
4386#else
4387# include <assert.h>
4388#endif
4389 Syntax error
4390_ACEOF
4391if ac_fn_c_try_cpp "$LINENO"; then :
4392
4393else
4394 # Broken: fails on valid input.
4395continue
4396fi
4397rm -f conftest.err conftest.i conftest.$ac_ext
4398
4399 # OK, works on sane cases. Now check whether nonexistent headers
4400 # can be detected and how.
4401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4402/* end confdefs.h. */
4403#include <ac_nonexistent.h>
4404_ACEOF
4405if ac_fn_c_try_cpp "$LINENO"; then :
4406 # Broken: success on invalid input.
4407continue
4408else
4409 # Passes both tests.
4410ac_preproc_ok=:
4411break
4412fi
4413rm -f conftest.err conftest.i conftest.$ac_ext
4414
4415done
4416# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4417rm -f conftest.i conftest.err conftest.$ac_ext
4418if $ac_preproc_ok; then :
4419 break
4420fi
4421
4422 done
4423 ac_cv_prog_CPP=$CPP
4424
4425fi
4426 CPP=$ac_cv_prog_CPP
4427else
4428 ac_cv_prog_CPP=$CPP
4429fi
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4431$as_echo "$CPP" >&6; }
4432ac_preproc_ok=false
4433for ac_c_preproc_warn_flag in '' yes
4434do
4435 # Use a header file that comes with gcc, so configuring glibc
4436 # with a fresh cross-compiler works.
4437 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4438 # <limits.h> exists even on freestanding compilers.
4439 # On the NeXT, cc -E runs the code through the compiler's parser,
4440 # not just through cpp. "Syntax error" is here to catch this case.
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442/* end confdefs.h. */
4443#ifdef __STDC__
4444# include <limits.h>
4445#else
4446# include <assert.h>
4447#endif
4448 Syntax error
4449_ACEOF
4450if ac_fn_c_try_cpp "$LINENO"; then :
4451
4452else
4453 # Broken: fails on valid input.
4454continue
4455fi
4456rm -f conftest.err conftest.i conftest.$ac_ext
4457
4458 # OK, works on sane cases. Now check whether nonexistent headers
4459 # can be detected and how.
4460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4461/* end confdefs.h. */
4462#include <ac_nonexistent.h>
4463_ACEOF
4464if ac_fn_c_try_cpp "$LINENO"; then :
4465 # Broken: success on invalid input.
4466continue
4467else
4468 # Passes both tests.
4469ac_preproc_ok=:
4470break
4471fi
4472rm -f conftest.err conftest.i conftest.$ac_ext
4473
4474done
4475# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4476rm -f conftest.i conftest.err conftest.$ac_ext
4477if $ac_preproc_ok; then :
4478
4479else
4480 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4482as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4483See \`config.log' for more details" "$LINENO" 5; }
4484fi
4485
4486ac_ext=c
4487ac_cpp='$CPP $CPPFLAGS'
4488ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4489ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4490ac_compiler_gnu=$ac_cv_c_compiler_gnu
4491
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4493$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4494if ${ac_cv_path_GREP+:} false; then :
4495 $as_echo_n "(cached) " >&6
4496else
4497 if test -z "$GREP"; then
4498 ac_path_GREP_found=false
4499 # Loop through the user's path and test for each of PROGNAME-LIST
4500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4502do
4503 IFS=$as_save_IFS
4504 test -z "$as_dir" && as_dir=.
4505 for ac_prog in grep ggrep; do
4506 for ac_exec_ext in '' $ac_executable_extensions; do
4507 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4508 as_fn_executable_p "$ac_path_GREP" || continue
4509# Check for GNU ac_path_GREP and select it if it is found.
4510 # Check for GNU $ac_path_GREP
4511case `"$ac_path_GREP" --version 2>&1` in
4512*GNU*)
4513 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4514*)
4515 ac_count=0
4516 $as_echo_n 0123456789 >"conftest.in"
4517 while :
4518 do
4519 cat "conftest.in" "conftest.in" >"conftest.tmp"
4520 mv "conftest.tmp" "conftest.in"
4521 cp "conftest.in" "conftest.nl"
4522 $as_echo 'GREP' >> "conftest.nl"
4523 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4524 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4525 as_fn_arith $ac_count + 1 && ac_count=$as_val
4526 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4527 # Best one so far, save it but keep looking for a better one
4528 ac_cv_path_GREP="$ac_path_GREP"
4529 ac_path_GREP_max=$ac_count
4530 fi
4531 # 10*(2^10) chars as input seems more than enough
4532 test $ac_count -gt 10 && break
4533 done
4534 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4535esac
4536
4537 $ac_path_GREP_found && break 3
4538 done
4539 done
4540 done
4541IFS=$as_save_IFS
4542 if test -z "$ac_cv_path_GREP"; then
4543 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4544 fi
4545else
4546 ac_cv_path_GREP=$GREP
4547fi
4548
4549fi
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4551$as_echo "$ac_cv_path_GREP" >&6; }
4552 GREP="$ac_cv_path_GREP"
4553
4554
Łukasz Langaa785c872016-09-09 17:37:37 -07004555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4556$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4557if ${ac_cv_path_SED+:} false; then :
4558 $as_echo_n "(cached) " >&6
4559else
4560 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4561 for ac_i in 1 2 3 4 5 6 7; do
4562 ac_script="$ac_script$as_nl$ac_script"
4563 done
4564 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4565 { ac_script=; unset ac_script;}
4566 if test -z "$SED"; then
4567 ac_path_SED_found=false
4568 # Loop through the user's path and test for each of PROGNAME-LIST
4569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4570for as_dir in $PATH
4571do
4572 IFS=$as_save_IFS
4573 test -z "$as_dir" && as_dir=.
4574 for ac_prog in sed gsed; do
4575 for ac_exec_ext in '' $ac_executable_extensions; do
4576 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4577 as_fn_executable_p "$ac_path_SED" || continue
4578# Check for GNU ac_path_SED and select it if it is found.
4579 # Check for GNU $ac_path_SED
4580case `"$ac_path_SED" --version 2>&1` in
4581*GNU*)
4582 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4583*)
4584 ac_count=0
4585 $as_echo_n 0123456789 >"conftest.in"
4586 while :
4587 do
4588 cat "conftest.in" "conftest.in" >"conftest.tmp"
4589 mv "conftest.tmp" "conftest.in"
4590 cp "conftest.in" "conftest.nl"
4591 $as_echo '' >> "conftest.nl"
4592 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4593 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4594 as_fn_arith $ac_count + 1 && ac_count=$as_val
4595 if test $ac_count -gt ${ac_path_SED_max-0}; then
4596 # Best one so far, save it but keep looking for a better one
4597 ac_cv_path_SED="$ac_path_SED"
4598 ac_path_SED_max=$ac_count
4599 fi
4600 # 10*(2^10) chars as input seems more than enough
4601 test $ac_count -gt 10 && break
4602 done
4603 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4604esac
4605
4606 $ac_path_SED_found && break 3
4607 done
4608 done
4609 done
4610IFS=$as_save_IFS
4611 if test -z "$ac_cv_path_SED"; then
4612 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4613 fi
4614else
4615 ac_cv_path_SED=$SED
4616fi
4617
4618fi
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4620$as_echo "$ac_cv_path_SED" >&6; }
4621 SED="$ac_cv_path_SED"
4622 rm -f conftest.sed
4623
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004624
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004625
4626
Matthias Kloseb9621712010-04-24 17:59:49 +00004627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4628$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004630# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004631if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004632 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
4634 case $withval in
4635 no) with_cxx_main=no
4636 MAINCC='$(CC)';;
4637 yes) with_cxx_main=yes
4638 MAINCC='$(CXX)';;
4639 *) with_cxx_main=yes
4640 MAINCC=$withval
4641 if test -z "$CXX"
4642 then
4643 CXX=$withval
4644 fi;;
4645 esac
4646else
4647
4648 with_cxx_main=no
4649 MAINCC='$(CC)'
4650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004651fi
4652
Matthias Kloseb9621712010-04-24 17:59:49 +00004653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4654$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004655
4656preset_cxx="$CXX"
4657if test -z "$CXX"
4658then
4659 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660 gcc) if test -n "$ac_tool_prefix"; then
4661 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4662set dummy ${ac_tool_prefix}g++; ac_word=$2
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4664$as_echo_n "checking for $ac_word... " >&6; }
4665if ${ac_cv_path_CXX+:} false; then :
4666 $as_echo_n "(cached) " >&6
4667else
4668 case $CXX in
4669 [\\/]* | ?:[\\/]*)
4670 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4671 ;;
4672 *)
4673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in notfound
4675do
4676 IFS=$as_save_IFS
4677 test -z "$as_dir" && as_dir=.
4678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004680 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682 break 2
4683 fi
4684done
4685 done
4686IFS=$as_save_IFS
4687
4688 ;;
4689esac
4690fi
4691CXX=$ac_cv_path_CXX
4692if test -n "$CXX"; then
4693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4694$as_echo "$CXX" >&6; }
4695else
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697$as_echo "no" >&6; }
4698fi
4699
4700
4701fi
4702if test -z "$ac_cv_path_CXX"; then
4703 ac_pt_CXX=$CXX
4704 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004705set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4707$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708if ${ac_cv_path_ac_pt_CXX+:} false; then :
4709 $as_echo_n "(cached) " >&6
4710else
4711 case $ac_pt_CXX in
4712 [\\/]* | ?:[\\/]*)
4713 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4714 ;;
4715 *)
4716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in notfound
4718do
4719 IFS=$as_save_IFS
4720 test -z "$as_dir" && as_dir=.
4721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004723 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725 break 2
4726 fi
4727done
4728 done
4729IFS=$as_save_IFS
4730
4731 ;;
4732esac
4733fi
4734ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4735if test -n "$ac_pt_CXX"; then
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4737$as_echo "$ac_pt_CXX" >&6; }
4738else
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4740$as_echo "no" >&6; }
4741fi
4742
4743 if test "x$ac_pt_CXX" = x; then
4744 CXX="g++"
4745 else
4746 case $cross_compiling:$ac_tool_warned in
4747yes:)
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4750ac_tool_warned=yes ;;
4751esac
4752 CXX=$ac_pt_CXX
4753 fi
4754else
4755 CXX="$ac_cv_path_CXX"
4756fi
4757 ;;
4758 cc) if test -n "$ac_tool_prefix"; then
4759 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4760set dummy ${ac_tool_prefix}c++; ac_word=$2
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004763if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765else
4766 case $CXX in
4767 [\\/]* | ?:[\\/]*)
4768 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4769 ;;
4770 *)
4771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4772for as_dir in notfound
4773do
4774 IFS=$as_save_IFS
4775 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780 break 2
4781 fi
4782done
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004784IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 ;;
4787esac
4788fi
4789CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004790if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4792$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004793else
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004797
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798
4799fi
4800if test -z "$ac_cv_path_CXX"; then
4801 ac_pt_CXX=$CXX
4802 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004808else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 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 +00004812 ;;
4813 *)
4814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4815for as_dir in notfound
4816do
4817 IFS=$as_save_IFS
4818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823 break 2
4824 fi
4825done
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004827IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829 ;;
4830esac
4831fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004832ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4833if test -n "$ac_pt_CXX"; then
4834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4835$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004836else
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4838$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004840
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004841 if test "x$ac_pt_CXX" = x; then
4842 CXX="c++"
4843 else
4844 case $cross_compiling:$ac_tool_warned in
4845yes:)
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4847$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4848ac_tool_warned=yes ;;
4849esac
4850 CXX=$ac_pt_CXX
4851 fi
4852else
4853 CXX="$ac_cv_path_CXX"
4854fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856 clang|*/clang) if test -n "$ac_tool_prefix"; then
4857 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4858set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4860$as_echo_n "checking for $ac_word... " >&6; }
4861if ${ac_cv_path_CXX+:} false; then :
4862 $as_echo_n "(cached) " >&6
4863else
4864 case $CXX in
4865 [\\/]* | ?:[\\/]*)
4866 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4867 ;;
4868 *)
4869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4870for as_dir in notfound
4871do
4872 IFS=$as_save_IFS
4873 test -z "$as_dir" && as_dir=.
4874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004876 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4878 break 2
4879 fi
4880done
4881 done
4882IFS=$as_save_IFS
4883
Ned Deilycbfb9a52012-06-23 16:02:19 -07004884 ;;
4885esac
4886fi
4887CXX=$ac_cv_path_CXX
4888if test -n "$CXX"; then
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4890$as_echo "$CXX" >&6; }
4891else
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4893$as_echo "no" >&6; }
4894fi
4895
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004896
4897fi
4898if test -z "$ac_cv_path_CXX"; then
4899 ac_pt_CXX=$CXX
4900 # Extract the first word of "clang++", so it can be a program name with args.
4901set dummy clang++; ac_word=$2
4902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4903$as_echo_n "checking for $ac_word... " >&6; }
4904if ${ac_cv_path_ac_pt_CXX+:} false; then :
4905 $as_echo_n "(cached) " >&6
4906else
4907 case $ac_pt_CXX in
4908 [\\/]* | ?:[\\/]*)
4909 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4910 ;;
4911 *)
4912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4913for as_dir in notfound
4914do
4915 IFS=$as_save_IFS
4916 test -z "$as_dir" && as_dir=.
4917 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004919 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4921 break 2
4922 fi
4923done
4924 done
4925IFS=$as_save_IFS
4926
4927 ;;
4928esac
4929fi
4930ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4931if test -n "$ac_pt_CXX"; then
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4933$as_echo "$ac_pt_CXX" >&6; }
4934else
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4936$as_echo "no" >&6; }
4937fi
4938
4939 if test "x$ac_pt_CXX" = x; then
4940 CXX="clang++"
4941 else
4942 case $cross_compiling:$ac_tool_warned in
4943yes:)
4944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4946ac_tool_warned=yes ;;
4947esac
4948 CXX=$ac_pt_CXX
4949 fi
4950else
4951 CXX="$ac_cv_path_CXX"
4952fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004953 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004954 icc|*/icc) if test -n "$ac_tool_prefix"; then
4955 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4956set dummy ${ac_tool_prefix}icpc; ac_word=$2
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958$as_echo_n "checking for $ac_word... " >&6; }
4959if ${ac_cv_path_CXX+:} false; then :
4960 $as_echo_n "(cached) " >&6
4961else
4962 case $CXX in
4963 [\\/]* | ?:[\\/]*)
4964 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4965 ;;
4966 *)
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in notfound
4969do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 for ac_exec_ext in '' $ac_executable_extensions; do
4973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4974 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976 break 2
4977 fi
4978done
4979 done
4980IFS=$as_save_IFS
4981
4982 ;;
4983esac
4984fi
4985CXX=$ac_cv_path_CXX
4986if test -n "$CXX"; then
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4988$as_echo "$CXX" >&6; }
4989else
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991$as_echo "no" >&6; }
4992fi
4993
4994
4995fi
4996if test -z "$ac_cv_path_CXX"; then
4997 ac_pt_CXX=$CXX
4998 # Extract the first word of "icpc", so it can be a program name with args.
4999set dummy icpc; ac_word=$2
5000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5001$as_echo_n "checking for $ac_word... " >&6; }
5002if ${ac_cv_path_ac_pt_CXX+:} false; then :
5003 $as_echo_n "(cached) " >&6
5004else
5005 case $ac_pt_CXX in
5006 [\\/]* | ?:[\\/]*)
5007 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5008 ;;
5009 *)
5010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5011for as_dir in notfound
5012do
5013 IFS=$as_save_IFS
5014 test -z "$as_dir" && as_dir=.
5015 for ac_exec_ext in '' $ac_executable_extensions; do
5016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5017 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5019 break 2
5020 fi
5021done
5022 done
5023IFS=$as_save_IFS
5024
5025 ;;
5026esac
5027fi
5028ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5029if test -n "$ac_pt_CXX"; then
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5031$as_echo "$ac_pt_CXX" >&6; }
5032else
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034$as_echo "no" >&6; }
5035fi
5036
5037 if test "x$ac_pt_CXX" = x; then
5038 CXX="icpc"
5039 else
5040 case $cross_compiling:$ac_tool_warned in
5041yes:)
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5043$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5044ac_tool_warned=yes ;;
5045esac
5046 CXX=$ac_pt_CXX
5047 fi
5048else
5049 CXX="$ac_cv_path_CXX"
5050fi
5051 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005052 esac
5053 if test "$CXX" = "notfound"
5054 then
5055 CXX=""
5056 fi
5057fi
5058if test -z "$CXX"
5059then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 if test -n "$ac_tool_prefix"; then
5061 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5062 do
5063 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5064set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005067if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005069else
5070 if test -n "$CXX"; then
5071 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5072else
5073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005082 break 2
5083 fi
5084done
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005087
5088fi
5089fi
5090CXX=$ac_cv_prog_CXX
5091if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5093$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094else
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097fi
5098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005100 test -n "$CXX" && break
5101 done
5102fi
5103if test -z "$CXX"; then
5104 ac_ct_CXX=$CXX
5105 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5106do
5107 # Extract the first word of "$ac_prog", so it can be a program name with args.
5108set dummy $ac_prog; ac_word=$2
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110$as_echo_n "checking for $ac_word... " >&6; }
5111if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5112 $as_echo_n "(cached) " >&6
5113else
5114 if test -n "$ac_ct_CXX"; then
5115 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5116else
5117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in $PATH
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
5122 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005124 ac_cv_prog_ac_ct_CXX="$ac_prog"
5125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5126 break 2
5127 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005129 done
5130IFS=$as_save_IFS
5131
5132fi
5133fi
5134ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5135if test -n "$ac_ct_CXX"; then
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5137$as_echo "$ac_ct_CXX" >&6; }
5138else
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140$as_echo "no" >&6; }
5141fi
5142
5143
5144 test -n "$ac_ct_CXX" && break
5145done
5146
5147 if test "x$ac_ct_CXX" = x; then
5148 CXX="notfound"
5149 else
5150 case $cross_compiling:$ac_tool_warned in
5151yes:)
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5153$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5154ac_tool_warned=yes ;;
5155esac
5156 CXX=$ac_ct_CXX
5157 fi
5158fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005159
5160 if test "$CXX" = "notfound"
5161 then
5162 CXX=""
5163 fi
5164fi
5165if test "$preset_cxx" != "$CXX"
5166then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005167 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005168
5169 By default, distutils will build C++ extension modules with \"$CXX\".
5170 If this is not intended, then set CXX on the configure command line.
5171 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005172$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005173
5174 By default, distutils will build C++ extension modules with \"$CXX\".
5175 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005176 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005177fi
5178
5179
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005180MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5181
5182
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5184$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5185cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005186#undef bfin
5187#undef cris
5188#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005189#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005190#undef hppa
5191#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005192#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005193#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005194#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005195#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005197#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005198 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005199#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200# if defined(__x86_64__) && defined(__LP64__)
5201 x86_64-linux-gnu
5202# elif defined(__x86_64__) && defined(__ILP32__)
5203 x86_64-linux-gnux32
5204# elif defined(__i386__)
5205 i386-linux-gnu
5206# elif defined(__aarch64__) && defined(__AARCH64EL__)
5207# if defined(__ILP32__)
5208 aarch64_ilp32-linux-gnu
5209# else
5210 aarch64-linux-gnu
5211# endif
5212# elif defined(__aarch64__) && defined(__AARCH64EB__)
5213# if defined(__ILP32__)
5214 aarch64_be_ilp32-linux-gnu
5215# else
5216 aarch64_be-linux-gnu
5217# endif
5218# elif defined(__alpha__)
5219 alpha-linux-gnu
5220# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5221# if defined(__ARMEL__)
5222 arm-linux-gnueabihf
5223# else
5224 armeb-linux-gnueabihf
5225# endif
5226# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5227# if defined(__ARMEL__)
5228 arm-linux-gnueabi
5229# else
5230 armeb-linux-gnueabi
5231# endif
5232# elif defined(__hppa__)
5233 hppa-linux-gnu
5234# elif defined(__ia64__)
5235 ia64-linux-gnu
5236# elif defined(__m68k__) && !defined(__mcoldfire__)
5237 m68k-linux-gnu
5238# elif defined(__mips_hard_float) && defined(_MIPSEL)
5239# if _MIPS_SIM == _ABIO32
5240 mipsel-linux-gnu
5241# elif _MIPS_SIM == _ABIN32
5242 mips64el-linux-gnuabin32
5243# elif _MIPS_SIM == _ABI64
5244 mips64el-linux-gnuabi64
5245# else
5246# error unknown platform triplet
5247# endif
5248# elif defined(__mips_hard_float)
5249# if _MIPS_SIM == _ABIO32
5250 mips-linux-gnu
5251# elif _MIPS_SIM == _ABIN32
5252 mips64-linux-gnuabin32
5253# elif _MIPS_SIM == _ABI64
5254 mips64-linux-gnuabi64
5255# else
5256# error unknown platform triplet
5257# endif
5258# elif defined(__or1k__)
5259 or1k-linux-gnu
5260# elif defined(__powerpc__) && defined(__SPE__)
5261 powerpc-linux-gnuspe
5262# elif defined(__powerpc64__)
5263# if defined(__LITTLE_ENDIAN__)
5264 powerpc64le-linux-gnu
5265# else
5266 powerpc64-linux-gnu
5267# endif
5268# elif defined(__powerpc__)
5269 powerpc-linux-gnu
5270# elif defined(__s390x__)
5271 s390x-linux-gnu
5272# elif defined(__s390__)
5273 s390-linux-gnu
5274# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5275 sh4-linux-gnu
5276# elif defined(__sparc__) && defined(__arch64__)
5277 sparc64-linux-gnu
5278# elif defined(__sparc__)
5279 sparc-linux-gnu
5280# else
5281# error unknown platform triplet
5282# endif
5283#elif defined(__FreeBSD_kernel__)
5284# if defined(__LP64__)
5285 x86_64-kfreebsd-gnu
5286# elif defined(__i386__)
5287 i386-kfreebsd-gnu
5288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__gnu_hurd__)
5292 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005293#elif defined(__APPLE__)
5294 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295#else
5296# error unknown platform triplet
5297#endif
5298
5299EOF
5300
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005301if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5304$as_echo "$PLATFORM_TRIPLET" >&6; }
5305else
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5307$as_echo "none" >&6; }
5308fi
5309rm -f conftest.c conftest.out
5310
5311if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5312 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5313 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5314 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005315elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5316 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005317fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005318
doko@ubuntu.com55532312016-06-14 08:55:19 +02005319if test x$MULTIARCH != x; then
5320 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5321fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322
5323
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5325$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5326save_LDFLAGS="$LDFLAGS"
5327LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005328
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5330/* end confdefs.h. */
5331
5332int
5333main ()
5334{
5335
5336 ;
5337 return 0;
5338}
5339_ACEOF
5340if ac_fn_c_try_link "$LINENO"; then :
5341 NO_AS_NEEDED="-Wl,--no-as-needed"
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5343$as_echo "yes" >&6; }
5344else
5345 NO_AS_NEEDED=""
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5347$as_echo "no" >&6; }
5348fi
5349rm -f core conftest.err conftest.$ac_objext \
5350 conftest$ac_exeext conftest.$ac_ext
5351LDFLAGS="$save_LDFLAGS"
5352
5353
5354
5355# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005356
Matthias Kloseb9621712010-04-24 17:59:49 +00005357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5358$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005359if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361else
5362 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5363 then ac_cv_path_EGREP="$GREP -E"
5364 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 # Loop through the user's path and test for each of PROGNAME-LIST
5368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5370do
5371 IFS=$as_save_IFS
5372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 for ac_prog in egrep; do
5374 for ac_exec_ext in '' $ac_executable_extensions; do
5375 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005376 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005377# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 # Check for GNU $ac_path_EGREP
5379case `"$ac_path_EGREP" --version 2>&1` in
5380*GNU*)
5381 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5382*)
5383 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 while :
5386 do
5387 cat "conftest.in" "conftest.in" >"conftest.tmp"
5388 mv "conftest.tmp" "conftest.in"
5389 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5392 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5395 # Best one so far, save it but keep looking for a better one
5396 ac_cv_path_EGREP="$ac_path_EGREP"
5397 ac_path_EGREP_max=$ac_count
5398 fi
5399 # 10*(2^10) chars as input seems more than enough
5400 test $ac_count -gt 10 && break
5401 done
5402 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5403esac
5404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 $ac_path_EGREP_found && break 3
5406 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005411 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 +00005412 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413else
5414 ac_cv_path_EGREP=$EGREP
5415fi
5416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 fi
5418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5420$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005422
5423
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5425$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005426if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo_n "(cached) " >&6
5428else
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005430/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005431#include <stdlib.h>
5432#include <stdarg.h>
5433#include <string.h>
5434#include <float.h>
5435
5436int
5437main ()
5438{
5439
5440 ;
5441 return 0;
5442}
5443_ACEOF
5444if ac_fn_c_try_compile "$LINENO"; then :
5445 ac_cv_header_stdc=yes
5446else
5447 ac_cv_header_stdc=no
5448fi
5449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5450
5451if test $ac_cv_header_stdc = yes; then
5452 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454/* end confdefs.h. */
5455#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005456
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005457_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005461else
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005463fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005464rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Matthias Kloseb9621712010-04-24 17:59:49 +00005466fi
5467
5468if test $ac_cv_header_stdc = yes; then
5469 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5471/* end confdefs.h. */
5472#include <stdlib.h>
5473
5474_ACEOF
5475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5476 $EGREP "free" >/dev/null 2>&1; then :
5477
5478else
5479 ac_cv_header_stdc=no
5480fi
5481rm -f conftest*
5482
5483fi
5484
5485if test $ac_cv_header_stdc = yes; then
5486 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5487 if test "$cross_compiling" = yes; then :
5488 :
5489else
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492#include <ctype.h>
5493#include <stdlib.h>
5494#if ((' ' & 0x0FF) == 0x020)
5495# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5496# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5497#else
5498# define ISLOWER(c) \
5499 (('a' <= (c) && (c) <= 'i') \
5500 || ('j' <= (c) && (c) <= 'r') \
5501 || ('s' <= (c) && (c) <= 'z'))
5502# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5503#endif
5504
5505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5506int
5507main ()
5508{
5509 int i;
5510 for (i = 0; i < 256; i++)
5511 if (XOR (islower (i), ISLOWER (i))
5512 || toupper (i) != TOUPPER (i))
5513 return 2;
5514 return 0;
5515}
5516_ACEOF
5517if ac_fn_c_try_run "$LINENO"; then :
5518
5519else
5520 ac_cv_header_stdc=no
5521fi
5522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5523 conftest.$ac_objext conftest.beam conftest.$ac_ext
5524fi
5525
5526fi
5527fi
5528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5529$as_echo "$ac_cv_header_stdc" >&6; }
5530if test $ac_cv_header_stdc = yes; then
5531
5532$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5533
5534fi
5535
5536# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5537for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5538 inttypes.h stdint.h unistd.h
5539do :
5540 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5541ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5542"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005543if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 cat >>confdefs.h <<_ACEOF
5545#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5546_ACEOF
5547
5548fi
5549
5550done
5551
5552
5553
5554 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 +02005555if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005556 MINIX=yes
5557else
5558 MINIX=
5559fi
5560
5561
5562 if test "$MINIX" = yes; then
5563
5564$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5565
5566
5567$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5568
5569
5570$as_echo "#define _MINIX 1" >>confdefs.h
5571
5572 fi
5573
5574
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5576$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005577if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005578 $as_echo_n "(cached) " >&6
5579else
5580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5581/* end confdefs.h. */
5582
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005583# define __EXTENSIONS__ 1
5584 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005585int
5586main ()
5587{
5588
5589 ;
5590 return 0;
5591}
5592_ACEOF
5593if ac_fn_c_try_compile "$LINENO"; then :
5594 ac_cv_safe_to_define___extensions__=yes
5595else
5596 ac_cv_safe_to_define___extensions__=no
5597fi
5598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599fi
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5601$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5602 test $ac_cv_safe_to_define___extensions__ = yes &&
5603 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5604
5605 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5606
5607 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5608
5609 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5610
5611 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5612
5613
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
Xavier de Gaye95750b12016-07-09 11:05:42 +02005615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5616$as_echo_n "checking for the Android API level... " >&6; }
5617cat >> conftest.c <<EOF
5618#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005619android_api = __ANDROID_API__
5620arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005621#else
5622#error not Android
5623#endif
5624EOF
5625
5626if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005627 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5628 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5630$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005631 if test -z "$ANDROID_API_LEVEL"; then
5632 echo 'Fatal: you must define __ANDROID_API__'
5633 exit 1
5634 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005635
5636cat >>confdefs.h <<_ACEOF
5637#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5638_ACEOF
5639
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005640
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5642$as_echo_n "checking for the Android arm ABI... " >&6; }
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5644$as_echo "$_arm_arch" >&6; }
5645 if test "$_arm_arch" = 7; then
5646 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5647 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5648 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005649else
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5651$as_echo "not Android" >&6; }
5652fi
5653rm -f conftest.c conftest.out
5654
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655# Check for unsupported systems
5656case $ac_sys_system/$ac_sys_release in
5657atheos*|Linux*/1*)
5658 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5659 echo See README for details.
5660 exit 1;;
5661esac
5662
5663
Matthias Kloseb9621712010-04-24 17:59:49 +00005664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5665$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666
5667# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005668if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 withval=$with_suffix;
5670 case $withval in
5671 no) EXEEXT=;;
5672 yes) EXEEXT=.exe;;
5673 *) EXEEXT=$withval;;
5674 esac
5675fi
5676
Matthias Kloseb9621712010-04-24 17:59:49 +00005677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5678$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679
5680# Test whether we're running on a non-case-sensitive system, in which
5681# case we give a warning if no ext is given
5682
Matthias Kloseb9621712010-04-24 17:59:49 +00005683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5684$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685if test ! -d CaseSensitiveTestDir; then
5686mkdir CaseSensitiveTestDir
5687fi
5688
5689if test -d casesensitivetestdir
5690then
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5692$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 BUILDEXEEXT=.exe
5694else
Matthias Kloseb9621712010-04-24 17:59:49 +00005695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 BUILDEXEEXT=$EXEEXT
5698fi
5699rmdir CaseSensitiveTestDir
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701case $ac_sys_system in
5702hp*|HP*)
5703 case $CC in
5704 cc|*/cc) CC="$CC -Ae";;
5705 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706esac
5707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
Matthias Kloseb9621712010-04-24 17:59:49 +00005709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5710$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711if test -z "$LIBRARY"
5712then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005713 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5716$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
5718# LDLIBRARY is the name of the library to link against (as opposed to the
5719# name of the library into which to insert object files). BLDLIBRARY is also
5720# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5721# is blank as the main program is not linked directly against LDLIBRARY.
5722# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5723# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5724# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5725# DLLLIBRARY is the shared (i.e., DLL) library.
5726#
5727# RUNSHARED is used to run shared python without installed libraries
5728#
5729# INSTSONAME is the name of the shared library that will be use to install
5730# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005731#
5732# LDVERSION is the shared library version number, normally the Python version
5733# with the ABI build flags appended.
5734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735
5736
5737
5738
5739
5740
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742LDLIBRARY="$LIBRARY"
5743BLDLIBRARY='$(LDLIBRARY)'
5744INSTSONAME='$(LDLIBRARY)'
5745DLLLIBRARY=''
5746LDLIBRARYDIR=''
5747RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005748LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749
5750# LINKCC is the command that links the python executable -- default is $(CC).
5751# If CXX is set, and if it is needed to link a main function that was
5752# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5753# python might then depend on the C++ runtime
5754# This is altered for AIX in order to build the export list before
5755# linking.
5756
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5758$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759if test -z "$LINKCC"
5760then
5761 LINKCC='$(PURIFY) $(MAINCC)'
5762 case $ac_sys_system in
5763 AIX*)
5764 exp_extra="\"\""
5765 if test $ac_sys_release -ge 5 -o \
5766 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5767 exp_extra="."
5768 fi
5769 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 QNX*)
5771 # qcc must be used because the other compilers do not
5772 # support -N.
5773 LINKCC=qcc;;
5774 esac
5775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5777$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778
5779# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5780# make sure we default having it set to "no": this is used by
5781# distutils.unixccompiler to know if it should add --enable-new-dtags
5782# to linker command lines, and failing to detect GNU ld simply results
5783# in the same bahaviour as before.
5784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5786$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787ac_prog=ld
5788if test "$GCC" = yes; then
5789 ac_prog=`$CC -print-prog-name=ld`
5790fi
5791case `"$ac_prog" -V 2>&1 < /dev/null` in
5792 *GNU*)
5793 GNULD=yes;;
5794 *)
5795 GNULD=no;;
5796esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5798$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5801$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005803if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 enableval=$enable_shared;
5805fi
5806
5807
5808if test -z "$enable_shared"
5809then
5810 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005811 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 enable_shared="yes";;
5813 *)
5814 enable_shared="no";;
5815 esac
5816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5818$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5821$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005824 enableval=$enable_profiling;
5825fi
5826
5827if test "x$enable_profiling" = xyes; then
5828 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005829 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831/* end confdefs.h. */
5832int main() { return 0; }
5833_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834if ac_fn_c_try_link "$LINENO"; then :
5835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839rm -f core conftest.err conftest.$ac_objext \
5840 conftest$ac_exeext conftest.$ac_ext
5841 CC="$ac_save_cc"
5842else
5843 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5846$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
doko@ubuntu.comba015832012-06-30 16:52:05 +02005848if test "x$enable_profiling" = xyes; then
5849 BASECFLAGS="-pg $BASECFLAGS"
5850 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851fi
5852
Matthias Kloseb9621712010-04-24 17:59:49 +00005853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5854$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
5856# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5857# library that we build, but we do not want to link against it (we
5858# will find it with a -framework option). For this reason there is an
5859# extra variable BLDLIBRARY against which Python and the extension
5860# modules are linked, BLDLIBRARY. This is normally the same as
5861# LDLIBRARY, but empty for MacOSX framework builds.
5862if test "$enable_framework"
5863then
5864 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005865 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866 BLDLIBRARY=''
5867else
5868 BLDLIBRARY='$(LDLIBRARY)'
5869fi
5870
5871# Other platforms follow
5872if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005873 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
Matthias Kloseb9621712010-04-24 17:59:49 +00005875$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
5877 case $ac_sys_system in
5878 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005879 LDLIBRARY='libpython$(LDVERSION).dll.a'
5880 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 ;;
5882 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005883 LDLIBRARY='libpython$(LDVERSION).so'
5884 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005885 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005887 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005888 then
5889 PY3LIBRARY=libpython3.so
5890 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005892 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).so'
5894 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005897 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005898 then
5899 PY3LIBRARY=libpython3.so
5900 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 hp*|HP*)
5903 case `uname -m` in
5904 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
5907 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
5910 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).dylib'
5916 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005919 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005922 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923
5924 esac
5925else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005926 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 case $ac_sys_system in
5928 CYGWIN*)
5929 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 ;;
5932 esac
5933fi
5934
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005935if test "$cross_compiling" = yes; then
5936 RUNSHARED=
5937fi
5938
Matthias Kloseb9621712010-04-24 17:59:49 +00005939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5940$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005943if test -n "$ac_tool_prefix"; then
5944 for ac_prog in ar aal
5945 do
5946 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5947set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5949$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005950if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952else
5953 if test -n "$AR"; then
5954 ac_cv_prog_AR="$AR" # Let the user override the test.
5955else
5956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959 IFS=$as_save_IFS
5960 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005963 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 break 2
5966 fi
5967done
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969IFS=$as_save_IFS
5970
5971fi
5972fi
5973AR=$ac_cv_prog_AR
5974if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5976$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977else
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980fi
5981
5982
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005983 test -n "$AR" && break
5984 done
5985fi
5986if test -z "$AR"; then
5987 ac_ct_AR=$AR
5988 for ac_prog in ar aal
5989do
5990 # Extract the first word of "$ac_prog", so it can be a program name with args.
5991set dummy $ac_prog; ac_word=$2
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993$as_echo_n "checking for $ac_word... " >&6; }
5994if ${ac_cv_prog_ac_ct_AR+:} false; then :
5995 $as_echo_n "(cached) " >&6
5996else
5997 if test -n "$ac_ct_AR"; then
5998 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5999else
6000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003 IFS=$as_save_IFS
6004 test -z "$as_dir" && as_dir=.
6005 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006007 ac_cv_prog_ac_ct_AR="$ac_prog"
6008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6009 break 2
6010 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006012 done
6013IFS=$as_save_IFS
6014
6015fi
6016fi
6017ac_ct_AR=$ac_cv_prog_ac_ct_AR
6018if test -n "$ac_ct_AR"; then
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6020$as_echo "$ac_ct_AR" >&6; }
6021else
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023$as_echo "no" >&6; }
6024fi
6025
6026
6027 test -n "$ac_ct_AR" && break
6028done
6029
6030 if test "x$ac_ct_AR" = x; then
6031 AR="ar"
6032 else
6033 case $cross_compiling:$ac_tool_warned in
6034yes:)
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6036$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6037ac_tool_warned=yes ;;
6038esac
6039 AR=$ac_ct_AR
6040 fi
6041fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042
6043
6044# tweak ARFLAGS only if the user didn't set it on the command line
6045
6046if test -z "$ARFLAGS"
6047then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006048 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049fi
6050
doko@ubuntu.com58844492012-06-30 18:25:32 +02006051if test -n "$ac_tool_prefix"; then
6052 for ac_prog in readelf
6053 do
6054 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6055set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_prog_READELF+:} false; then :
6059 $as_echo_n "(cached) " >&6
6060else
6061 if test -n "$READELF"; then
6062 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6063else
6064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067 IFS=$as_save_IFS
6068 test -z "$as_dir" && as_dir=.
6069 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006070 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006071 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6073 break 2
6074 fi
6075done
6076 done
6077IFS=$as_save_IFS
6078
6079fi
6080fi
6081READELF=$ac_cv_prog_READELF
6082if test -n "$READELF"; then
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6084$as_echo "$READELF" >&6; }
6085else
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087$as_echo "no" >&6; }
6088fi
6089
6090
6091 test -n "$READELF" && break
6092 done
6093fi
6094if test -z "$READELF"; then
6095 ac_ct_READELF=$READELF
6096 for ac_prog in readelf
6097do
6098 # Extract the first word of "$ac_prog", so it can be a program name with args.
6099set dummy $ac_prog; ac_word=$2
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6101$as_echo_n "checking for $ac_word... " >&6; }
6102if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6103 $as_echo_n "(cached) " >&6
6104else
6105 if test -n "$ac_ct_READELF"; then
6106 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6107else
6108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111 IFS=$as_save_IFS
6112 test -z "$as_dir" && as_dir=.
6113 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006115 ac_cv_prog_ac_ct_READELF="$ac_prog"
6116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117 break 2
6118 fi
6119done
6120 done
6121IFS=$as_save_IFS
6122
6123fi
6124fi
6125ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6126if test -n "$ac_ct_READELF"; then
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6128$as_echo "$ac_ct_READELF" >&6; }
6129else
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6131$as_echo "no" >&6; }
6132fi
6133
6134
6135 test -n "$ac_ct_READELF" && break
6136done
6137
6138 if test "x$ac_ct_READELF" = x; then
6139 READELF=":"
6140 else
6141 case $cross_compiling:$ac_tool_warned in
6142yes:)
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6145ac_tool_warned=yes ;;
6146esac
6147 READELF=$ac_ct_READELF
6148 fi
6149fi
6150
6151if test "$cross_compiling" = yes; then
6152 case "$READELF" in
6153 readelf|:)
6154 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6155 ;;
6156 esac
6157fi
6158
6159
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006162hp*|HP*)
6163 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164 if test -z "$INSTALL"
6165 then
6166 INSTALL="${srcdir}/install-sh -c"
6167 fi
6168esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169# Find a good install program. We prefer a C program (faster),
6170# so one script is as good as another. But avoid the broken or
6171# incompatible versions:
6172# SysV /etc/install, /usr/sbin/install
6173# SunOS /usr/etc/install
6174# IRIX /sbin/install
6175# AIX /bin/install
6176# AmigaOS /C/install, which installs bootblocks on floppy discs
6177# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6178# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6179# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6180# OS/2's system install, which has a completely different semantic
6181# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006182# Reject install programs that cannot install multiple files.
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6184$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006186if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188else
6189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192 IFS=$as_save_IFS
6193 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 # Account for people who put trailing slashes in PATH elements.
6195case $as_dir/ in #((
6196 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199 /usr/ucb/* ) ;;
6200 *)
6201 # OSF1 and SCO ODT 3.0 have their own names for install.
6202 # Don't use installbsd from OSF since it installs stuff as root
6203 # by default.
6204 for ac_prog in ginstall scoinst install; do
6205 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006206 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 if test $ac_prog = install &&
6208 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6209 # AIX install. It has an incompatible calling convention.
6210 :
6211 elif test $ac_prog = install &&
6212 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6213 # program-specific install script used by HP pwplus--don't use.
6214 :
6215 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 rm -rf conftest.one conftest.two conftest.dir
6217 echo one > conftest.one
6218 echo two > conftest.two
6219 mkdir conftest.dir
6220 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6221 test -s conftest.one && test -s conftest.two &&
6222 test -s conftest.dir/conftest.one &&
6223 test -s conftest.dir/conftest.two
6224 then
6225 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6226 break 3
6227 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 fi
6229 fi
6230 done
6231 done
6232 ;;
6233esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006234
6235 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236IFS=$as_save_IFS
6237
Matthias Kloseb9621712010-04-24 17:59:49 +00006238rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006239
6240fi
6241 if test "${ac_cv_path_install+set}" = set; then
6242 INSTALL=$ac_cv_path_install
6243 else
6244 # As a last resort, use the slow shell script. Don't cache a
6245 # value for INSTALL within a source directory, because that will
6246 # break other packages using the cache if that directory is
6247 # removed, or if the value is a relative name.
6248 INSTALL=$ac_install_sh
6249 fi
6250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6252$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253
6254# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6255# It thinks the first close brace ends the variable substitution.
6256test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6257
6258test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6259
6260test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6261
Matthias Klose93a0ef12012-03-15 18:08:34 +01006262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6263$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6264if test -z "$MKDIR_P"; then
6265 if ${ac_cv_path_mkdir+:} false; then :
6266 $as_echo_n "(cached) " >&6
6267else
6268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6269for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6270do
6271 IFS=$as_save_IFS
6272 test -z "$as_dir" && as_dir=.
6273 for ac_prog in mkdir gmkdir; do
6274 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006275 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006276 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6277 'mkdir (GNU coreutils) '* | \
6278 'mkdir (coreutils) '* | \
6279 'mkdir (fileutils) '4.1*)
6280 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6281 break 3;;
6282 esac
6283 done
6284 done
6285 done
6286IFS=$as_save_IFS
6287
6288fi
6289
6290 test -d ./--version && rmdir ./--version
6291 if test "${ac_cv_path_mkdir+set}" = set; then
6292 MKDIR_P="$ac_cv_path_mkdir -p"
6293 else
6294 # As a last resort, use the slow shell script. Don't cache a
6295 # value for MKDIR_P within a source directory, because that will
6296 # break other packages using the cache if that directory is
6297 # removed, or if the value is a relative name.
6298 MKDIR_P="$ac_install_sh -d"
6299 fi
6300fi
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6302$as_echo "$MKDIR_P" >&6; }
6303
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304
6305# Not every filesystem supports hard links
6306
6307if test -z "$LN" ; then
6308 case $ac_sys_system in
6309 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 *) LN=ln;;
6311 esac
6312fi
6313
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006314# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006315
6316ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6320$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321
6322# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006323if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324 withval=$with_pydebug;
6325if test "$withval" != no
6326then
6327
Matthias Kloseb9621712010-04-24 17:59:49 +00006328$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6331$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006333 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006334else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336fi
6337else
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340fi
6341
6342
T. Woutersddbfa2c2017-05-23 01:30:49 +02006343# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6344# the ABI. This allows enabling assertions without changing the ABI.
6345assertions='false'
6346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6347$as_echo_n "checking for --with-assertions... " >&6; }
6348
6349# Check whether --with-assertions was given.
6350if test "${with_assertions+set}" = set; then :
6351 withval=$with_assertions;
6352if test "$withval" != no
6353then
6354 assertions='true'
6355fi
6356fi
6357
6358if test "$assertions" = 'true'; then
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6360$as_echo "yes" >&6; }
6361elif test "$Py_DEBUG" = 'true'; then
6362 assertions='true'
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6364$as_echo "implied by --with-pydebug" >&6; }
6365else
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367$as_echo "no" >&6; }
6368fi
6369
Brett Cannon63d98bc2016-09-06 17:12:40 -07006370# Enable optimization flags
6371
6372
6373Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6375$as_echo_n "checking for --enable-optimizations... " >&6; }
6376# Check whether --enable-optimizations was given.
6377if test "${enable_optimizations+set}" = set; then :
6378 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006379if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006380then
6381 Py_OPT='true'
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6383$as_echo "yes" >&6; };
6384else
6385 Py_OPT='false'
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; };
6388fi
6389else
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; }
6392fi
6393
6394if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006395 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6396 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006397 # 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 +00006398 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006399 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006400 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006401 DEF_MAKE_RULE="build_all"
6402else
6403 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006404 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006405 DEF_MAKE_RULE="all"
6406fi
6407
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006408# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6410$as_echo_n "checking for --with-lto... " >&6; }
6411
6412# Check whether --with-lto was given.
6413if test "${with_lto+set}" = set; then :
6414 withval=$with_lto;
6415if test "$withval" != no
6416then
6417 Py_LTO='true'
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6419$as_echo "yes" >&6; };
6420else
6421 Py_LTO='false'
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; };
6424fi
6425else
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6427$as_echo "no" >&6; }
6428fi
6429
6430if test "$Py_LTO" = 'true' ; then
6431 case $CC in
6432 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006433 case $ac_sys_system in
6434 Darwin*)
6435 # Any changes made here should be reflected in the GCC+Darwin case below
6436 LTOFLAGS="-flto -Wl,-export_dynamic"
6437 ;;
6438 *)
6439 LTOFLAGS="-flto"
6440 ;;
6441 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006442 ;;
6443 *gcc*)
6444 case $ac_sys_system in
6445 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006446 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447 ;;
6448 *)
6449 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6450 ;;
6451 esac
6452 ;;
6453 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006454 CFLAGS="$CFLAGS $LTOFLAGS"
6455 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006456fi
6457
Brett Cannon7188a3e2015-09-18 15:13:44 -07006458# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006459
6460
6461
6462
6463
Gregory P. Smith799520c2016-09-07 16:10:00 -07006464# Make this work on systems where llvm tools are not installed with their
6465# normal names in the default $PATH (ie: Ubuntu). They exist under the
6466# non-suffixed name in their versioned llvm directory.
6467llvm_bin_dir=''
6468llvm_path="${PATH}"
6469if test "${CC}" = "clang"
6470then
6471 clang_bin=`which clang`
6472 # Some systems install clang elsewhere as a symlink to the real path
6473 # which is where the related llvm tools are located.
6474 if test -L "${clang_bin}"
6475 then
6476 clang_dir=`dirname "${clang_bin}"`
6477 clang_bin=`readlink "${clang_bin}"`
6478 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6479 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6480 fi
6481fi
Zachary Ware5af85642015-12-21 12:09:17 -06006482
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6484$as_echo_n "checking target system type... " >&6; }
6485if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006486 $as_echo_n "(cached) " >&6
6487else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006488 if test "x$target_alias" = x; then
6489 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006490else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006491 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6492 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6493fi
6494
6495fi
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6497$as_echo "$ac_cv_target" >&6; }
6498case $ac_cv_target in
6499*-*-*) ;;
6500*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6501esac
6502target=$ac_cv_target
6503ac_save_IFS=$IFS; IFS='-'
6504set x $ac_cv_target
6505shift
6506target_cpu=$1
6507target_vendor=$2
6508shift; shift
6509# Remember, the first character of IFS is used to create $*,
6510# except with old shells:
6511target_os=$*
6512IFS=$ac_save_IFS
6513case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6514
6515
6516# The aliases save the names the user supplied, while $host etc.
6517# will get canonicalized.
6518test -n "$target_alias" &&
6519 test "$program_prefix$program_suffix$program_transform_name" = \
6520 NONENONEs,x,x, &&
6521 program_prefix=${target_alias}-
6522# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6523set dummy $target_alias-llvm-profdata; ac_word=$2
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6525$as_echo_n "checking for $ac_word... " >&6; }
6526if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6527 $as_echo_n "(cached) " >&6
6528else
6529 case $LLVM_PROFDATA in
6530 [\\/]* | ?:[\\/]*)
6531 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6532 ;;
6533 *)
6534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6535for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006536do
6537 IFS=$as_save_IFS
6538 test -z "$as_dir" && as_dir=.
6539 for ac_exec_ext in '' $ac_executable_extensions; do
6540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006541 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6543 break 2
6544 fi
6545done
6546 done
6547IFS=$as_save_IFS
6548
Gregory P. Smith799520c2016-09-07 16:10:00 -07006549 ;;
6550esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006551fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006552LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6553if test -n "$LLVM_PROFDATA"; then
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6555$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006556else
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6558$as_echo "no" >&6; }
6559fi
6560
6561
Gregory P. Smith799520c2016-09-07 16:10:00 -07006562if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6563 if test "$build" = "$target"; then
6564 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6565 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6566set dummy llvm-profdata; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6570 $as_echo_n "(cached) " >&6
6571else
6572 case $ac_pt_LLVM_PROFDATA in
6573 [\\/]* | ?:[\\/]*)
6574 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6575 ;;
6576 *)
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in ${llvm_path}
6579do
6580 IFS=$as_save_IFS
6581 test -z "$as_dir" && as_dir=.
6582 for ac_exec_ext in '' $ac_executable_extensions; do
6583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586 break 2
6587 fi
6588done
6589 done
6590IFS=$as_save_IFS
6591
6592 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6593 ;;
6594esac
6595fi
6596ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6597if test -n "$ac_pt_LLVM_PROFDATA"; then
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6599$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6600else
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602$as_echo "no" >&6; }
6603fi
6604
6605 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6606 else
6607 LLVM_PROFDATA="''"
6608 fi
6609else
6610 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6611fi
6612
6613
6614if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6615then
6616 LLVM_PROF_FOUND="found"
6617else
6618 LLVM_PROF_FOUND="not-found"
6619fi
6620if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6621then
6622 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6623 if test -n "${found_llvm_profdata}"
6624 then
6625 # llvm-profdata isn't directly in $PATH in some cases.
6626 # https://apple.stackexchange.com/questions/197053/
6627 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6628 LLVM_PROF_FOUND=found
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6630$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6631 fi
6632fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006633LLVM_PROF_ERR=no
6634case $CC in
6635 *clang*)
6636 # Any changes made here should be reflected in the GCC+Darwin case below
6637 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6638 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006639 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6641 if test $LLVM_PROF_FOUND = not-found
6642 then
6643 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006644 if test "${REQUIRE_PGO}" = "yes"
6645 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006646 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 -07006647 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 fi
6649 ;;
6650 *gcc*)
6651 case $ac_sys_system in
6652 Darwin*)
6653 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6654 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006655 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006657 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006658 then
6659 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006660 if test "${REQUIRE_PGO}" = "yes"
6661 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006662 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 -07006663 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006664 fi
6665 ;;
6666 *)
6667 PGO_PROF_GEN_FLAG="-fprofile-generate"
6668 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6669 LLVM_PROF_MERGER="true"
6670 LLVM_PROF_FILE=""
6671 ;;
6672 esac
6673 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006674 *icc*)
6675 PGO_PROF_GEN_FLAG="-prof-gen"
6676 PGO_PROF_USE_FLAG="-prof-use"
6677 LLVM_PROF_MERGER="true"
6678 LLVM_PROF_FILE=""
6679 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006680esac
6681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6683# merged with this chunk of code?
6684
6685# Optimizer/debugger flags
6686# ------------------------
6687# (The following bit of code is complicated enough - please keep things
6688# indented properly. Just pretend you're editing Python code. ;-)
6689
6690# There are two parallel sets of case statements below, one that checks to
6691# see if OPT was set and one that does BASECFLAGS setting based upon
6692# compiler and platform. BASECFLAGS tweaks need to be made even if the
6693# user set OPT.
6694
6695# tweak OPT based on compiler and platform, only if the user didn't set
6696# it on the command line
6697
Victor Stinner9ed34a82017-05-02 22:35:58 +02006698
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006699if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700then
6701 case $GCC in
6702 yes)
6703 if test "$CC" != 'g++' ; then
6704 STRICT_PROTO="-Wstrict-prototypes"
6705 fi
6706 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6707 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6708 WRAP="-fwrapv"
6709 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006710
Stefan Krahaf04ff22011-12-08 22:20:31 +01006711 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006712 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006713 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006714 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006715 *)
6716 if $CC --version 2>&1 | grep -q clang
6717 then
6718 cc_is_clang=1
6719 else
6720 cc_is_clang=
6721 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006722 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006723
Victor Stinner35f3d242017-04-21 12:35:24 +02006724 if test -n "${cc_is_clang}"
6725 then
6726 # Clang also needs -fwrapv
6727 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006728 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6729 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006730 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006731 fi
6732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733 case $ac_cv_prog_cc_g in
6734 yes)
6735 if test "$Py_DEBUG" = 'true' ; then
6736 # Optimization messes up debuggers, so turn it off for
6737 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006738 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006739 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006740 else
Victor Stinner28205b22017-04-21 11:24:34 +02006741 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006742 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 else
Victor Stinner28205b22017-04-21 11:24:34 +02006744 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745 fi
6746 ;;
6747 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006748 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749 ;;
6750 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006751
Victor Stinner826f83f2017-04-28 15:07:10 +02006752 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754 case $ac_sys_system in
6755 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6756 ;;
6757 esac
6758 ;;
6759
6760 *)
6761 OPT="-O"
6762 ;;
6763 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764fi
6765
6766
6767
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769# The -arch flags for universal builds on OSX
6770UNIVERSAL_ARCH_FLAGS=
6771
6772
6773# tweak BASECFLAGS based on compiler and platform
6774case $GCC in
6775yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006776 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006777
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6779$as_echo_n "checking for -Wextra... " >&6; }
6780 ac_save_cc="$CC"
6781 CC="$CC -Wextra -Werror"
6782 if ${ac_cv_extra_warnings+:} false; then :
6783 $as_echo_n "(cached) " >&6
6784else
6785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6786/* end confdefs.h. */
6787
6788
6789int
6790main ()
6791{
6792
6793 ;
6794 return 0;
6795}
6796
6797_ACEOF
6798if ac_fn_c_try_compile "$LINENO"; then :
6799
6800 ac_cv_extra_warnings=yes
6801
6802else
6803
6804 ac_cv_extra_warnings=no
6805
6806fi
6807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6808fi
6809
6810 CC="$ac_save_cc"
6811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6812$as_echo "$ac_cv_extra_warnings" >&6; }
6813
6814 if test $ac_cv_extra_warnings = yes
6815 then
6816 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6817 fi
6818
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006819 # Python doesn't violate C99 aliasing rules, but older versions of
6820 # GCC produce warnings for legal Python code. Enable
6821 # -fno-strict-aliasing on versions of GCC that support but produce
6822 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6824$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825 ac_save_cc="$CC"
6826 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006827 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006828 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006833
Matthias Kloseb159a552010-04-25 21:00:44 +00006834
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006835int
6836main ()
6837{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006838
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006839 ;
6840 return 0;
6841}
Matthias Kloseb159a552010-04-25 21:00:44 +00006842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006844if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
6846 CC="$ac_save_cc -fstrict-aliasing"
6847 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006849/* end confdefs.h. */
6850
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006851 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006852int
6853main ()
6854{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006855double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856 ;
6857 return 0;
6858}
Matthias Kloseb159a552010-04-25 21:00:44 +00006859
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006861if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006862
6863 ac_cv_no_strict_aliasing=no
6864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865else
Matthias Kloseb159a552010-04-25 21:00:44 +00006866
6867 ac_cv_no_strict_aliasing=yes
6868
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006869fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006871
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006872else
Matthias Kloseb159a552010-04-25 21:00:44 +00006873
6874 ac_cv_no_strict_aliasing=no
6875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006878fi
6879
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006880 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6883$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006884 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 then
6886 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6887 fi
6888
Zachary Ware5af85642015-12-21 12:09:17 -06006889 # ICC doesn't recognize the option, but only emits a warning
6890 ## XXX does it emit an unused result warning and can it be disabled?
6891 case "$CC" in
6892 *icc*)
6893 ac_cv_disable_unused_result_warning=no
6894 ;;
6895 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6897$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6898 ac_save_cc="$CC"
6899 CC="$CC -Wunused-result -Werror"
6900 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006901 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006902 $as_echo_n "(cached) " >&6
6903else
6904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6905/* end confdefs.h. */
6906
6907
6908int
6909main ()
6910{
6911
6912 ;
6913 return 0;
6914}
6915
6916_ACEOF
6917if ac_fn_c_try_compile "$LINENO"; then :
6918
6919 ac_cv_disable_unused_result_warning=yes
6920
6921else
6922
6923 ac_cv_disable_unused_result_warning=no
6924
6925fi
6926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6927fi
6928
6929 CFLAGS="$save_CFLAGS"
6930 CC="$ac_save_cc"
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6932$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006933 ;;
6934 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006935
6936 if test $ac_cv_disable_unused_result_warning = yes
6937 then
6938 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006939 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6940 fi
6941
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6943$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6944 ac_save_cc="$CC"
6945 CC="$CC -Wunused-parameter -Werror"
6946 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6947 $as_echo_n "(cached) " >&6
6948else
6949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6950/* end confdefs.h. */
6951
6952
6953int
6954main ()
6955{
6956
6957 ;
6958 return 0;
6959}
6960
6961_ACEOF
6962if ac_fn_c_try_compile "$LINENO"; then :
6963
6964 ac_cv_disable_unused_parameter_warning=yes
6965
6966else
6967
6968 ac_cv_disable_unused_parameter_warning=no
6969
6970fi
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6972fi
6973
6974 CC="$ac_save_cc"
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6976$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6977
6978 if test $ac_cv_disable_unused_parameter_warning = yes
6979 then
6980 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6981 fi
6982
6983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6984$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6985 ac_save_cc="$CC"
6986 CC="$CC -Wmissing-field-initializers -Werror"
6987 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6988 $as_echo_n "(cached) " >&6
6989else
6990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6991/* end confdefs.h. */
6992
6993
6994int
6995main ()
6996{
6997
6998 ;
6999 return 0;
7000}
7001
7002_ACEOF
7003if ac_fn_c_try_compile "$LINENO"; then :
7004
7005 ac_cv_disable_missing_field_initializers=yes
7006
7007else
7008
7009 ac_cv_disable_missing_field_initializers=no
7010
7011fi
7012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7013fi
7014
7015 CC="$ac_save_cc"
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7017$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7018
7019 if test $ac_cv_disable_missing_field_initializers = yes
7020 then
7021 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007022 fi
7023
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7025$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7026 ac_save_cc="$CC"
7027 CC="$CC -Wsign-compare"
7028 save_CFLAGS="$CFLAGS"
7029 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7030 $as_echo_n "(cached) " >&6
7031else
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033/* end confdefs.h. */
7034
7035
7036int
7037main ()
7038{
7039
7040 ;
7041 return 0;
7042}
7043
7044_ACEOF
7045if ac_fn_c_try_compile "$LINENO"; then :
7046
7047 ac_cv_enable_sign_compare_warning=yes
7048
7049else
7050
7051 ac_cv_enable_sign_compare_warning=no
7052
7053fi
7054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7055fi
7056
7057 CFLAGS="$save_CFLAGS"
7058 CC="$ac_save_cc"
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7060$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7061
7062 if test $ac_cv_enable_sign_compare_warning = yes
7063 then
7064 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7065 fi
7066
7067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7068$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7069 ac_save_cc="$CC"
7070 CC="$CC -Wunreachable-code"
7071 save_CFLAGS="$CFLAGS"
7072 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7073 $as_echo_n "(cached) " >&6
7074else
7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7076/* end confdefs.h. */
7077
7078
7079int
7080main ()
7081{
7082
7083 ;
7084 return 0;
7085}
7086
7087_ACEOF
7088if ac_fn_c_try_compile "$LINENO"; then :
7089
7090 ac_cv_enable_unreachable_code_warning=yes
7091
7092else
7093
7094 ac_cv_enable_unreachable_code_warning=no
7095
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098fi
7099
7100 CFLAGS="$save_CFLAGS"
7101 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007102
7103 # Don't enable unreachable code warning in debug mode, since it usually
7104 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007105 # Issue #24324: Unfortunately, the unreachable code warning does not work
7106 # correctly on gcc and has been silently removed from the compiler.
7107 # It is supported on clang but on OS X systems gcc may be an alias
7108 # for clang. Try to determine if the compiler is not really gcc and,
7109 # if so, only then enable the warning.
7110 if test $ac_cv_enable_unreachable_code_warning = yes && \
7111 test "$Py_DEBUG" != "true" && \
7112 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007113 then
7114 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007115 else
7116 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007117 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7119$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007120
Victor Stinner193ee0a2017-02-06 14:24:00 +01007121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7122$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7123 ac_save_cc="$CC"
7124 CC="$CC -Werror=implicit-function-declaration"
7125 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7126 $as_echo_n "(cached) " >&6
7127else
7128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7129/* end confdefs.h. */
7130
7131
7132int
7133main ()
7134{
7135
7136 ;
7137 return 0;
7138}
7139
7140_ACEOF
7141if ac_fn_c_try_compile "$LINENO"; then :
7142
7143 ac_cv_enable_implicit_function_declaration_error=yes
7144
7145else
7146
7147 ac_cv_enable_implicit_function_declaration_error=no
7148
7149fi
7150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7151fi
7152
7153 CC="$ac_save_cc"
7154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7155$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7156
7157 if test $ac_cv_enable_implicit_function_declaration_error = yes
7158 then
7159 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7160 fi
7161
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007162 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7163 # support. Without this, treatment of subnormals doesn't follow
7164 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007165 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166 alpha*)
7167 BASECFLAGS="$BASECFLAGS -mieee"
7168 ;;
7169 esac
7170
7171 case $ac_sys_system in
7172 SCO_SV*)
7173 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7174 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007175
7176 # is there any other compiler on Darwin besides gcc?
7177 Darwin*)
7178 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7179 # used to be here, but non-Apple gcc doesn't accept them.
7180 if test "${CC}" = gcc
7181 then
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007183$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007184 case "${UNIVERSALSDK}" in
7185 */MacOSX10.4u.sdk)
7186 # Build using 10.4 SDK, force usage of gcc when the
7187 # compiler is gcc, otherwise the user will get very
7188 # confusing error messages when building on OSX 10.6
7189 CC=gcc-4.0
7190 CPP=cpp-4.0
7191 ;;
7192 esac
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007194$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007195 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007196
Ned Deily87adb6e2013-10-18 21:09:56 -07007197 if test "${enable_universalsdk}"
7198 then
7199 case "$UNIVERSAL_ARCHS" in
7200 32-bit)
7201 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7202 LIPO_32BIT_FLAGS=""
7203 ARCH_RUN_32BIT=""
7204 ;;
7205 64-bit)
7206 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7207 LIPO_32BIT_FLAGS=""
7208 ARCH_RUN_32BIT="true"
7209 ;;
7210 all)
7211 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7212 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7213 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7214 ;;
7215 intel)
7216 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7217 LIPO_32BIT_FLAGS="-extract i386"
7218 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7219 ;;
7220 intel-32)
7221 UNIVERSAL_ARCH_FLAGS="-arch i386"
7222 LIPO_32BIT_FLAGS=""
7223 ARCH_RUN_32BIT=""
7224 ;;
7225 3-way)
7226 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7227 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7228 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7229 ;;
7230 *)
7231 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7232 ;;
7233 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234
Ned Deily87adb6e2013-10-18 21:09:56 -07007235 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7236 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7237 if test "${UNIVERSALSDK}" != "/"
7238 then
7239 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7240 fi
7241 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242
Ned Deily87adb6e2013-10-18 21:09:56 -07007243 # Calculate an appropriate deployment target for this build:
7244 # The deployment target value is used explicitly to enable certain
7245 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007246 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007247 # component of the string returned by distutils.get_platform().
7248 #
7249 # Use the value from:
7250 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7251 # 2. the operating system version of the build machine if >= 10.6
7252 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7253 # below to pick either 10.3, 10.4, or 10.5 as the target.
7254 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255
Ned Deily87adb6e2013-10-18 21:09:56 -07007256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7257$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007258 cur_target_major=`sw_vers -productVersion | \
7259 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7260 cur_target_minor=`sw_vers -productVersion | \
7261 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7262 cur_target="${cur_target_major}.${cur_target_minor}"
7263 if test ${cur_target_major} -eq 10 && \
7264 test ${cur_target_minor} -ge 3 && \
7265 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007266 then
Ned Deily36820b62014-06-25 13:44:22 -07007267 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007268 cur_target=10.3
7269 if test ${enable_universalsdk}
7270 then
7271 case "$UNIVERSAL_ARCHS" in
7272 all|3-way|intel|64-bit)
7273 # These configurations were first supported in 10.5
7274 cur_target='10.5'
7275 ;;
7276 esac
7277 else
7278 if test `/usr/bin/arch` = "i386"
7279 then
7280 # 10.4 was the first release to support Intel archs
7281 cur_target="10.4"
7282 fi
7283 fi
7284 fi
7285 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007286
Ned Deily87adb6e2013-10-18 21:09:56 -07007287 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7288 # environment with a value that is the same as what we'll use
7289 # in the Makefile to ensure that we'll get the same compiler
7290 # environment during configure and build time.
7291 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7292 export MACOSX_DEPLOYMENT_TARGET
7293 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7295$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007296
Ned Deily87adb6e2013-10-18 21:09:56 -07007297 # end of Darwin* tests
7298 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299 esac
7300 ;;
7301
7302*)
7303 case $ac_sys_system in
7304 OpenUNIX*|UnixWare*)
7305 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7306 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007307 SCO_SV*)
7308 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7309 ;;
7310 esac
7311 ;;
7312esac
7313
Zachary Ware5af85642015-12-21 12:09:17 -06007314# ICC needs -fp-model strict or floats behave badly
7315case "$CC" in
7316*icc*)
7317 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7318 ;;
7319esac
7320
T. Woutersddbfa2c2017-05-23 01:30:49 +02007321if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322 :
7323else
7324 OPT="-DNDEBUG $OPT"
7325fi
7326
7327if test "$ac_arch_flags"
7328then
7329 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7330fi
7331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007332# On some compilers, pthreads are available without further options
7333# (e.g. MacOS X). On some of these systems, the compiler will not
7334# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7335# So we have to see first whether pthreads are available without
7336# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7338$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007339if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343 ac_cv_pthread_is_default=no
7344else
Matthias Kloseb9621712010-04-24 17:59:49 +00007345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346/* end confdefs.h. */
7347
Stefan Krah7dba5942012-11-22 22:49:11 +01007348#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349#include <pthread.h>
7350
7351void* routine(void* p){return NULL;}
7352
7353int main(){
7354 pthread_t p;
7355 if(pthread_create(&p,NULL,routine,NULL)!=0)
7356 return 1;
7357 (void)pthread_detach(p);
7358 return 0;
7359}
7360
7361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007362if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363
7364 ac_cv_pthread_is_default=yes
7365 ac_cv_kthread=no
7366 ac_cv_pthread=no
7367
7368else
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007373fi
7374
7375
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376fi
7377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7379$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380
7381
7382if test $ac_cv_pthread_is_default = yes
7383then
7384 ac_cv_kpthread=no
7385else
7386# -Kpthread, if available, provides the right #defines
7387# and linker options to make pthread_create available
7388# Some compilers won't report that they do not support -Kpthread,
7389# so we need to run a program to see whether it really made the
7390# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7392$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007393if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395else
7396 ac_save_cc="$CC"
7397CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007398if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399 ac_cv_kpthread=no
7400else
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402/* end confdefs.h. */
7403
Stefan Krah7dba5942012-11-22 22:49:11 +01007404#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405#include <pthread.h>
7406
7407void* routine(void* p){return NULL;}
7408
7409int main(){
7410 pthread_t p;
7411 if(pthread_create(&p,NULL,routine,NULL)!=0)
7412 return 1;
7413 (void)pthread_detach(p);
7414 return 0;
7415}
7416
7417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007418if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 ac_cv_kpthread=yes
7420else
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7424 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425fi
7426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427CC="$ac_save_cc"
7428fi
7429
Matthias Kloseb9621712010-04-24 17:59:49 +00007430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7431$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432fi
7433
7434if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7435then
7436# -Kthread, if available, provides the right #defines
7437# and linker options to make pthread_create available
7438# Some compilers won't report that they do not support -Kthread,
7439# so we need to run a program to see whether it really made the
7440# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7442$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007443if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445else
7446 ac_save_cc="$CC"
7447CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007448if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449 ac_cv_kthread=no
7450else
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452/* end confdefs.h. */
7453
Stefan Krah7dba5942012-11-22 22:49:11 +01007454#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455#include <pthread.h>
7456
7457void* routine(void* p){return NULL;}
7458
7459int main(){
7460 pthread_t p;
7461 if(pthread_create(&p,NULL,routine,NULL)!=0)
7462 return 1;
7463 (void)pthread_detach(p);
7464 return 0;
7465}
7466
7467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007468if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469 ac_cv_kthread=yes
7470else
Matthias Kloseb9621712010-04-24 17:59:49 +00007471 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7474 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475fi
7476
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477CC="$ac_save_cc"
7478fi
7479
Matthias Kloseb9621712010-04-24 17:59:49 +00007480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7481$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482fi
7483
7484if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7485then
7486# -pthread, if available, provides the right #defines
7487# and linker options to make pthread_create available
7488# Some compilers won't report that they do not support -pthread,
7489# so we need to run a program to see whether it really made the
7490# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7492$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007493if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495else
7496 ac_save_cc="$CC"
7497CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007498if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 ac_cv_pthread=no
7500else
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502/* end confdefs.h. */
7503
Stefan Krah7dba5942012-11-22 22:49:11 +01007504#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505#include <pthread.h>
7506
7507void* routine(void* p){return NULL;}
7508
7509int main(){
7510 pthread_t p;
7511 if(pthread_create(&p,NULL,routine,NULL)!=0)
7512 return 1;
7513 (void)pthread_detach(p);
7514 return 0;
7515}
7516
7517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007518if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519 ac_cv_pthread=yes
7520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7524 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525fi
7526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527CC="$ac_save_cc"
7528fi
7529
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7531$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532fi
7533
7534# If we have set a CC compiler flag for thread support then
7535# check if it works for CXX, too.
7536ac_cv_cxx_thread=no
7537if test ! -z "$CXX"
7538then
Matthias Kloseb9621712010-04-24 17:59:49 +00007539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7540$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541ac_save_cxx="$CXX"
7542
7543if test "$ac_cv_kpthread" = "yes"
7544then
7545 CXX="$CXX -Kpthread"
7546 ac_cv_cxx_thread=yes
7547elif test "$ac_cv_kthread" = "yes"
7548then
7549 CXX="$CXX -Kthread"
7550 ac_cv_cxx_thread=yes
7551elif test "$ac_cv_pthread" = "yes"
7552then
7553 CXX="$CXX -pthread"
7554 ac_cv_cxx_thread=yes
7555fi
7556
7557if test $ac_cv_cxx_thread = yes
7558then
7559 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7560 $CXX -c conftest.$ac_ext 2>&5
7561 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7562 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7563 then
7564 ac_cv_cxx_thread=yes
7565 else
7566 ac_cv_cxx_thread=no
7567 fi
7568 rm -fr conftest*
7569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7571$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572fi
7573CXX="$ac_save_cxx"
7574
7575
7576# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7578$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007579if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581else
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583/* end confdefs.h. */
7584#include <stdlib.h>
7585#include <stdarg.h>
7586#include <string.h>
7587#include <float.h>
7588
7589int
7590main ()
7591{
7592
7593 ;
7594 return 0;
7595}
7596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007597if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598 ac_cv_header_stdc=yes
7599else
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7603
7604if test $ac_cv_header_stdc = yes; then
7605 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607/* end confdefs.h. */
7608#include <string.h>
7609
7610_ACEOF
7611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 $EGREP "memchr" >/dev/null 2>&1; then :
7613
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614else
7615 ac_cv_header_stdc=no
7616fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007617rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618
7619fi
7620
7621if test $ac_cv_header_stdc = yes; then
7622 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624/* end confdefs.h. */
7625#include <stdlib.h>
7626
7627_ACEOF
7628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 $EGREP "free" >/dev/null 2>&1; then :
7630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631else
7632 ac_cv_header_stdc=no
7633fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007634rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635
7636fi
7637
7638if test $ac_cv_header_stdc = yes; then
7639 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641 :
7642else
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644/* end confdefs.h. */
7645#include <ctype.h>
7646#include <stdlib.h>
7647#if ((' ' & 0x0FF) == 0x020)
7648# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7649# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7650#else
7651# define ISLOWER(c) \
7652 (('a' <= (c) && (c) <= 'i') \
7653 || ('j' <= (c) && (c) <= 'r') \
7654 || ('s' <= (c) && (c) <= 'z'))
7655# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7656#endif
7657
7658#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7659int
7660main ()
7661{
7662 int i;
7663 for (i = 0; i < 256; i++)
7664 if (XOR (islower (i), ISLOWER (i))
7665 || toupper (i) != TOUPPER (i))
7666 return 2;
7667 return 0;
7668}
7669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007670if ac_fn_c_try_run "$LINENO"; then :
7671
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007672else
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007677fi
7678
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
7680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7682$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683if test $ac_cv_header_stdc = yes; then
7684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686
7687fi
7688
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007689for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007690fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007691ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007692sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007693unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007694poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007695sys/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 +01007696sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007697sys/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 +01007698sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007699sys/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 -07007700libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007701linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007702sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007703do :
7704 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7705ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007706if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007708#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007709_ACEOF
7710
7711fi
7712
Guido van Rossum627b2d71993-12-24 10:39:16 +00007713done
7714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007715ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007716for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7719$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007720if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007724/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007725#include <sys/types.h>
7726#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007727
Martin v. Löwis11437992002-04-12 09:54:03 +00007728int
7729main ()
7730{
7731if ((DIR *) 0)
7732return 0;
7733 ;
7734 return 0;
7735}
7736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007739else
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744eval ac_res=\$$as_ac_Header
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7746$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007748 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007749#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007750_ACEOF
7751
7752ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007754
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755done
7756# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7757if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7759$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007760if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762else
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767/* Override any GCC internal prototype to avoid an error.
7768 Use char because int might match the return type of a GCC
7769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007770#ifdef __cplusplus
7771extern "C"
7772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007773char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007774int
7775main ()
7776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ;
7779 return 0;
7780}
7781_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782for ac_lib in '' dir; do
7783 if test -z "$ac_lib"; then
7784 ac_res="none required"
7785 else
7786 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007787 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007792rm -f core conftest.err conftest.$ac_objext \
7793 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007794 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797done
Victor Stinnere0be4232011-10-25 13:06:09 +02007798if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800else
7801 ac_cv_search_opendir=no
7802fi
7803rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007804LIBS=$ac_func_search_save_LIBS
7805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7807$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007809if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007811
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007813
Michael W. Hudson54241132001-12-07 15:38:26 +00007814else
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7816$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007817if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007819else
7820 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824/* Override any GCC internal prototype to avoid an error.
7825 Use char because int might match the return type of a GCC
7826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827#ifdef __cplusplus
7828extern "C"
7829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007830char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007831int
7832main ()
7833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 ;
7836 return 0;
7837}
7838_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839for ac_lib in '' x; do
7840 if test -z "$ac_lib"; then
7841 ac_res="none required"
7842 else
7843 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007844 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849rm -f core conftest.err conftest.$ac_objext \
7850 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007851 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854done
Victor Stinnere0be4232011-10-25 13:06:09 +02007855if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857else
7858 ac_cv_search_opendir=no
7859fi
7860rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007861LIBS=$ac_func_search_save_LIBS
7862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7864$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007866if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007869fi
7870
7871fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7874$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007875if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007880#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007881int
7882main ()
7883{
7884return makedev(0, 0);
7885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007890 ac_cv_header_sys_types_h_makedev=yes
7891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894rm -f core conftest.err conftest.$ac_objext \
7895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007896
7897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7899$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007900
7901if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007902ac_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 +02007903if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007904
Matthias Kloseb9621712010-04-24 17:59:49 +00007905$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007906
7907fi
7908
7909
7910
7911 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 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 +02007913if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007914
Matthias Kloseb9621712010-04-24 17:59:49 +00007915$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007916
7917fi
7918
7919
7920 fi
7921fi
7922
Michael W. Hudson54241132001-12-07 15:38:26 +00007923
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007924# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7925# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7926SAVE_CFLAGS=$CFLAGS
7927CFLAGS="-std=c99 $CFLAGS"
7928for ac_header in bluetooth/bluetooth.h
7929do :
7930 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7931if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7932 cat >>confdefs.h <<_ACEOF
7933#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7934_ACEOF
7935
7936fi
7937
7938done
7939
7940CFLAGS=$SAVE_CFLAGS
7941
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007942# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7943for ac_header in net/if.h
7944do :
7945 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7946#ifdef STDC_HEADERS
7947# include <stdlib.h>
7948# include <stddef.h>
7949#else
7950# ifdef HAVE_STDLIB_H
7951# include <stdlib.h>
7952# endif
7953#endif
7954#ifdef HAVE_SYS_SOCKET_H
7955# include <sys/socket.h>
7956#endif
7957
7958"
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007960 cat >>confdefs.h <<_ACEOF
7961#define HAVE_NET_IF_H 1
7962_ACEOF
7963
7964fi
7965
7966done
7967
7968
Martin v. Löwis11017b12006-01-14 18:12:57 +00007969# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007970for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007971do :
7972 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 +00007973#ifdef HAVE_ASM_TYPES_H
7974#include <asm/types.h>
7975#endif
7976#ifdef HAVE_SYS_SOCKET_H
7977#include <sys/socket.h>
7978#endif
7979
Matthias Kloseb9621712010-04-24 17:59:49 +00007980"
Victor Stinnere0be4232011-10-25 13:06:09 +02007981if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007982 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007983#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007984_ACEOF
7985
7986fi
7987
7988done
7989
7990
caaveryeffc12f2017-09-06 18:18:10 -04007991for ac_header in linux/vm_sockets.h
7992do :
7993 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7994#ifdef HAVE_SYS_SOCKET_H
7995#include <sys/socket.h>
7996#endif
7997
7998"
7999if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8000 cat >>confdefs.h <<_ACEOF
8001#define HAVE_LINUX_VM_SOCKETS_H 1
8002_ACEOF
8003
8004fi
8005
8006done
8007
8008
Charles-François Natali47413c12011-10-06 19:47:44 +02008009# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008010for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008011do :
8012 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8013ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8014#ifdef HAVE_SYS_SOCKET_H
8015#include <sys/socket.h>
8016#endif
8017
8018"
8019if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8020 cat >>confdefs.h <<_ACEOF
8021#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8022_ACEOF
8023
8024fi
8025
8026done
8027
8028
Guido van Rossum627b2d71993-12-24 10:39:16 +00008029# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008030was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8032$as_echo_n "checking for clock_t in time.h... " >&6; }
8033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008036
8037_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008040 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008041else
Martin v. Löwis11437992002-04-12 09:54:03 +00008042
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008045
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008046
Guido van Rossum627b2d71993-12-24 10:39:16 +00008047fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008048rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008049
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8051$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8054$as_echo_n "checking for makedev... " >&6; }
8055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008056/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008057
Jesus Cea740f53a2010-04-28 11:35:30 +00008058#if defined(MAJOR_IN_MKDEV)
8059#include <sys/mkdev.h>
8060#elif defined(MAJOR_IN_SYSMACROS)
8061#include <sys/sysmacros.h>
8062#else
8063#include <sys/types.h>
8064#endif
8065
Neal Norwitz11690112002-07-30 01:08:28 +00008066int
8067main ()
8068{
Jesus Cea740f53a2010-04-28 11:35:30 +00008069
8070 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008071 ;
8072 return 0;
8073}
Matthias Kloseb159a552010-04-25 21:00:44 +00008074
Neal Norwitz11690112002-07-30 01:08:28 +00008075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008076if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008077 ac_cv_has_makedev=yes
8078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008081rm -f core conftest.err conftest.$ac_objext \
8082 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8084$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008085if test "$ac_cv_has_makedev" = "yes"; then
8086
Matthias Kloseb9621712010-04-24 17:59:49 +00008087$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008088
8089fi
8090
Christian Heimes985ecdc2013-11-20 11:46:18 +01008091# byte swapping
8092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8093$as_echo_n "checking for le64toh... " >&6; }
8094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8095/* end confdefs.h. */
8096
8097#ifdef HAVE_ENDIAN_H
8098#include <endian.h>
8099#elif defined(HAVE_SYS_ENDIAN_H)
8100#include <sys/endian.h>
8101#endif
8102
8103int
8104main ()
8105{
8106
8107 le64toh(1)
8108 ;
8109 return 0;
8110}
8111
8112_ACEOF
8113if ac_fn_c_try_link "$LINENO"; then :
8114 ac_cv_has_le64toh=yes
8115else
8116 ac_cv_has_le64toh=no
8117fi
8118rm -f core conftest.err conftest.$ac_objext \
8119 conftest$ac_exeext conftest.$ac_ext
8120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8121$as_echo "$ac_cv_has_le64toh" >&6; }
8122if test "$ac_cv_has_le64toh" = "yes"; then
8123
8124$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8125
8126fi
8127
Martin v. Löwis399a6892002-10-04 10:22:02 +00008128use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008129# Don't use largefile support for GNU/Hurd
8130case $ac_sys_system in GNU*)
8131 use_lfs=no
8132esac
8133
Martin v. Löwis399a6892002-10-04 10:22:02 +00008134if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008135# Two defines needed to enable largefile support on various platforms
8136# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008137case $ac_sys_system/$ac_sys_release in
8138AIX*)
8139
8140$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8141
8142 ;;
8143esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
8147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008149
Martin v. Löwis399a6892002-10-04 10:22:02 +00008150fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008151
Guido van Rossum84e7b241996-08-19 21:59:00 +00008152# Add some code to confdefs.h so that the test for off_t works on SCO
8153cat >> confdefs.h <<\EOF
8154#if defined(SCO_DS)
8155#undef _OFF_T
8156#endif
8157EOF
8158
Guido van Rossumef2255b2000-03-10 22:30:29 +00008159# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008160ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008161if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008163else
Martin v. Löwis11437992002-04-12 09:54:03 +00008164
8165cat >>confdefs.h <<_ACEOF
8166#define mode_t int
8167_ACEOF
8168
8169fi
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008174else
Martin v. Löwis11437992002-04-12 09:54:03 +00008175
8176cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008178_ACEOF
8179
8180fi
8181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008183if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008185else
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187cat >>confdefs.h <<_ACEOF
8188#define pid_t int
8189_ACEOF
8190
8191fi
8192
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008193
Martin v. Löwis11437992002-04-12 09:54:03 +00008194cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008195#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008196_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008199if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008201else
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008205_ACEOF
8206
8207fi
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8210$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008211if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008215/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008216#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008217
8218_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008221 ac_cv_type_uid_t=yes
8222else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223 ac_cv_type_uid_t=no
8224fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008225rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8229$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008230if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
8234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236
8237fi
8238
Mark Dickinson983bc162012-12-02 12:11:38 +00008239
Matthias Kloseb9621712010-04-24 17:59:49 +00008240ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008241if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242
Matthias Kloseb9621712010-04-24 17:59:49 +00008243$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008244
8245fi
8246
Stefan Krah1919b7e2012-03-21 18:25:23 +01008247ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8248if test "x$ac_cv_type___uint128_t" = xyes; then :
8249
8250$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8251
8252fi
8253
Jack Jansendd19cf82001-12-06 22:36:17 +00008254
Michael W. Hudson54241132001-12-07 15:38:26 +00008255# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008256# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257# The cast to long int works around a bug in the HP C Compiler
8258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8260# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8262$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008263if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008265else
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 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 +00008267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268else
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 if test "$ac_cv_type_int" = yes; then
8270 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008272as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008273See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 else
8275 ac_cv_sizeof_int=0
8276 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8281$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282
8283
8284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008286#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008287_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008288
8289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290# The cast to long int works around a bug in the HP C Compiler
8291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8293# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8295$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008296if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008298else
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 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 +00008300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 if test "$ac_cv_type_long" = yes; then
8303 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008305as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008306See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307 else
8308 ac_cv_sizeof_long=0
8309 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8314$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315
8316
8317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008319#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008320_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321
8322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323# The cast to long int works around a bug in the HP C Compiler
8324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8326# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8328$as_echo_n "checking size of long long... " >&6; }
8329if ${ac_cv_sizeof_long_long+:} false; then :
8330 $as_echo_n "(cached) " >&6
8331else
8332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8333
8334else
8335 if test "$ac_cv_type_long_long" = yes; then
8336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8338as_fn_error 77 "cannot compute sizeof (long long)
8339See \`config.log' for more details" "$LINENO" 5; }
8340 else
8341 ac_cv_sizeof_long_long=0
8342 fi
8343fi
8344
8345fi
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8347$as_echo "$ac_cv_sizeof_long_long" >&6; }
8348
8349
8350
8351cat >>confdefs.h <<_ACEOF
8352#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8353_ACEOF
8354
8355
8356# The cast to long int works around a bug in the HP C Compiler
8357# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8358# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8359# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8361$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008362if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008364else
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 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 +00008366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 if test "$ac_cv_type_void_p" = yes; then
8369 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8370$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008371as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008372See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373 else
8374 ac_cv_sizeof_void_p=0
8375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008377
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8380$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381
8382
8383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008385#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008386_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008387
8388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389# The cast to long int works around a bug in the HP C Compiler
8390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8392# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8394$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008395if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008397else
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 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 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 if test "$ac_cv_type_short" = yes; then
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008405See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406 else
8407 ac_cv_sizeof_short=0
8408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8413$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414
8415
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008418#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008419_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008420
8421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422# The cast to long int works around a bug in the HP C Compiler
8423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8425# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8427$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008428if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008430else
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 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 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433else
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 if test "$ac_cv_type_float" = yes; then
8435 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008437as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008438See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439 else
8440 ac_cv_sizeof_float=0
8441 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008443
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8446$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447
8448
8449
Martin v. Löwis11437992002-04-12 09:54:03 +00008450cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008451#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008452_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008453
8454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455# The cast to long int works around a bug in the HP C Compiler
8456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8458# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8460$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008463else
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 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 +00008465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466else
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 if test "$ac_cv_type_double" = yes; then
8468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008470as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008471See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472 else
8473 ac_cv_sizeof_double=0
8474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8479$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480
8481
8482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008484#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008486
8487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8493$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 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 +00008498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 if test "$ac_cv_type_fpos_t" = yes; then
8501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008503as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008504See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 else
8506 ac_cv_sizeof_fpos_t=0
8507 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8512$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514
8515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008517#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008518_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008519
Michael W. Hudson54241132001-12-07 15:38:26 +00008520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521# The cast to long int works around a bug in the HP C Compiler
8522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8524# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8526$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008527if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 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 +00008531
Martin v. Löwis18e16552006-02-15 17:27:45 +00008532else
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 if test "$ac_cv_type_size_t" = yes; then
8534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008536as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008537See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538 else
8539 ac_cv_sizeof_size_t=0
8540 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542
Martin v. Löwis18e16552006-02-15 17:27:45 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8545$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546
8547
8548
Martin v. Löwis18e16552006-02-15 17:27:45 +00008549cat >>confdefs.h <<_ACEOF
8550#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8551_ACEOF
8552
8553
Christian Heimes400adb02008-02-01 08:12:03 +00008554# The cast to long int works around a bug in the HP C Compiler
8555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8557# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8559$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008560if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 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 +00008564
Christian Heimes400adb02008-02-01 08:12:03 +00008565else
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 if test "$ac_cv_type_pid_t" = yes; then
8567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008569as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008570See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008571 else
8572 ac_cv_sizeof_pid_t=0
8573 fi
8574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575
Christian Heimes400adb02008-02-01 08:12:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8578$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008579
8580
8581
8582cat >>confdefs.h <<_ACEOF
8583#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8584_ACEOF
8585
8586
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008587# The cast to long int works around a bug in the HP C Compiler
8588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8590# This bug is HP SR number 8606223364.
8591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8592$as_echo_n "checking size of uintptr_t... " >&6; }
8593if ${ac_cv_sizeof_uintptr_t+:} false; then :
8594 $as_echo_n "(cached) " >&6
8595else
8596 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8597
8598else
8599 if test "$ac_cv_type_uintptr_t" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8602as_fn_error 77 "cannot compute sizeof (uintptr_t)
8603See \`config.log' for more details" "$LINENO" 5; }
8604 else
8605 ac_cv_sizeof_uintptr_t=0
8606 fi
8607fi
8608
8609fi
8610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8611$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8612
8613
8614
8615cat >>confdefs.h <<_ACEOF
8616#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8617_ACEOF
8618
8619
Michael W. Hudson54241132001-12-07 15:38:26 +00008620
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8622$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008623have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008625/* end confdefs.h. */
8626
8627int
8628main ()
8629{
8630long double x; x = (long double)0;
8631 ;
8632 return 0;
8633}
8634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008635if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008636
8637
Matthias Kloseb9621712010-04-24 17:59:49 +00008638$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008639
8640 have_long_double=yes
8641
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008642fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8645$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008646if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647# The cast to long int works around a bug in the HP C Compiler
8648# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8649# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8650# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8652$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008653if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008655else
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 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 +00008657
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008658else
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 if test "$ac_cv_type_long_double" = yes; then
8660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008662as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008663See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008664 else
8665 ac_cv_sizeof_long_double=0
8666 fi
8667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8671$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008672
8673
8674
8675cat >>confdefs.h <<_ACEOF
8676#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8677_ACEOF
8678
8679
8680fi
8681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682# The cast to long int works around a bug in the HP C Compiler
8683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8685# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8687$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008688if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008690else
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 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 +00008692
Thomas Woutersb2137042007-02-01 18:02:27 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 if test "$ac_cv_type__Bool" = yes; then
8695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008697as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008698See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699 else
8700 ac_cv_sizeof__Bool=0
8701 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703
Thomas Woutersb2137042007-02-01 18:02:27 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8706$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707
8708
8709
Thomas Woutersb2137042007-02-01 18:02:27 +00008710cat >>confdefs.h <<_ACEOF
8711#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8712_ACEOF
8713
8714
Thomas Woutersb2137042007-02-01 18:02:27 +00008715
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716# The cast to long int works around a bug in the HP C Compiler
8717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8721$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008722if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008723 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008724else
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008726#ifdef HAVE_SYS_TYPES_H
8727#include <sys/types.h>
8728#endif
8729
Matthias Kloseb9621712010-04-24 17:59:49 +00008730"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 if test "$ac_cv_type_off_t" = yes; then
8734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008736as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008737See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008738 else
8739 ac_cv_sizeof_off_t=0
8740 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8745$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008746
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008747
8748
Martin v. Löwis11437992002-04-12 09:54:03 +00008749cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008750#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008751_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752
Michael W. Hudson54241132001-12-07 15:38:26 +00008753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8756$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008757if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008758 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8763$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008767fi
8768
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008769# The cast to long int works around a bug in the HP C Compiler
8770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8774$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008777else
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779#ifdef HAVE_SYS_TYPES_H
8780#include <sys/types.h>
8781#endif
8782#ifdef HAVE_TIME_H
8783#include <time.h>
8784#endif
8785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008787
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 if test "$ac_cv_type_time_t" = yes; then
8790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008792as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008793See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008794 else
8795 ac_cv_sizeof_time_t=0
8796 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008798
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8801$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008802
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803
8804
Martin v. Löwis11437992002-04-12 09:54:03 +00008805cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008806#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008807_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008808
Michael W. Hudson54241132001-12-07 15:38:26 +00008809
8810
Trent Mick635f6fb2000-08-23 21:33:05 +00008811# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008812ac_save_cc="$CC"
8813if test "$ac_cv_kpthread" = "yes"
8814then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008815elif test "$ac_cv_kthread" = "yes"
8816then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817elif test "$ac_cv_pthread" = "yes"
8818then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008819fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8822$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008823have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008826
8827 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008828int
8829main ()
8830{
Guido van Rossum12580492000-09-24 16:47:19 +00008831pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ;
8833 return 0;
8834}
Matthias Kloseb159a552010-04-25 21:00:44 +00008835
Martin v. Löwis11437992002-04-12 09:54:03 +00008836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008837if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008838 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8842$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008843if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8849$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008850if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854#ifdef HAVE_PTHREAD_H
8855#include <pthread.h>
8856#endif
8857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 if test "$ac_cv_type_pthread_t" = yes; then
8862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008864as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008865See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866 else
8867 ac_cv_sizeof_pthread_t=0
8868 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008870
Trent Mick635f6fb2000-08-23 21:33:05 +00008871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8873$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008875
8876
Martin v. Löwis11437992002-04-12 09:54:03 +00008877cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008878#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008879_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008880
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881
Trent Mick635f6fb2000-08-23 21:33:05 +00008882fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008883
8884# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8885# This checking will be unnecessary after removing deprecated TLS API.
8886# The cast to long int works around a bug in the HP C Compiler
8887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8889# This bug is HP SR number 8606223364.
8890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8891$as_echo_n "checking size of pthread_key_t... " >&6; }
8892if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8893 $as_echo_n "(cached) " >&6
8894else
8895 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8896"; then :
8897
8898else
8899 if test "$ac_cv_type_pthread_key_t" = yes; then
8900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8902as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8903See \`config.log' for more details" "$LINENO" 5; }
8904 else
8905 ac_cv_sizeof_pthread_key_t=0
8906 fi
8907fi
8908
8909fi
8910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8911$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8912
8913
8914
8915cat >>confdefs.h <<_ACEOF
8916#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8917_ACEOF
8918
8919
8920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8921$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8922if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8924/* end confdefs.h. */
8925#include <pthread.h>
8926int
8927main ()
8928{
8929pthread_key_t k; k * 1;
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934if ac_fn_c_try_compile "$LINENO"; then :
8935 ac_pthread_key_t_is_arithmetic_type=yes
8936else
8937 ac_pthread_key_t_is_arithmetic_type=no
8938
8939fi
8940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8942$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8943 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8944
8945$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8946
8947 fi
8948else
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8950$as_echo "no" >&6; }
8951fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008952CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008953
Michael W. Hudson54241132001-12-07 15:38:26 +00008954
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008955case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008956 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008957 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8958 ;;
8959 Darwin/*)
8960 OTHER_LIBTOOL_OPT=""
8961 ;;
8962esac
8963
8964
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008965
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008966case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008967 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008968 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8969 if test "${enable_universalsdk}"; then
8970 :
8971 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008972 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008973 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008974 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008975 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008976 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008977 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008978 if test ${gcc_version} '<' 4.0
8979 then
8980 LIBTOOL_CRUFT="-lcc_dynamic"
8981 else
8982 LIBTOOL_CRUFT=""
8983 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008985 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008986else
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008988/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008989
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990 #include <unistd.h>
8991 int main(int argc, char*argv[])
8992 {
8993 if (sizeof(long) == 4) {
8994 return 0;
8995 } else {
8996 return 1;
8997 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008998 }
8999
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009001if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009002 ac_osx_32bit=yes
9003else
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009008fi
9009
9010
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009011 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009012 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013 i386)
9014 MACOSX_DEFAULT_ARCH="i386"
9015 ;;
9016 ppc)
9017 MACOSX_DEFAULT_ARCH="ppc"
9018 ;;
9019 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009020 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021 ;;
9022 esac
9023 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009024 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009025 i386)
9026 MACOSX_DEFAULT_ARCH="x86_64"
9027 ;;
9028 ppc)
9029 MACOSX_DEFAULT_ARCH="ppc64"
9030 ;;
9031 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009032 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009033 ;;
9034 esac
9035
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036 fi
9037
9038 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009039 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009040 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009041esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9043$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009044if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009045then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009046 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009048 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009049
Matthias Kloseb9621712010-04-24 17:59:49 +00009050$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9053$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009054 if test $enable_shared = "yes"
9055 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009056 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 +00009057 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9060$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009061fi
9062
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9064$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009065case $ac_sys_system/$ac_sys_release in
9066 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9071$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009072 ;;
9073 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009076 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009077esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009078
Guido van Rossum0a516c91994-09-12 10:58:40 +00009079# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009080
Michael W. Hudson54241132001-12-07 15:38:26 +00009081
9082
9083
9084
Benjamin Peterson99f03762010-04-11 22:15:28 +00009085
Thomas Wouters477c8d52006-05-27 19:21:47 +00009086
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009087# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9088# -- usually .so, .sl on HP-UX, .dll on Cygwin
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9090$as_echo_n "checking the extension of shared libraries... " >&6; }
9091if test -z "$SHLIB_SUFFIX"; then
9092 case $ac_sys_system in
9093 hp*|HP*)
9094 case `uname -m` in
9095 ia64) SHLIB_SUFFIX=.so;;
9096 *) SHLIB_SUFFIX=.sl;;
9097 esac
9098 ;;
9099 CYGWIN*) SHLIB_SUFFIX=.dll;;
9100 *) SHLIB_SUFFIX=.so;;
9101 esac
9102fi
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9104$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009105
Guido van Rossum0a516c91994-09-12 10:58:40 +00009106# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009107# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009108# (Shared libraries in this instance are shared modules to be loaded into
9109# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9111$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009112if test -z "$LDSHARED"
9113then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009114 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009115 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009116 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009117 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009118 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009120 if test "$GCC" = "yes" ; then
9121 LDSHARED='$(CC) -shared'
9122 LDCXXSHARED='$(CXX) -shared'
9123 else
9124 LDSHARED='$(CC) -G'
9125 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009126 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009127 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009128 if test "$GCC" = "yes" ; then
9129 LDSHARED='$(CC) -shared'
9130 LDCXXSHARED='$(CXX) -shared'
9131 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009132 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009133 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009134 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009135 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009136 LDSHARED='$(CC) -bundle'
9137 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009138 if test "$enable_framework" ; then
9139 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009140 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9141 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009142 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009143 else
9144 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009145 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009146 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009147 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009148 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009149 LDSHARED='$(CC) -bundle'
9150 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009151 if test "$enable_framework" ; then
9152 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009153 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9154 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009155 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009156 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009157 # No framework, use the Python app as bundle-loader
9158 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009159 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009160 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009161 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009162 Darwin/*)
9163 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9164 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009165
Ned Deily36820b62014-06-25 13:44:22 -07009166 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9167 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9168 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9169 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9170 if test ${dep_target_major} -eq 10 && \
9171 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009172 then
Ned Deily36820b62014-06-25 13:44:22 -07009173 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009174 LDSHARED='$(CC) -bundle'
9175 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009176 if test "$enable_framework" ; then
9177 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009178 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9179 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009180 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 else
9182 # No framework, use the Python app as bundle-loader
9183 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9184 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009185 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009186 fi
Ned Deily36820b62014-06-25 13:44:22 -07009187 else
9188 # building for OS X 10.3 and later
9189 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9190 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9191 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009192 fi
9193 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009194 Linux*|GNU*|QNX*)
9195 LDSHARED='$(CC) -shared'
9196 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009197 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009198 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009199 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009200 LDSHARED='$(CC) -shared'
9201 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009202 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009203 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009204 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009205 OpenBSD*)
9206 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9207 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009208 LDSHARED='$(CC) -shared $(CCSHARED)'
9209 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009210 else
9211 case `uname -r` in
9212 [01].* | 2.[0-7] | 2.[0-7].*)
9213 LDSHARED="ld -Bshareable ${LDFLAGS}"
9214 ;;
9215 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009216 LDSHARED='$(CC) -shared $(CCSHARED)'
9217 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009218 ;;
9219 esac
9220 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009221 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009222 LDSHARED='$(CC) -shared'
9223 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009224 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009225 if test "$GCC" = "yes" ; then
9226 LDSHARED='$(CC) -shared'
9227 LDCXXSHARED='$(CXX) -shared'
9228 else
9229 LDSHARED='$(CC) -G'
9230 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009231 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232 SCO_SV*)
9233 LDSHARED='$(CC) -Wl,-G,-Bexport'
9234 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9235 CYGWIN*)
9236 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9237 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238 *) LDSHARED="ld";;
9239 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9242$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009243LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009244BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009246# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9248$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249if test -z "$CCSHARED"
9250then
Guido van Rossum07397971997-04-29 21:49:50 +00009251 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009252 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009253 then CCSHARED="-fPIC";
9254 elif test `uname -p` = sparc;
9255 then CCSHARED="-xcode=pic32";
9256 else CCSHARED="-Kpic";
9257 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009258 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009259 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009260 else CCSHARED="+z";
9261 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009262 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009263 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009264 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009265 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009266 if test "$GCC" = "yes"
9267 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009268 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009269 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009270 SCO_SV*)
9271 if test "$GCC" = "yes"
9272 then CCSHARED="-fPIC"
9273 else CCSHARED="-Kpic -belf"
9274 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009275 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9278$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009279# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009280# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9282$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009283if test -z "$LINKFORSHARED"
9284then
Guido van Rossum07397971997-04-29 21:49:50 +00009285 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009286 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009287 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009288 LINKFORSHARED="-Wl,-E -Wl,+s";;
9289# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009290 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009291 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009292 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009294 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009295
9296 # Issue #18075: the default maximum stack size (8MBytes) is too
9297 # small for the default recursion limit. Increase the stack size
9298 # to ensure that tests don't crash
9299 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9300
Jack Jansene578a632001-08-15 01:27:14 +00009301 if test "$enable_framework"
9302 then
Jack Jansenda49e192005-01-07 13:08:22 +00009303 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009304 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009305 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009306 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009307 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009308 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009309 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009310 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9311 then
9312 LINKFORSHARED="-Wl,--export-dynamic"
9313 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009314 SunOS/5*) case $CC in
9315 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009316 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009317 then
9318 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009319 fi;;
9320 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009321 CYGWIN*)
9322 if test $enable_shared = "no"
9323 then
9324 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9325 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009326 QNX*)
9327 # -Wl,-E causes the symbols to be added to the dynamic
9328 # symbol table so that they can be found when a module
9329 # is loaded. -N 2048K causes the stack size to be set
9330 # to 2048 kilobytes so that the stack doesn't overflow
9331 # when running test_compile.py.
9332 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9336$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337
Michael W. Hudson54241132001-12-07 15:38:26 +00009338
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9341$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009342if test ! "$LIBRARY" = "$LDLIBRARY"
9343then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009344 case $ac_sys_system in
9345 CYGWIN*)
9346 # Cygwin needs CCSHARED when building extension DLLs
9347 # but not when building the interpreter DLL.
9348 CFLAGSFORSHARED='';;
9349 *)
9350 CFLAGSFORSHARED='$(CCSHARED)'
9351 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9354$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009355
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009356# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9357# library (with --enable-shared).
9358# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009359# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9360# if it is not required, since it creates a dependency of the shared library
9361# to LIBS. This, in turn, means that applications linking the shared libpython
9362# don't need to link LIBS explicitly. The default should be only changed
9363# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9366$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009367case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009368 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009369 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009370esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9372$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009373
9374
Guido van Rossum627b2d71993-12-24 10:39:16 +00009375# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9377$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009378if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009379 $as_echo_n "(cached) " >&6
9380else
9381 ac_check_lib_save_LIBS=$LIBS
9382LIBS="-lsendfile $LIBS"
9383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9384/* end confdefs.h. */
9385
9386/* Override any GCC internal prototype to avoid an error.
9387 Use char because int might match the return type of a GCC
9388 builtin and then its argument prototype would still apply. */
9389#ifdef __cplusplus
9390extern "C"
9391#endif
9392char sendfile ();
9393int
9394main ()
9395{
9396return sendfile ();
9397 ;
9398 return 0;
9399}
9400_ACEOF
9401if ac_fn_c_try_link "$LINENO"; then :
9402 ac_cv_lib_sendfile_sendfile=yes
9403else
9404 ac_cv_lib_sendfile_sendfile=no
9405fi
9406rm -f core conftest.err conftest.$ac_objext \
9407 conftest$ac_exeext conftest.$ac_ext
9408LIBS=$ac_check_lib_save_LIBS
9409fi
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9411$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009412if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009413 cat >>confdefs.h <<_ACEOF
9414#define HAVE_LIBSENDFILE 1
9415_ACEOF
9416
9417 LIBS="-lsendfile $LIBS"
9418
9419fi
9420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9422$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009423if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009425else
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009427LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431/* Override any GCC internal prototype to avoid an error.
9432 Use char because int might match the return type of a GCC
9433 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009434#ifdef __cplusplus
9435extern "C"
9436#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009437char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009438int
9439main ()
9440{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ;
9443 return 0;
9444}
9445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009448else
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009451rm -f core conftest.err conftest.$ac_objext \
9452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009453LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9456$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009457if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 cat >>confdefs.h <<_ACEOF
9459#define HAVE_LIBDL 1
9460_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009462 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009463
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009464fi
9465 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9467$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009468if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009470else
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009472LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476/* Override any GCC internal prototype to avoid an error.
9477 Use char because int might match the return type of a GCC
9478 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009479#ifdef __cplusplus
9480extern "C"
9481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009482char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009483int
9484main ()
9485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 ;
9488 return 0;
9489}
9490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009491if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493else
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496rm -f core conftest.err conftest.$ac_objext \
9497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009498LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9501$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009502if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 cat >>confdefs.h <<_ACEOF
9504#define HAVE_LIBDLD 1
9505_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009506
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009507 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009509fi
9510 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009511
Michael Felt0d3ccb42017-12-30 22:39:20 +01009512# checks for uuid.h location
9513for ac_header in uuid/uuid.h uuid.h
9514do :
9515 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9516ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9517if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9518 cat >>confdefs.h <<_ACEOF
9519#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9520_ACEOF
9521
9522fi
9523
9524done
9525
9526
Berker Peksag9a10ff42017-11-08 23:09:16 +03009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9528$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530/* end confdefs.h. */
9531#include <uuid/uuid.h>
9532int
9533main ()
9534{
9535
9536#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009537void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009538#endif
9539
9540 ;
9541 return 0;
9542}
9543_ACEOF
9544if ac_fn_c_try_compile "$LINENO"; then :
9545
9546$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9547
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9549$as_echo "yes" >&6; }
9550else
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553
9554fi
9555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9556
Michael Felt0d3ccb42017-12-30 22:39:20 +01009557# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009558# FreeBSD and OpenBSD provides support as well
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9560$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9562/* end confdefs.h. */
9563#include <uuid.h>
9564int
9565main ()
9566{
9567
9568#ifndef uuid_create
9569void *x = uuid_create
9570#endif
9571
9572 ;
9573 return 0;
9574}
9575_ACEOF
9576if ac_fn_c_try_compile "$LINENO"; then :
9577
9578$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9579
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9581$as_echo "yes" >&6; }
9582else
9583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584$as_echo "no" >&6; }
9585
9586fi
9587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9588
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009589# 'Real Time' functions on Solaris
9590# posix4 on Solaris 2.6
9591# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009593$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009594if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009596else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009597 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601/* Override any GCC internal prototype to avoid an error.
9602 Use char because int might match the return type of a GCC
9603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604#ifdef __cplusplus
9605extern "C"
9606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009607char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608int
9609main ()
9610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ;
9613 return 0;
9614}
9615_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616for ac_lib in '' pthread rt posix4; do
9617 if test -z "$ac_lib"; then
9618 ac_res="none required"
9619 else
9620 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009621 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009626rm -f core conftest.err conftest.$ac_objext \
9627 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009628 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631done
Victor Stinnere0be4232011-10-25 13:06:09 +02009632if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634else
9635 ac_cv_search_sem_init=no
9636fi
9637rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009638LIBS=$ac_func_search_save_LIBS
9639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9641$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009643if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009645
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009646fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009647
Martin v. Löwis519adae2003-09-20 10:47:47 +00009648
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9651$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009652if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654else
9655 ac_check_lib_save_LIBS=$LIBS
9656LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009658/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660/* Override any GCC internal prototype to avoid an error.
9661 Use char because int might match the return type of a GCC
9662 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663#ifdef __cplusplus
9664extern "C"
9665#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009666char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667int
9668main ()
9669{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009671 ;
9672 return 0;
9673}
9674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676 ac_cv_lib_intl_textdomain=yes
9677else
Matthias Kloseb9621712010-04-24 17:59:49 +00009678 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009682LIBS=$ac_check_lib_save_LIBS
9683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9685$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009686if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009689
Brett Cannonc6d936e2009-06-07 20:09:53 +00009690 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009691fi
9692
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009693
9694# checks for system dependent C++ extensions support
9695case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9697$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009699/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009700
Georg Brandl59e87bd2011-02-15 19:48:59 +00009701 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009702int
9703main ()
9704{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009705loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ;
9707 return 0;
9708}
Matthias Kloseb159a552010-04-25 21:00:44 +00009709
Martin v. Löwis11437992002-04-12 09:54:03 +00009710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009711if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009712
Matthias Kloseb159a552010-04-25 21:00:44 +00009713
Matthias Kloseb9621712010-04-24 17:59:49 +00009714$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009715
Matthias Kloseb159a552010-04-25 21:00:44 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009717$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009718
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009719else
Matthias Kloseb159a552010-04-25 21:00:44 +00009720
9721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009722$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009723
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009725rm -f core conftest.err conftest.$ac_objext \
9726 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009727 *) ;;
9728esac
9729
Christian Heimes985ecdc2013-11-20 11:46:18 +01009730# check for systems that require aligned memory access
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9732$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009733if ${ac_cv_aligned_required+:} false; then :
9734 $as_echo_n "(cached) " >&6
9735else
9736 if test "$cross_compiling" = yes; then :
9737 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009738else
9739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740/* end confdefs.h. */
9741
9742int main()
9743{
9744 char s[16];
9745 int i, *p1, *p2;
9746 for (i=0; i < 16; i++)
9747 s[i] = i;
9748 p1 = (int*)(s+1);
9749 p2 = (int*)(s+2);
9750 if (*p1 == *p2)
9751 return 1;
9752 return 0;
9753}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009754_ACEOF
9755if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009756 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009757else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009758 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009759fi
9760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9761 conftest.$ac_objext conftest.beam conftest.$ac_ext
9762fi
9763
9764
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009765fi
9766
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9768$as_echo "$ac_cv_aligned_required" >&6; }
9769if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009770
9771$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9772
9773fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009774
9775# str, bytes and memoryview hash algorithm
9776
9777
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9779$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9780
9781# Check whether --with-hash_algorithm was given.
9782if test "${with_hash_algorithm+set}" = set; then :
9783 withval=$with_hash_algorithm;
9784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9785$as_echo "$withval" >&6; }
9786case "$withval" in
9787 siphash24)
9788 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9789
9790 ;;
9791 fnv)
9792 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9793
9794 ;;
9795 *)
9796 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9797 ;;
9798esac
9799
9800else
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9802$as_echo "default" >&6; }
9803fi
9804
9805
Charles-François Natalid30b0222014-05-08 23:08:51 +01009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9807$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9808
9809# Check whether --with-address_sanitizer was given.
9810if test "${with_address_sanitizer+set}" = set; then :
9811 withval=$with_address_sanitizer;
9812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9813$as_echo "$withval" >&6; }
9814BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9815LDFLAGS="-fsanitize=address $LDFLAGS"
9816
9817else
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9819$as_echo "no" >&6; }
9820fi
9821
9822
Guido van Rossum70c7f481998-03-26 18:44:10 +00009823# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9825$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009826if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009828else
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009830LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834/* Override any GCC internal prototype to avoid an error.
9835 Use char because int might match the return type of a GCC
9836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#ifdef __cplusplus
9838extern "C"
9839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009840char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009841int
9842main ()
9843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ;
9846 return 0;
9847}
9848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009851else
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854rm -f core conftest.err conftest.$ac_objext \
9855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009856LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9859$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009860if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009861 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009862fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009863 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9865$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009866if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009868else
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009870LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874/* Override any GCC internal prototype to avoid an error.
9875 Use char because int might match the return type of a GCC
9876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009877#ifdef __cplusplus
9878extern "C"
9879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009880char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009881int
9882main ()
9883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 ;
9886 return 0;
9887}
9888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009891else
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009894rm -f core conftest.err conftest.$ac_objext \
9895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009896LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9899$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009900if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009901 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009902fi
9903 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009904
Matthias Kloseb9621712010-04-24 17:59:49 +00009905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9906$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009908# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009909if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9912$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009913LIBS="$withval $LIBS"
9914
9915else
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918fi
9919
Guido van Rossum7f43da71994-08-01 12:15:30 +00009920
Victor Stinner8291b5e2015-03-20 16:03:14 +01009921
9922
9923
9924
9925
9926
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009927
Victor Stinner8291b5e2015-03-20 16:03:14 +01009928if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9929 if test -n "$ac_tool_prefix"; then
9930 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9931set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933$as_echo_n "checking for $ac_word... " >&6; }
9934if ${ac_cv_path_PKG_CONFIG+:} false; then :
9935 $as_echo_n "(cached) " >&6
9936else
9937 case $PKG_CONFIG in
9938 [\\/]* | ?:[\\/]*)
9939 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9940 ;;
9941 *)
9942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943for as_dir in $PATH
9944do
9945 IFS=$as_save_IFS
9946 test -z "$as_dir" && as_dir=.
9947 for ac_exec_ext in '' $ac_executable_extensions; do
9948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9949 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9951 break 2
9952 fi
9953done
9954 done
9955IFS=$as_save_IFS
9956
9957 ;;
9958esac
9959fi
9960PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9961if test -n "$PKG_CONFIG"; then
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9963$as_echo "$PKG_CONFIG" >&6; }
9964else
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966$as_echo "no" >&6; }
9967fi
9968
9969
9970fi
9971if test -z "$ac_cv_path_PKG_CONFIG"; then
9972 ac_pt_PKG_CONFIG=$PKG_CONFIG
9973 # Extract the first word of "pkg-config", so it can be a program name with args.
9974set dummy pkg-config; ac_word=$2
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9976$as_echo_n "checking for $ac_word... " >&6; }
9977if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9978 $as_echo_n "(cached) " >&6
9979else
9980 case $ac_pt_PKG_CONFIG in
9981 [\\/]* | ?:[\\/]*)
9982 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9983 ;;
9984 *)
9985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9986for as_dir in $PATH
9987do
9988 IFS=$as_save_IFS
9989 test -z "$as_dir" && as_dir=.
9990 for ac_exec_ext in '' $ac_executable_extensions; do
9991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9992 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9994 break 2
9995 fi
9996done
9997 done
9998IFS=$as_save_IFS
9999
10000 ;;
10001esac
10002fi
10003ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10004if test -n "$ac_pt_PKG_CONFIG"; then
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10006$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10007else
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
10010fi
10011
10012 if test "x$ac_pt_PKG_CONFIG" = x; then
10013 PKG_CONFIG=""
10014 else
10015 case $cross_compiling:$ac_tool_warned in
10016yes:)
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10019ac_tool_warned=yes ;;
10020esac
10021 PKG_CONFIG=$ac_pt_PKG_CONFIG
10022 fi
10023else
10024 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10025fi
10026
10027fi
10028if test -n "$PKG_CONFIG"; then
10029 _pkg_min_version=0.9.0
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10031$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10032 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10034$as_echo "yes" >&6; }
10035 else
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038 PKG_CONFIG=""
10039 fi
10040fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010041
10042# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10044$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010045
10046# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010048 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010049else
10050 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010051fi
10052
10053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10055$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056
10057# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10059$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010060
10061# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010062if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010063 withval=$with_system_ffi;
10064fi
10065
10066
Zachary Waref40d4dd2016-09-17 01:25:24 -050010067if test "$ac_sys_system" = "Darwin"
10068then
10069 case "$with_system_ffi" in
10070 "")
10071 with_system_ffi="no"
10072 ;;
10073 yes|no)
10074 ;;
10075 *)
10076 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10077 ;;
10078 esac
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10080$as_echo "$with_system_ffi" >&6; }
10081else
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10083$as_echo "yes" >&6; }
10084 if test "$with_system_ffi" != ""
10085 then
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10087$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10088 fi
10089 with_system_ffi="yes"
10090fi
Zachary Ware935043d2016-09-09 17:01:21 -070010091
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010092if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010093 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10094else
10095 LIBFFI_INCLUDEDIR=""
10096fi
10097
10098
Stefan Krah60187b52012-03-23 19:06:27 +010010099# Check for use of the system libmpdec library
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10101$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10102
10103# Check whether --with-system_libmpdec was given.
10104if test "${with_system_libmpdec+set}" = set; then :
10105 withval=$with_system_libmpdec;
10106else
10107 with_system_libmpdec="no"
10108fi
10109
10110
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10112$as_echo "$with_system_libmpdec" >&6; }
10113
Benjamin Peterson076ed002010-10-31 17:11:02 +000010114# Check for support for loadable sqlite extensions
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10116$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10117# Check whether --enable-loadable-sqlite-extensions was given.
10118if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10119 enableval=$enable_loadable_sqlite_extensions;
10120else
10121 enable_loadable_sqlite_extensions="no"
10122fi
10123
10124
10125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10126$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10127
Ned Deilyd819b932013-09-06 01:07:05 -070010128# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10129
10130
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10132$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10133
10134# Check whether --with-tcltk-includes was given.
10135if test "${with_tcltk_includes+set}" = set; then :
10136 withval=$with_tcltk_includes;
10137else
10138 with_tcltk_includes="default"
10139fi
10140
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10142$as_echo "$with_tcltk_includes" >&6; }
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10144$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10145
10146# Check whether --with-tcltk-libs was given.
10147if test "${with_tcltk_libs+set}" = set; then :
10148 withval=$with_tcltk_libs;
10149else
10150 with_tcltk_libs="default"
10151fi
10152
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10154$as_echo "$with_tcltk_libs" >&6; }
10155if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10156then
10157 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10158 then
10159 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10160 fi
10161 TCLTK_INCLUDES=""
10162 TCLTK_LIBS=""
10163else
10164 TCLTK_INCLUDES="$with_tcltk_includes"
10165 TCLTK_LIBS="$with_tcltk_libs"
10166fi
10167
Matthias Klose55708cc2009-04-30 08:06:49 +000010168# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10170$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010171
10172# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010173if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010174 withval=$with_dbmliborder;
10175if test x$with_dbmliborder = xyes
10176then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010177as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010178else
10179 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10180 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10181 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010182 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010183 fi
10184 done
10185fi
10186fi
10187
Matthias Kloseb9621712010-04-24 17:59:49 +000010188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10189$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191
Martin v. Löwis11437992002-04-12 09:54:03 +000010192
10193# Templates for things AC_DEFINEd more than once.
10194# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010195
10196
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010197if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010198then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010201
10202 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010203elif test "$ac_cv_kpthread" = "yes"
10204then
10205 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010206 if test "$ac_cv_cxx_thread" = "yes"; then
10207 CXX="$CXX -Kpthread"
10208 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010209 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010210elif test "$ac_cv_kthread" = "yes"
10211then
10212 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010213 if test "$ac_cv_cxx_thread" = "yes"; then
10214 CXX="$CXX -Kthread"
10215 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010216 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010217elif test "$ac_cv_pthread" = "yes"
10218then
10219 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010220 if test "$ac_cv_cxx_thread" = "yes"; then
10221 CXX="$CXX -pthread"
10222 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010223 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010224else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010225 if test ! -z "$withval" -a -d "$withval"
10226 then LDFLAGS="$LDFLAGS -L$withval"
10227 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010228
10229 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010230 # define _POSIX_THREADS in unistd.h. Some apparently don't
10231 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10233$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010235/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010236
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010237#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010238#ifdef _POSIX_THREADS
10239yes
10240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010241
10242_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010245 unistd_defines_pthreads=yes
10246else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247 unistd_defines_pthreads=no
10248fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010249rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10252$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010253
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010255
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010256 # Just looking for pthread_create in libpthread is not enough:
10257 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10258 # So we really have to include pthread.h, and then link.
10259 _libs=$LIBS
10260 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10262$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010264/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010265
10266#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010267#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010268
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010269void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010270int
10271main ()
10272{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010273
10274pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 ;
10276 return 0;
10277}
10278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010279if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010280
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10282$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010283 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010284
Guido van Rossum02a1c402000-02-25 19:26:31 +000010285else
Martin v. Löwis11437992002-04-12 09:54:03 +000010286
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010287 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010289if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010290
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010291 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010292
Guido van Rossumad678af1998-10-02 14:42:15 +000010293else
Guido van Rossumad678af1998-10-02 14:42:15 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10296$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010297if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010301LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305/* Override any GCC internal prototype to avoid an error.
10306 Use char because int might match the return type of a GCC
10307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308#ifdef __cplusplus
10309extern "C"
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010312int
10313main ()
10314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ;
10317 return 0;
10318}
10319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010322else
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010325rm -f core conftest.err conftest.$ac_objext \
10326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010327LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10330$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010331if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010332
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010333 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010334 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010335
Greg Steinadf63d62000-07-05 10:38:09 +000010336else
Greg Steinadf63d62000-07-05 10:38:09 +000010337
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10339$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010340if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010342else
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010344LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348/* Override any GCC internal prototype to avoid an error.
10349 Use char because int might match the return type of a GCC
10350 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010351#ifdef __cplusplus
10352extern "C"
10353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010354char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010355int
10356main ()
10357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010358return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 ;
10360 return 0;
10361}
10362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010363if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010365else
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010368rm -f core conftest.err conftest.$ac_objext \
10369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10373$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010374if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010377 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010378
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010379else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010380
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10382$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010383if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010387LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391/* Override any GCC internal prototype to avoid an error.
10392 Use char because int might match the return type of a GCC
10393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010397char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398int
10399main ()
10400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010408else
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411rm -f core conftest.err conftest.$ac_objext \
10412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010413LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10416$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010417if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010419 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010420 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010421
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010422else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010423
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10425$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010426if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010427 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010428else
Martin v. Löwis11437992002-04-12 09:54:03 +000010429 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010430LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434/* Override any GCC internal prototype to avoid an error.
10435 Use char because int might match the return type of a GCC
10436 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010437#ifdef __cplusplus
10438extern "C"
10439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010440char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010441int
10442main ()
10443{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ;
10446 return 0;
10447}
10448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010451else
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010454rm -f core conftest.err conftest.$ac_objext \
10455 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010456LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10459$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010460if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010462 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010463 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010464
Guido van Rossumb93a8621998-05-07 13:27:32 +000010465else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010466
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010467 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10468
Guido van Rossum2d38f911996-06-26 19:47:01 +000010469fi
10470
Guido van Rossum627b2d71993-12-24 10:39:16 +000010471
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010472fi
10473
Guido van Rossum0be3e491997-05-22 20:33:33 +000010474fi
10475
Guido van Rossum49545951997-12-02 19:28:29 +000010476fi
10477
Guido van Rossumb93a8621998-05-07 13:27:32 +000010478fi
10479
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10485$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010486if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010488else
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010490LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494/* Override any GCC internal prototype to avoid an error.
10495 Use char because int might match the return type of a GCC
10496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010497#ifdef __cplusplus
10498extern "C"
10499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010500char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010501int
10502main ()
10503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ;
10506 return 0;
10507}
10508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511else
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010514rm -f core conftest.err conftest.$ac_objext \
10515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010516LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10519$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010520if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010521
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010523
Guido van Rossum627b2d71993-12-24 10:39:16 +000010524fi
10525
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010526
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010527fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010528
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529if test "$posix_threads" = "yes"; then
10530 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010531
Matthias Kloseb9621712010-04-24 17:59:49 +000010532$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533
10534 fi
10535
10536 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10537 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010538 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010540
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541 ;;
10542 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010544
10545 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010546 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010547$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010548
10549 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010550 esac
10551
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10553$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010554 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010556else
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558 ac_cv_pthread_system_supported=no
10559else
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010561/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010562
10563 #include <stdio.h>
10564 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010565 void *foo(void *parm) {
10566 return NULL;
10567 }
10568 main() {
10569 pthread_attr_t attr;
10570 pthread_t id;
10571 if (pthread_attr_init(&attr)) exit(-1);
10572 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10573 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10574 exit(0);
10575 }
10576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010577if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010578 ac_cv_pthread_system_supported=yes
10579else
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010584fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586
Guido van Rossum627b2d71993-12-24 10:39:16 +000010587fi
10588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10590$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591 if test "$ac_cv_pthread_system_supported" = "yes"; then
10592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010594
10595 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 for ac_func in pthread_sigmask
10597do :
10598 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010601#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010603 case $ac_sys_system in
10604 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010607
10608 ;;
10609 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010610fi
10611done
10612
pdoxe14679c2017-10-05 00:01:56 -070010613 for ac_func in pthread_getcpuclockid
10614do :
10615 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10616if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10617 cat >>confdefs.h <<_ACEOF
10618#define HAVE_PTHREAD_GETCPUCLOCKID 1
10619_ACEOF
10620
10621fi
10622done
10623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624fi
10625
10626
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010627# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010628
Matthias Kloseb9621712010-04-24 17:59:49 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10630$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010632if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010634 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010637 ipv6=no
10638 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10640$as_echo "yes" >&6; }
10641 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642
10643 ipv6=yes
10644 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646else
Martin v. Löwis11437992002-04-12 09:54:03 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650 /* AF_INET6 available check */
10651#include <sys/types.h>
10652#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010653int
10654main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010656int domain = AF_INET6;
10657 ;
10658 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659}
Martin v. Löwis11437992002-04-12 09:54:03 +000010660_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010661if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010662
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10664$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010666
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667else
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010671 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010672
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010673fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010676if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10678$as_echo_n "checking if RFC2553 API is available... " >&6; }
10679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010680/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010681
10682 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010683#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010684int
10685main ()
10686{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010687struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010688 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 ;
10690 return 0;
10691}
Matthias Kloseb159a552010-04-25 21:00:44 +000010692
Martin v. Löwis11437992002-04-12 09:54:03 +000010693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010694if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010695
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010698 ipv6=yes
10699
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010700else
Matthias Kloseb159a552010-04-25 21:00:44 +000010701
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010704 ipv6=no
10705
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010708fi
10709
10710if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010712
10713fi
10714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715fi
10716
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010717
10718ipv6type=unknown
10719ipv6lib=none
10720ipv6trylibc=no
10721
10722if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10724$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010725 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10726 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727 case $i in
10728 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010730/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010731
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010732#include <netinet/in.h>
10733#ifdef IPV6_INRIA_VERSION
10734yes
10735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010736_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010739 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010740fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010741rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742
10743 ;;
10744 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748#include <netinet/in.h>
10749#ifdef __KAME__
10750yes
10751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010752_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755 ipv6type=$i;
10756 ipv6lib=inet6
10757 ipv6libdir=/usr/local/v6/lib
10758 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010760rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761
10762 ;;
10763 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010765/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767#include <features.h>
10768#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10769yes
10770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010771_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774 ipv6type=$i;
10775 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010777rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778
10779 ;;
10780 linux-inet6)
10781 if test -d /usr/inet6; then
10782 ipv6type=$i
10783 ipv6lib=inet6
10784 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010785 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786 fi
10787 ;;
10788 solaris)
10789 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010790 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791 ipv6type=$i
10792 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793 fi
10794 fi
10795 ;;
10796 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <sys/param.h>
10801#ifdef _TOSHIBA_INET6
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807 ipv6type=$i;
10808 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010809 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010811rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812
10813 ;;
10814 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818#include </usr/local/v6/include/sys/v6config.h>
10819#ifdef __V6D__
10820yes
10821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825 ipv6type=$i;
10826 ipv6lib=v6;
10827 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010828 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010830rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831
10832 ;;
10833 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010835/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837#include <sys/param.h>
10838#ifdef _ZETA_MINAMI_INET6
10839yes
10840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010841_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844 ipv6type=$i;
10845 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010846 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010848rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849
10850 ;;
10851 esac
10852 if test "$ipv6type" != "unknown"; then
10853 break
10854 fi
10855 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10857$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858fi
10859
10860if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10861 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10862 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10863 echo "using lib$ipv6lib"
10864 else
10865 if test $ipv6trylibc = "yes"; then
10866 echo "using libc"
10867 else
10868 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10869 echo "You need to fetch lib$ipv6lib.a from appropriate"
10870 echo 'ipv6 kit and compile beforehand.'
10871 exit 1
10872 fi
10873 fi
10874fi
10875
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10877$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10879/* end confdefs.h. */
10880 /* CAN_RAW_FD_FRAMES available check */
10881#include <linux/can/raw.h>
10882int
10883main ()
10884{
10885int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10886 ;
10887 return 0;
10888}
10889_ACEOF
10890if ac_fn_c_try_compile "$LINENO"; then :
10891
10892
10893$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10894
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10896$as_echo "yes" >&6; }
10897
10898else
10899
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902
10903fi
10904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10905
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010906# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10908$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010911if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912 withval=$with_doc_strings;
10913fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010914
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010915
10916if test -z "$with_doc_strings"
10917then with_doc_strings="yes"
10918fi
10919if test "$with_doc_strings" != "no"
10920then
10921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010923
10924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10926$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010927
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010928# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10930$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934 withval=$with_pymalloc;
10935fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010936
Neil Schemenauera35c6882001-02-27 04:45:05 +000010937
Neil Schemenauer16c22972002-03-22 15:34:49 +000010938if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010939then
10940 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010941fi
10942if test "$with_pymalloc" != "no"
10943then
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010946
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010947 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10950$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010951
Nick Coghlan6ea41862017-06-11 13:16:15 +100010952# Check for --with-c-locale-coercion
10953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10954$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10955
10956# Check whether --with-c-locale-coercion was given.
10957if test "${with_c_locale_coercion+set}" = set; then :
10958 withval=$with_c_locale_coercion;
10959fi
10960
10961
10962if test -z "$with_c_locale_coercion"
10963then
10964 with_c_locale_coercion="yes"
10965fi
10966if test "$with_c_locale_coercion" != "no"
10967then
10968
10969$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10970
10971fi
10972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10973$as_echo "$with_c_locale_coercion" >&6; }
10974
10975# Check for --with-c-locale-warning
10976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10977$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10978
10979# Check whether --with-c-locale-warning was given.
10980if test "${with_c_locale_warning+set}" = set; then :
10981 withval=$with_c_locale_warning;
10982fi
10983
10984
10985if test -z "$with_c_locale_warning"
10986then
10987 with_c_locale_warning="yes"
10988fi
10989if test "$with_c_locale_warning" != "no"
10990then
10991
10992$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10993
10994fi
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10996$as_echo "$with_c_locale_warning" >&6; }
10997
Benjamin Peterson05159c42009-12-03 03:01:27 +000010998# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11000$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011001
11002# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011003if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011004 withval=$with_valgrind;
11005else
11006 with_valgrind=no
11007fi
11008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11010$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011011if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 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 +020011013if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011016
11017else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011018 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011019
11020fi
11021
11022
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011023 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011024fi
11025
Łukasz Langaa785c872016-09-09 17:37:37 -070011026# Check for DTrace support
11027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11028$as_echo_n "checking for --with-dtrace... " >&6; }
11029
11030# Check whether --with-dtrace was given.
11031if test "${with_dtrace+set}" = set; then :
11032 withval=$with_dtrace;
11033else
11034 with_dtrace=no
11035fi
11036
11037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11038$as_echo "$with_dtrace" >&6; }
11039
11040
11041
11042
11043
11044DTRACE=
11045DFLAGS=
11046DTRACE_HEADERS=
11047DTRACE_OBJS=
11048
11049if test "$with_dtrace" = "yes"
11050then
11051 # Extract the first word of "dtrace", so it can be a program name with args.
11052set dummy dtrace; ac_word=$2
11053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11054$as_echo_n "checking for $ac_word... " >&6; }
11055if ${ac_cv_path_DTRACE+:} false; then :
11056 $as_echo_n "(cached) " >&6
11057else
11058 case $DTRACE in
11059 [\\/]* | ?:[\\/]*)
11060 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11061 ;;
11062 *)
11063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11064for as_dir in $PATH
11065do
11066 IFS=$as_save_IFS
11067 test -z "$as_dir" && as_dir=.
11068 for ac_exec_ext in '' $ac_executable_extensions; do
11069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11070 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11072 break 2
11073 fi
11074done
11075 done
11076IFS=$as_save_IFS
11077
11078 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11079 ;;
11080esac
11081fi
11082DTRACE=$ac_cv_path_DTRACE
11083if test -n "$DTRACE"; then
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11085$as_echo "$DTRACE" >&6; }
11086else
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088$as_echo "no" >&6; }
11089fi
11090
11091
11092 if test "$DTRACE" = "not found"; then
11093 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11094 fi
11095
11096$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11097
11098 DTRACE_HEADERS="Include/pydtrace_probes.h"
11099
11100 # On OS X, DTrace providers do not need to be explicitly compiled and
11101 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11102 # generation flag '-G'. We check for presence of this flag, rather than
11103 # hardcoding support by OS, in the interest of robustness.
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11105$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11106if ${ac_cv_dtrace_link+:} false; then :
11107 $as_echo_n "(cached) " >&6
11108else
11109 ac_cv_dtrace_link=no
11110 echo 'BEGIN' > conftest.d
11111 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11112 ac_cv_dtrace_link=yes
11113
11114fi
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11116$as_echo "$ac_cv_dtrace_link" >&6; }
11117 if test "$ac_cv_dtrace_link" = "yes"; then
11118 DTRACE_OBJS="Python/pydtrace.o"
11119 fi
11120fi
11121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011122# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011123
Guido van Rossum98935bf2001-09-05 19:13:16 +000011124DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011125
Guido van Rossume97ee181999-12-20 21:27:22 +000011126# the dlopen() function means we might want to use dynload_shlib.o. some
11127# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011128for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011129do :
11130 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011131if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011134_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011135
Guido van Rossume97ee181999-12-20 21:27:22 +000011136fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011137done
Guido van Rossume97ee181999-12-20 21:27:22 +000011138
Michael W. Hudson54241132001-12-07 15:38:26 +000011139
Guido van Rossume97ee181999-12-20 21:27:22 +000011140# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11141# loading of modules.
11142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11144$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011145if test -z "$DYNLOADFILE"
11146then
11147 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011148 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11149 if test "$ac_cv_func_dlopen" = yes
11150 then DYNLOADFILE="dynload_shlib.o"
11151 else DYNLOADFILE="dynload_aix.o"
11152 fi
11153 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011154 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011155 *)
11156 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11157 # out any dynamic loading
11158 if test "$ac_cv_func_dlopen" = yes
11159 then DYNLOADFILE="dynload_shlib.o"
11160 else DYNLOADFILE="dynload_stub.o"
11161 fi
11162 ;;
11163 esac
11164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11166$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011167if test "$DYNLOADFILE" != "dynload_stub.o"
11168then
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011171
11172fi
11173
Neil Schemenauer4e425612001-06-19 15:44:15 +000011174# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11175
Michael W. Hudson54241132001-12-07 15:38:26 +000011176
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11178$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011179if test -z "$MACHDEP_OBJS"
11180then
Jack Jansene578a632001-08-15 01:27:14 +000011181 MACHDEP_OBJS=$extra_machdep_objs
11182else
11183 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011184fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011185if test -z "$MACHDEP_OBJS"; then
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11187$as_echo "none" >&6; }
11188else
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11190$as_echo "$MACHDEP_OBJS" >&6; }
11191fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011192
Guido van Rossum627b2d71993-12-24 10:39:16 +000011193# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011194for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011195 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011196 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011197 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011198 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011199 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011200 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011201 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011202 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011203 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011204 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011205 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011206 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011207 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011208 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011209 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11210 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011211 sigaction sigaltstack siginterrupt sigpending sigrelse \
11212 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011213 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011214 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011215 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011216do :
11217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011222_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011223
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011224fi
11225done
11226
Michael W. Hudson54241132001-12-07 15:38:26 +000011227
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011228ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11229 #include <dirent.h>
11230"
11231if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11232
11233$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11234
11235fi
11236
11237
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011238# For some functions, having a definition is not sufficient, since
11239# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11241$as_echo_n "checking for chroot... " >&6; }
11242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011244#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011245int
11246main ()
11247{
11248void *x=chroot
11249 ;
11250 return 0;
11251}
11252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011256
Matthias Kloseb159a552010-04-25 21:00:44 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011259else
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262
11263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11266$as_echo_n "checking for link... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270int
11271main ()
11272{
11273void *x=link
11274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011287
11288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11291$as_echo_n "checking for symlink... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011294#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011295int
11296main ()
11297{
11298void *x=symlink
11299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011304
Matthias Kloseb9621712010-04-24 17:59:49 +000011305$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306
Matthias Kloseb159a552010-04-25 21:00:44 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011308$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309else
Matthias Kloseb9621712010-04-24 17:59:49 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312
11313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11316$as_echo_n "checking for fchdir... " >&6; }
11317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011318/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011319#include <unistd.h>
11320int
11321main ()
11322{
11323void *x=fchdir
11324 ;
11325 return 0;
11326}
11327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011329
Matthias Kloseb9621712010-04-24 17:59:49 +000011330$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011331
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011333$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337
11338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11341$as_echo_n "checking for fsync... " >&6; }
11342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011344#include <unistd.h>
11345int
11346main ()
11347{
11348void *x=fsync
11349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011354
Matthias Kloseb9621712010-04-24 17:59:49 +000011355$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011356
Matthias Kloseb159a552010-04-25 21:00:44 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011358$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011362
11363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11366$as_echo_n "checking for fdatasync... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011369#include <unistd.h>
11370int
11371main ()
11372{
11373void *x=fdatasync
11374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381
Matthias Kloseb159a552010-04-25 21:00:44 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011384else
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387
11388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11391$as_echo_n "checking for epoll... " >&6; }
11392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011393/* end confdefs.h. */
11394#include <sys/epoll.h>
11395int
11396main ()
11397{
11398void *x=epoll_create
11399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011406
Matthias Kloseb159a552010-04-25 21:00:44 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011409else
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011412
11413fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11416$as_echo_n "checking for epoll_create1... " >&6; }
11417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418/* end confdefs.h. */
11419#include <sys/epoll.h>
11420int
11421main ()
11422{
11423void *x=epoll_create1
11424 ;
11425 return 0;
11426}
11427_ACEOF
11428if ac_fn_c_try_compile "$LINENO"; then :
11429
11430$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11431
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11433$as_echo "yes" >&6; }
11434else
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
11437
11438fi
11439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11441$as_echo_n "checking for kqueue... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011443/* end confdefs.h. */
11444
11445#include <sys/types.h>
11446#include <sys/event.h>
11447
11448int
11449main ()
11450{
11451int x=kqueue()
11452 ;
11453 return 0;
11454}
11455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011459
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011465
11466fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11469$as_echo_n "checking for prlimit... " >&6; }
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h. */
11472
11473#include <sys/time.h>
11474#include <sys/resource.h>
11475
11476int
11477main ()
11478{
11479void *x=prlimit
11480 ;
11481 return 0;
11482}
11483_ACEOF
11484if ac_fn_c_try_compile "$LINENO"; then :
11485
11486$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11487
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11489$as_echo "yes" >&6; }
11490else
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
11493
11494fi
11495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11496
Martin v. Löwisd5843682002-11-21 20:41:28 +000011497# On some systems (eg. FreeBSD 5), we would find a definition of the
11498# functions ctermid_r, setgroups in the library, but no prototype
11499# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11500# address to avoid compiler warnings and potential miscompilations
11501# because of the missing prototypes.
11502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11504$as_echo_n "checking for ctermid_r... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011507
Martin v. Löwisd5843682002-11-21 20:41:28 +000011508#include <stdio.h>
11509
Martin v. Löwisd5843682002-11-21 20:41:28 +000011510int
11511main ()
11512{
11513void* p = ctermid_r
11514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011521
Matthias Kloseb159a552010-04-25 21:00:44 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011527
11528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11530
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11532$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011533if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011534 $as_echo_n "(cached) " >&6
11535else
11536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011537/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011538#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011539int
11540main ()
11541{
11542void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011543
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011544 ;
11545 return 0;
11546}
11547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011548if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011549 ac_cv_flock_decl=yes
11550else
11551 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011552
11553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011555
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011556fi
11557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11558$as_echo "$ac_cv_flock_decl" >&6; }
11559if test "x${ac_cv_flock_decl}" = xyes; then
11560 for ac_func in flock
11561do :
11562 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011563if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011564 cat >>confdefs.h <<_ACEOF
11565#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011566_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011567
Antoine Pitroua3000072010-09-07 14:52:42 +000011568else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011570$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011571if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011572 $as_echo_n "(cached) " >&6
11573else
11574 ac_check_lib_save_LIBS=$LIBS
11575LIBS="-lbsd $LIBS"
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577/* end confdefs.h. */
11578
11579/* Override any GCC internal prototype to avoid an error.
11580 Use char because int might match the return type of a GCC
11581 builtin and then its argument prototype would still apply. */
11582#ifdef __cplusplus
11583extern "C"
11584#endif
11585char flock ();
11586int
11587main ()
11588{
11589return flock ();
11590 ;
11591 return 0;
11592}
11593_ACEOF
11594if ac_fn_c_try_link "$LINENO"; then :
11595 ac_cv_lib_bsd_flock=yes
11596else
11597 ac_cv_lib_bsd_flock=no
11598fi
11599rm -f core conftest.err conftest.$ac_objext \
11600 conftest$ac_exeext conftest.$ac_ext
11601LIBS=$ac_check_lib_save_LIBS
11602fi
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11604$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011605if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011606 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011607
11608
11609$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11610
11611
11612fi
11613
11614
11615fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011616done
11617
Antoine Pitroua3000072010-09-07 14:52:42 +000011618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11621$as_echo_n "checking for getpagesize... " >&6; }
11622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011623/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011624
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011625#include <unistd.h>
11626
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011627int
11628main ()
11629{
11630void* p = getpagesize
11631 ;
11632 return 0;
11633}
11634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011635if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011638
Matthias Kloseb159a552010-04-25 21:00:44 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011641else
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11643$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011644
11645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011647
Victor Stinner984890f2011-11-24 13:53:38 +010011648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11649$as_echo_n "checking for broken unsetenv... " >&6; }
11650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11651/* end confdefs.h. */
11652
11653#include <stdlib.h>
11654
11655int
11656main ()
11657{
11658int res = unsetenv("DUMMY")
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_compile "$LINENO"; then :
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11665$as_echo "no" >&6; }
11666else
11667
11668$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11669
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11671$as_echo "yes" >&6; }
11672
11673fi
11674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11675
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011676for ac_prog in true
11677do
11678 # Extract the first word of "$ac_prog", so it can be a program name with args.
11679set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11681$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011682if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011684else
11685 if test -n "$TRUE"; then
11686 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11687else
11688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11689for as_dir in $PATH
11690do
11691 IFS=$as_save_IFS
11692 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011695 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 $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 +000011697 break 2
11698 fi
11699done
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011701IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011702
11703fi
11704fi
11705TRUE=$ac_cv_prog_TRUE
11706if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11708$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011709else
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011712fi
11713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011715 test -n "$TRUE" && break
11716done
11717test -n "$TRUE" || TRUE="/bin/true"
11718
11719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11721$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724else
11725 ac_check_lib_save_LIBS=$LIBS
11726LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011728/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011730/* Override any GCC internal prototype to avoid an error.
11731 Use char because int might match the return type of a GCC
11732 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011733#ifdef __cplusplus
11734extern "C"
11735#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737int
11738main ()
11739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011740return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011741 ;
11742 return 0;
11743}
11744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011746 ac_cv_lib_c_inet_aton=yes
11747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750rm -f core conftest.err conftest.$ac_objext \
11751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011752LIBS=$ac_check_lib_save_LIBS
11753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11755$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011756if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011757 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11760$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011763else
11764 ac_check_lib_save_LIBS=$LIBS
11765LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769/* Override any GCC internal prototype to avoid an error.
11770 Use char because int might match the return type of a GCC
11771 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772#ifdef __cplusplus
11773extern "C"
11774#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011775char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776int
11777main ()
11778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780 ;
11781 return 0;
11782}
11783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011785 ac_cv_lib_resolv_inet_aton=yes
11786else
Matthias Kloseb9621712010-04-24 17:59:49 +000011787 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011789rm -f core conftest.err conftest.$ac_objext \
11790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011791LIBS=$ac_check_lib_save_LIBS
11792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11794$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011795if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011796 cat >>confdefs.h <<_ACEOF
11797#define HAVE_LIBRESOLV 1
11798_ACEOF
11799
11800 LIBS="-lresolv $LIBS"
11801
11802fi
11803
11804
11805fi
11806
11807
Christian Heimesd0764e22007-12-04 15:00:33 +000011808# On Tru64, chflags seems to be present, but calling it will
11809# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11811$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011812if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011816 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011819/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011820
Christian Heimesd0764e22007-12-04 15:00:33 +000011821#include <sys/stat.h>
11822#include <unistd.h>
11823int main(int argc, char*argv[])
11824{
11825 if(chflags(argv[0], 0) != 0)
11826 return 1;
11827 return 0;
11828}
Ned Deily3eb67d52011-06-28 00:00:28 -070011829
Christian Heimesd0764e22007-12-04 15:00:33 +000011830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011832 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011838fi
11839
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11843$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011844if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011847 ac_cv_have_chflags="yes"
11848else
11849 ac_cv_have_chflags="no"
11850fi
11851
11852fi
11853if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011856
11857fi
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11860$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011861if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011865 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011868/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011869
Christian Heimesd0764e22007-12-04 15:00:33 +000011870#include <sys/stat.h>
11871#include <unistd.h>
11872int main(int argc, char*argv[])
11873{
11874 if(lchflags(argv[0], 0) != 0)
11875 return 1;
11876 return 0;
11877}
Ned Deily3eb67d52011-06-28 00:00:28 -070011878
Christian Heimesd0764e22007-12-04 15:00:33 +000011879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011881 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011887fi
11888
11889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11892$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011893if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011895if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011896 ac_cv_have_lchflags="yes"
11897else
11898 ac_cv_have_lchflags="no"
11899fi
11900
11901fi
11902if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011905
11906fi
11907
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011908case $ac_sys_system/$ac_sys_release in
11909Darwin/*)
11910 _CUR_CFLAGS="${CFLAGS}"
11911 _CUR_LDFLAGS="${LDFLAGS}"
11912 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11913 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11914 ;;
11915esac
11916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11918$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011921else
11922 ac_check_lib_save_LIBS=$LIBS
11923LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011925/* end confdefs.h. */
11926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927/* Override any GCC internal prototype to avoid an error.
11928 Use char because int might match the return type of a GCC
11929 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011930#ifdef __cplusplus
11931extern "C"
11932#endif
11933char inflateCopy ();
11934int
11935main ()
11936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011937return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011938 ;
11939 return 0;
11940}
11941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011942if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011943 ac_cv_lib_z_inflateCopy=yes
11944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947rm -f core conftest.err conftest.$ac_objext \
11948 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011949LIBS=$ac_check_lib_save_LIBS
11950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11952$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011953if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011956
11957fi
11958
11959
11960case $ac_sys_system/$ac_sys_release in
11961Darwin/*)
11962 CFLAGS="${_CUR_CFLAGS}"
11963 LDFLAGS="${_CUR_LDFLAGS}"
11964 ;;
11965esac
11966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11968$as_echo_n "checking for hstrerror... " >&6; }
11969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011970/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011971
Martin v. Löwise9416172003-05-03 10:12:45 +000011972#include <netdb.h>
11973
Martin v. Löwise9416172003-05-03 10:12:45 +000011974int
11975main ()
11976{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011977void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011978 ;
11979 return 0;
11980}
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011985
Matthias Kloseb159a552010-04-25 21:00:44 +000011986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011991
11992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core conftest.err conftest.$ac_objext \
11994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11997$as_echo_n "checking for inet_aton... " >&6; }
11998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012000
Martin v. Löwis86d66262006-02-17 08:40:11 +000012001#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012002#include <sys/socket.h>
12003#include <netinet/in.h>
12004#include <arpa/inet.h>
12005
Martin v. Löwise9416172003-05-03 10:12:45 +000012006int
12007main ()
12008{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012009void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012017
Matthias Kloseb159a552010-04-25 21:00:44 +000012018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012019$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012020else
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012023
12024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012025rm -f core conftest.err conftest.$ac_objext \
12026 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12029$as_echo_n "checking for inet_pton... " >&6; }
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012032
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012033#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012034#include <sys/socket.h>
12035#include <netinet/in.h>
12036#include <arpa/inet.h>
12037
Martin v. Löwise9416172003-05-03 10:12:45 +000012038int
12039main ()
12040{
12041void* p = inet_pton
12042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012049
Matthias Kloseb159a552010-04-25 21:00:44 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012052else
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012055
12056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012058
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012059# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12061$as_echo_n "checking for setgroups... " >&6; }
12062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012064
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012065#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012066#ifdef HAVE_GRP_H
12067#include <grp.h>
12068#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012069
Martin v. Löwisd5843682002-11-21 20:41:28 +000012070int
12071main ()
12072{
12073void* p = setgroups
12074 ;
12075 return 0;
12076}
12077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012081
Matthias Kloseb159a552010-04-25 21:00:44 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12086$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012087
12088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012091# check for openpty and forkpty
12092
12093for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012094do :
12095 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012099_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12103$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012106else
Martin v. Löwis11437992002-04-12 09:54:03 +000012107 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012108LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112/* Override any GCC internal prototype to avoid an error.
12113 Use char because int might match the return type of a GCC
12114 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012115#ifdef __cplusplus
12116extern "C"
12117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012118char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012119int
12120main ()
12121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 ;
12124 return 0;
12125}
12126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012134LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12137$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012138if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012140 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012141else
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12143$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012144if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146else
12147 ac_check_lib_save_LIBS=$LIBS
12148LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012150/* end confdefs.h. */
12151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152/* Override any GCC internal prototype to avoid an error.
12153 Use char because int might match the return type of a GCC
12154 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012155#ifdef __cplusplus
12156extern "C"
12157#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012158char openpty ();
12159int
12160main ()
12161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012163 ;
12164 return 0;
12165}
12166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012168 ac_cv_lib_bsd_openpty=yes
12169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172rm -f core conftest.err conftest.$ac_objext \
12173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012174LIBS=$ac_check_lib_save_LIBS
12175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12177$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012180 LIBS="$LIBS -lbsd"
12181fi
12182
12183
12184fi
12185
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186
12187fi
12188done
12189
12190for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012191do :
12192 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012195#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012196_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12200$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012201if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203else
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209/* Override any GCC internal prototype to avoid an error.
12210 Use char because int might match the return type of a GCC
12211 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012212#ifdef __cplusplus
12213extern "C"
12214#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012215char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012216int
12217main ()
12218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ;
12221 return 0;
12222}
12223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229rm -f core conftest.err conftest.$ac_objext \
12230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012231LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12234$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012237 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12240$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243else
12244 ac_check_lib_save_LIBS=$LIBS
12245LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012247/* end confdefs.h. */
12248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249/* Override any GCC internal prototype to avoid an error.
12250 Use char because int might match the return type of a GCC
12251 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012252#ifdef __cplusplus
12253extern "C"
12254#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012255char forkpty ();
12256int
12257main ()
12258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012265 ac_cv_lib_bsd_forkpty=yes
12266else
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269rm -f core conftest.err conftest.$ac_objext \
12270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012271LIBS=$ac_check_lib_save_LIBS
12272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12274$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012275if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012277 LIBS="$LIBS -lbsd"
12278fi
12279
12280
12281fi
12282
Fred Drake8cef4cf2000-06-28 16:40:38 +000012283
12284fi
12285done
12286
Jack Jansendd19cf82001-12-06 22:36:17 +000012287
Michael W. Hudson54241132001-12-07 15:38:26 +000012288# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012289for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012290do :
12291 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12292ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012293if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012296_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012298fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012299done
12300
Michael W. Hudson54241132001-12-07 15:38:26 +000012301
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012302ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012303if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012304 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012305
Martin v. Löwis1142de32002-03-29 16:28:31 +000012306else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012308 *" dup2.$ac_objext "* ) ;;
12309 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012310 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012311esac
12312
Martin v. Löwis1142de32002-03-29 16:28:31 +000012313fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012314
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012315ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012316if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012317 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12318
12319else
12320 case " $LIBOBJS " in
12321 *" strdup.$ac_objext "* ) ;;
12322 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12323 ;;
12324esac
12325
12326fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012327
12328
12329for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012330do :
12331 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012332if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012333 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012339int
12340main ()
12341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012343 ;
12344 return 0;
12345}
12346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
Matthias Kloseb9621712010-04-24 17:59:49 +000012349$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012350
Guido van Rossum627b2d71993-12-24 10:39:16 +000012351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012353
Guido van Rossum627b2d71993-12-24 10:39:16 +000012354fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012355done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356
Jack Jansen150753c2003-03-29 22:07:47 +000012357for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012358do :
12359 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012366#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012367int
12368main ()
12369{
12370setpgrp(0,0);
12371 ;
12372 return 0;
12373}
12374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012378
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012381
12382fi
12383done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012384
Thomas Wouters3a584202000-08-05 23:28:51 +000012385for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012386do :
12387 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012388if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012393/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012394#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012395int
12396main ()
12397{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
12404
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405else
Skip Montanaro6dead952003-09-25 14:50:04 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012414done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415
Michael W. Hudson54241132001-12-07 15:38:26 +000012416
Victor Stinnere0be4232011-10-25 13:06:09 +020012417for ac_func in clock_gettime
12418do :
12419 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12420if test "x$ac_cv_func_clock_gettime" = xyes; then :
12421 cat >>confdefs.h <<_ACEOF
12422#define HAVE_CLOCK_GETTIME 1
12423_ACEOF
12424
12425else
12426
12427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12428$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12429if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12430 $as_echo_n "(cached) " >&6
12431else
12432 ac_check_lib_save_LIBS=$LIBS
12433LIBS="-lrt $LIBS"
12434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12435/* end confdefs.h. */
12436
12437/* Override any GCC internal prototype to avoid an error.
12438 Use char because int might match the return type of a GCC
12439 builtin and then its argument prototype would still apply. */
12440#ifdef __cplusplus
12441extern "C"
12442#endif
12443char clock_gettime ();
12444int
12445main ()
12446{
12447return clock_gettime ();
12448 ;
12449 return 0;
12450}
12451_ACEOF
12452if ac_fn_c_try_link "$LINENO"; then :
12453 ac_cv_lib_rt_clock_gettime=yes
12454else
12455 ac_cv_lib_rt_clock_gettime=no
12456fi
12457rm -f core conftest.err conftest.$ac_objext \
12458 conftest$ac_exeext conftest.$ac_ext
12459LIBS=$ac_check_lib_save_LIBS
12460fi
12461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12462$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12463if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12464
Victor Stinner7efb8332014-08-29 15:41:08 +020012465 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012466 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12467
12468
12469$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12470
12471
12472fi
12473
12474
12475fi
12476done
12477
12478
12479for ac_func in clock_getres
12480do :
12481 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12482if test "x$ac_cv_func_clock_getres" = xyes; then :
12483 cat >>confdefs.h <<_ACEOF
12484#define HAVE_CLOCK_GETRES 1
12485_ACEOF
12486
12487else
12488
12489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12490$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12491if ${ac_cv_lib_rt_clock_getres+:} false; then :
12492 $as_echo_n "(cached) " >&6
12493else
12494 ac_check_lib_save_LIBS=$LIBS
12495LIBS="-lrt $LIBS"
12496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497/* end confdefs.h. */
12498
12499/* Override any GCC internal prototype to avoid an error.
12500 Use char because int might match the return type of a GCC
12501 builtin and then its argument prototype would still apply. */
12502#ifdef __cplusplus
12503extern "C"
12504#endif
12505char clock_getres ();
12506int
12507main ()
12508{
12509return clock_getres ();
12510 ;
12511 return 0;
12512}
12513_ACEOF
12514if ac_fn_c_try_link "$LINENO"; then :
12515 ac_cv_lib_rt_clock_getres=yes
12516else
12517 ac_cv_lib_rt_clock_getres=no
12518fi
12519rm -f core conftest.err conftest.$ac_objext \
12520 conftest$ac_exeext conftest.$ac_ext
12521LIBS=$ac_check_lib_save_LIBS
12522fi
12523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12524$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12525if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12526
12527 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12528
12529
12530fi
12531
12532
12533fi
12534done
12535
12536
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012537for ac_func in clock_settime
12538do :
12539 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12540if test "x$ac_cv_func_clock_settime" = xyes; then :
12541 cat >>confdefs.h <<_ACEOF
12542#define HAVE_CLOCK_SETTIME 1
12543_ACEOF
12544
12545else
12546
12547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12548$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12549if ${ac_cv_lib_rt_clock_settime+:} false; then :
12550 $as_echo_n "(cached) " >&6
12551else
12552 ac_check_lib_save_LIBS=$LIBS
12553LIBS="-lrt $LIBS"
12554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555/* end confdefs.h. */
12556
12557/* Override any GCC internal prototype to avoid an error.
12558 Use char because int might match the return type of a GCC
12559 builtin and then its argument prototype would still apply. */
12560#ifdef __cplusplus
12561extern "C"
12562#endif
12563char clock_settime ();
12564int
12565main ()
12566{
12567return clock_settime ();
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572if ac_fn_c_try_link "$LINENO"; then :
12573 ac_cv_lib_rt_clock_settime=yes
12574else
12575 ac_cv_lib_rt_clock_settime=no
12576fi
12577rm -f core conftest.err conftest.$ac_objext \
12578 conftest$ac_exeext conftest.$ac_ext
12579LIBS=$ac_check_lib_save_LIBS
12580fi
12581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12582$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12583if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12584
12585 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12586
12587
12588fi
12589
12590
12591fi
12592done
12593
12594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12596$as_echo_n "checking for major... " >&6; }
12597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012598/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012599
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012600#if defined(MAJOR_IN_MKDEV)
12601#include <sys/mkdev.h>
12602#elif defined(MAJOR_IN_SYSMACROS)
12603#include <sys/sysmacros.h>
12604#else
12605#include <sys/types.h>
12606#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012607
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012608int
12609main ()
12610{
12611
12612 makedev(major(0),minor(0));
12613
12614 ;
12615 return 0;
12616}
12617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012618if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012619
12620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12624$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012625
12626else
Skip Montanaro6dead952003-09-25 14:50:04 +000012627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012630
12631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012632rm -f core conftest.err conftest.$ac_objext \
12633 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012634
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012635# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012636# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12638$as_echo_n "checking for getaddrinfo... " >&6; }
12639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012640/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012641
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012642#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012643#include <sys/socket.h>
12644#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012645#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012646
Martin v. Löwis11437992002-04-12 09:54:03 +000012647int
12648main ()
12649{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012650getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 ;
12652 return 0;
12653}
12654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012655if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012656 have_getaddrinfo=yes
12657else
Matthias Kloseb9621712010-04-24 17:59:49 +000012658 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012660rm -f core conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext conftest.$ac_ext
12662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12663$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012664if test $have_getaddrinfo = yes
12665then
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12667$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012668 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012670else
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012672
12673if test "${enable_ipv6+set}" = set; then
12674 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12675else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012676 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012677fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012678else
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012681
Stefan Krah19c21392012-11-22 23:47:32 +010012682#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683#include <sys/types.h>
12684#include <netdb.h>
12685#include <string.h>
12686#include <sys/socket.h>
12687#include <netinet/in.h>
12688
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012689int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012690{
12691 int passive, gaierr, inet4 = 0, inet6 = 0;
12692 struct addrinfo hints, *ai, *aitop;
12693 char straddr[INET6_ADDRSTRLEN], strport[16];
12694
12695 for (passive = 0; passive <= 1; passive++) {
12696 memset(&hints, 0, sizeof(hints));
12697 hints.ai_family = AF_UNSPEC;
12698 hints.ai_flags = passive ? AI_PASSIVE : 0;
12699 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012700 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12702 (void)gai_strerror(gaierr);
12703 goto bad;
12704 }
12705 for (ai = aitop; ai; ai = ai->ai_next) {
12706 if (ai->ai_addr == NULL ||
12707 ai->ai_addrlen == 0 ||
12708 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12709 straddr, sizeof(straddr), strport, sizeof(strport),
12710 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12711 goto bad;
12712 }
12713 switch (ai->ai_family) {
12714 case AF_INET:
12715 if (strcmp(strport, "54321") != 0) {
12716 goto bad;
12717 }
12718 if (passive) {
12719 if (strcmp(straddr, "0.0.0.0") != 0) {
12720 goto bad;
12721 }
12722 } else {
12723 if (strcmp(straddr, "127.0.0.1") != 0) {
12724 goto bad;
12725 }
12726 }
12727 inet4++;
12728 break;
12729 case AF_INET6:
12730 if (strcmp(strport, "54321") != 0) {
12731 goto bad;
12732 }
12733 if (passive) {
12734 if (strcmp(straddr, "::") != 0) {
12735 goto bad;
12736 }
12737 } else {
12738 if (strcmp(straddr, "::1") != 0) {
12739 goto bad;
12740 }
12741 }
12742 inet6++;
12743 break;
12744 case AF_UNSPEC:
12745 goto bad;
12746 break;
12747 default:
12748 /* another family support? */
12749 break;
12750 }
12751 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012752 freeaddrinfo(aitop);
12753 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754 }
12755
12756 if (!(inet4 == 0 || inet4 == 2))
12757 goto bad;
12758 if (!(inet6 == 0 || inet6 == 2))
12759 goto bad;
12760
12761 if (aitop)
12762 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012763 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012764
12765 bad:
12766 if (aitop)
12767 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012768 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012769}
12770
Martin v. Löwis11437992002-04-12 09:54:03 +000012771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012773 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012781fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012782
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12786$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12787
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012788if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012789then
12790 if test $ipv6 = yes
12791 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012792 echo 'Fatal: You must get working getaddrinfo() function.'
12793 echo ' or you can specify "--disable-ipv6"'.
12794 exit 1
12795 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012796else
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012799
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012800fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012801
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012802for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012803do :
12804 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012805if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012807#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012808_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012810fi
12811done
12812
Michael W. Hudson54241132001-12-07 15:38:26 +000012813
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012814# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12816$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012817if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819else
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012822#include <sys/types.h>
12823#include <sys/time.h>
12824#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012825
Martin v. Löwis11437992002-04-12 09:54:03 +000012826int
12827main ()
12828{
12829if ((struct tm *) 0)
12830return 0;
12831 ;
12832 return 0;
12833}
12834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012835if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12843$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012844if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012847
12848fi
12849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12851$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012852if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012854else
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012856/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857#include <sys/types.h>
12858#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
Martin v. Löwis11437992002-04-12 09:54:03 +000012860int
12861main ()
12862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863struct tm tm;
12864 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 ;
12867 return 0;
12868}
12869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012870if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871 ac_cv_struct_tm=time.h
12872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12878$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012879if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882
12883fi
12884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885ac_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 +000012886#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888"
Victor Stinnere0be4232011-10-25 13:06:09 +020012889if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
12891cat >>confdefs.h <<_ACEOF
12892#define HAVE_STRUCT_TM_TM_ZONE 1
12893_ACEOF
12894
12895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901
12902else
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12904"
Victor Stinnere0be4232011-10-25 13:06:09 +020012905if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907else
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909fi
12910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913_ACEOF
12914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12916$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012917if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012921/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012922#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923#if !HAVE_DECL_TZNAME
12924extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012926
Martin v. Löwis11437992002-04-12 09:54:03 +000012927int
12928main ()
12929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 ;
12932 return 0;
12933}
12934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936 ac_cv_var_tzname=yes
12937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012940rm -f core conftest.err conftest.$ac_objext \
12941 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12944$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012945 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012948
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949 fi
12950fi
12951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952ac_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 +020012953if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
12955cat >>confdefs.h <<_ACEOF
12956#define HAVE_STRUCT_STAT_ST_RDEV 1
12957_ACEOF
12958
12959
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012960fi
12961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962ac_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 +020012963if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965cat >>confdefs.h <<_ACEOF
12966#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12967_ACEOF
12968
12969
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972ac_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 +020012973if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012974
12975cat >>confdefs.h <<_ACEOF
12976#define HAVE_STRUCT_STAT_ST_FLAGS 1
12977_ACEOF
12978
12979
12980fi
12981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982ac_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 +020012983if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012984
12985cat >>confdefs.h <<_ACEOF
12986#define HAVE_STRUCT_STAT_ST_GEN 1
12987_ACEOF
12988
12989
12990fi
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992ac_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 +020012993if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012994
12995cat >>confdefs.h <<_ACEOF
12996#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12997_ACEOF
12998
12999
13000fi
13001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002ac_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 +020013003if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005cat >>confdefs.h <<_ACEOF
13006#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13007_ACEOF
13008
13009
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013010fi
13011
Stefan Krah267b6392016-04-26 01:09:18 +020013012ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13013 #include <sys/types.h>
13014 #include <pwd.h>
13015
13016"
13017if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13018
13019cat >>confdefs.h <<_ACEOF
13020#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13021_ACEOF
13022
13023
13024fi
13025ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13026 #include <sys/types.h>
13027 #include <pwd.h>
13028
13029"
13030if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13031
13032cat >>confdefs.h <<_ACEOF
13033#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13034_ACEOF
13035
13036
13037fi
13038
Zachary Ware6a6967e2016-10-01 00:47:27 -050013039# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13040ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13041"
13042if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13043
13044cat >>confdefs.h <<_ACEOF
13045#define HAVE_SIGINFO_T_SI_BAND 1
13046_ACEOF
13047
13048
13049fi
13050
Michael W. Hudson54241132001-12-07 15:38:26 +000013051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13053$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013054if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013056else
Matthias Kloseb159a552010-04-25 21:00:44 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013060#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013061int
13062main ()
13063{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 ;
13066 return 0;
13067}
13068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013069if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070 ac_cv_header_time_altzone=yes
13071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013076fi
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13079$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083
13084fi
13085
Guido van Rossumda88dad1995-01-26 00:46:29 +000013086was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13088$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013090/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013091
13092#include <sys/types.h>
13093#include <sys/select.h>
13094#include <sys/time.h>
13095
Martin v. Löwis11437992002-04-12 09:54:03 +000013096int
13097main ()
13098{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099;
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 ;
13101 return 0;
13102}
13103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013105
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013108
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013109 was_it_defined=yes
13110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13114$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13117$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013118if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013123#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013124int
13125main ()
13126{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013127struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 ;
13129 return 0;
13130}
13131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013132if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013133 ac_cv_struct_addrinfo=yes
13134else
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13138fi
13139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13141$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013145
13146fi
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13149$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013150if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013154/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013155
13156# include <sys/types.h>
13157# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013158int
13159main ()
13160{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013161struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ;
13163 return 0;
13164}
13165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167 ac_cv_struct_sockaddr_storage=yes
13168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13172fi
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13175$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013179
13180fi
13181
Christian Heimesdffa3942016-09-05 23:54:41 +020013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13183$as_echo_n "checking for sockaddr_alg... " >&6; }
13184if ${ac_cv_struct_sockaddr_alg+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186else
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188/* end confdefs.h. */
13189
13190# include <sys/types.h>
13191# include <sys/socket.h>
13192# include <linux/if_alg.h>
13193int
13194main ()
13195{
13196struct sockaddr_alg s
13197 ;
13198 return 0;
13199}
13200_ACEOF
13201if ac_fn_c_try_compile "$LINENO"; then :
13202 ac_cv_struct_sockaddr_alg=yes
13203else
13204 ac_cv_struct_sockaddr_alg=no
13205fi
13206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13207fi
13208
13209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13210$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13211if test $ac_cv_struct_sockaddr_alg = yes; then
13212
13213$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13214
13215fi
13216
Guido van Rossum627b2d71993-12-24 10:39:16 +000013217# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13220$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013221if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013226$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013227int
13228main ()
13229{
13230static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013231test_array [0] = 0;
13232return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013233
13234 ;
13235 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013236}
Martin v. Löwis11437992002-04-12 09:54:03 +000013237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013238if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013239 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13246$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013247if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013249
13250fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13253$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013254if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013256else
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013258/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260int
13261main ()
13262{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013265 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013267 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269 char const *const *pcpcc;
13270 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 /* NEC SVR4.0.2 mips cc rejects this. */
13272 struct point {int x, y;};
13273 static struct point const zero = {0,0};
13274 /* AIX XL C 1.02.0.0 rejects this.
13275 It does not let you subtract one const X* pointer from another in
13276 an arm of an if-expression whose if-part is not a constant
13277 expression */
13278 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013279 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013281 ++pcpcc;
13282 ppc = (char**) pcpcc;
13283 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013284 { /* SCO 3.2v4 cc rejects this sort of thing. */
13285 char tx;
13286 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013290 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 }
13292 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13293 int x[] = {25, 17};
13294 const int *foo = &x[0];
13295 ++foo;
13296 }
13297 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13298 typedef const int *iptr;
13299 iptr p = 0;
13300 ++p;
13301 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013302 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013304 struct s { int j; const int *ap[3]; } bx;
13305 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 }
13307 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13308 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013313
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 ;
13315 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013316}
Martin v. Löwis11437992002-04-12 09:54:03 +000013317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013318if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013319 ac_cv_c_const=yes
13320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13326$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013327if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330
13331fi
13332
Michael W. Hudson54241132001-12-07 15:38:26 +000013333
Guido van Rossumda88dad1995-01-26 00:46:29 +000013334works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13336$as_echo_n "checking for working signed char... " >&6; }
13337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013338/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340int
13341main ()
13342{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 ;
13345 return 0;
13346}
13347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013348if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013349 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013350else
Skip Montanaro6dead952003-09-25 14:50:04 +000013351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013353
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013354
Guido van Rossum7f43da71994-08-01 12:15:30 +000013355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13358$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013359
Guido van Rossumda88dad1995-01-26 00:46:29 +000013360have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13362$as_echo_n "checking for prototypes... " >&6; }
13363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013364/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013365int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013366int
13367main ()
13368{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Matthias Kloseb159a552010-04-25 21:00:44 +000013378 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13382$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383
Guido van Rossumda88dad1995-01-26 00:46:29 +000013384works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13386$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013388/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013389
13390#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013391int foo(int x, ...) {
13392 va_list va;
13393 va_start(va, x);
13394 va_arg(va, int);
13395 va_arg(va, char *);
13396 va_arg(va, double);
13397 return 0;
13398}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400int
13401main ()
13402{
Guido van Rossum90eea071996-08-30 20:58:57 +000013403return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 ;
13405 return 0;
13406}
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013413 works=yes
13414
Guido van Rossum627b2d71993-12-24 10:39:16 +000013415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13418$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013419
Martin v. Löwisd6320502004-08-12 13:45:08 +000013420# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13422$as_echo_n "checking for socketpair... " >&6; }
13423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013424/* end confdefs.h. */
13425
13426#include <sys/types.h>
13427#include <sys/socket.h>
13428
13429int
13430main ()
13431{
13432void *x=socketpair
13433 ;
13434 return 0;
13435}
13436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013440
Matthias Kloseb159a552010-04-25 21:00:44 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013442$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13445$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013446
13447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013449
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013450# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13452$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013454/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013455#include <sys/types.h>
13456#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013457int
13458main ()
13459{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013460struct sockaddr x;
13461x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 ;
13463 return 0;
13464}
13465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013466if ac_fn_c_try_compile "$LINENO"; then :
13467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13468$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013471
13472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13474$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013475
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013479# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
13481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013483if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13488$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489 OLD_CFLAGS=$CFLAGS
13490 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013492/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013493
13494# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496int
13497main ()
13498{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013499
13500 char *name;
13501 struct hostent *he, *res;
13502 char buffer[2048];
13503 int buflen = 2048;
13504 int h_errnop;
13505
13506 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
13508 ;
13509 return 0;
13510}
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013515
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13520$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013522else
Skip Montanaro6dead952003-09-25 14:50:04 +000013523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13525$as_echo "no" >&6; }
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13527$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013531# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533int
13534main ()
13535{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536
13537 char *name;
13538 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013539 char buffer[2048];
13540 int buflen = 2048;
13541 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013542
Matthias Kloseb159a552010-04-25 21:00:44 +000013543 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
13545 ;
13546 return 0;
13547}
13548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Matthias Kloseb159a552010-04-25 21:00:44 +000013554$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13557$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013559else
Skip Montanaro6dead952003-09-25 14:50:04 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13562$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13564$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13566/* end confdefs.h. */
13567
13568# include <netdb.h>
13569
13570int
13571main ()
13572{
13573
13574 char *name;
13575 struct hostent *he;
13576 struct hostent_data data;
13577
13578 (void) gethostbyname_r(name, he, &data);
13579
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584if ac_fn_c_try_compile "$LINENO"; then :
13585
13586 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13587
13588
13589$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13590
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13592$as_echo "yes" >&6; }
13593
13594else
13595
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13597$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013598
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013607 CFLAGS=$OLD_CFLAGS
13608
13609else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 for ac_func in gethostbyname
13612do :
13613 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013614if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013616#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013617_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013620done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013621
Michael W. Hudson54241132001-12-07 15:38:26 +000013622
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623fi
13624
Michael W. Hudson54241132001-12-07 15:38:26 +000013625
13626
13627
13628
13629
13630
Guido van Rossum627b2d71993-12-24 10:39:16 +000013631# checks for system services
13632# (none yet)
13633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013634# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013635ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013636if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013637
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13640$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013641if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643else
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013645LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649/* Override any GCC internal prototype to avoid an error.
13650 Use char because int might match the return type of a GCC
13651 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013652#ifdef __cplusplus
13653extern "C"
13654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013655char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013656int
13657main ()
13658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013660 ;
13661 return 0;
13662}
13663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013666else
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013669rm -f core conftest.err conftest.$ac_objext \
13670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13674$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013675if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 cat >>confdefs.h <<_ACEOF
13677#define HAVE_LIBIEEE 1
13678_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013679
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013680 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013681
Guido van Rossum627b2d71993-12-24 10:39:16 +000013682fi
13683
Michael W. Hudson54241132001-12-07 15:38:26 +000013684
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013685fi
13686
Michael W. Hudson54241132001-12-07 15:38:26 +000013687
Guido van Rossum7f43da71994-08-01 12:15:30 +000013688# check for --with-libm=...
13689
Guido van Rossum563e7081996-09-10 18:20:48 +000013690case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013691Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013692*) LIBM=-lm
13693esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13695$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013700if test "$withval" = no
13701then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13703$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013704elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013705then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13707$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013708else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013709fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13712$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713fi
13714
Guido van Rossum7f43da71994-08-01 12:15:30 +000013715
13716# check for --with-libc=...
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13719$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013722if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013724if test "$withval" = no
13725then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13727$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013728elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013729then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13731$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013732else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013733fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13736$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013737fi
13738
Guido van Rossum7f43da71994-08-01 12:15:30 +000013739
Stefan Krah1919b7e2012-03-21 18:25:23 +010013740# **************************************
13741# * Check for gcc x64 inline assembler *
13742# **************************************
13743
13744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13745$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13747/* end confdefs.h. */
13748
13749int
13750main ()
13751{
13752
13753 __asm__ __volatile__ ("movq %rcx, %rax");
13754
13755 ;
13756 return 0;
13757}
13758_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013759if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013760 have_gcc_asm_for_x64=yes
13761else
13762 have_gcc_asm_for_x64=no
13763fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013764rm -f core conftest.err conftest.$ac_objext \
13765 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13767$as_echo "$have_gcc_asm_for_x64" >&6; }
13768if test "$have_gcc_asm_for_x64" = yes
13769then
13770
13771$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13772
13773fi
13774
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775# **************************************************
13776# * Check for various properties of floating point *
13777# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13780$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013781if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013783else
13784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013786 ac_cv_little_endian_double=no
13787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013789/* end confdefs.h. */
13790
13791#include <string.h>
13792int main() {
13793 double x = 9006104071832581.0;
13794 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13795 return 0;
13796 else
13797 return 1;
13798}
13799
13800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013801if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013802 ac_cv_little_endian_double=yes
13803else
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013808fi
13809
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810fi
13811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13813$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814if test "$ac_cv_little_endian_double" = yes
13815then
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013818
13819fi
13820
Matthias Kloseb9621712010-04-24 17:59:49 +000013821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13822$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013823if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825else
13826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013828 ac_cv_big_endian_double=no
13829else
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831/* end confdefs.h. */
13832
13833#include <string.h>
13834int main() {
13835 double x = 9006104071832581.0;
13836 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13837 return 0;
13838 else
13839 return 1;
13840}
13841
13842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844 ac_cv_big_endian_double=yes
13845else
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850fi
13851
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852fi
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13855$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856if test "$ac_cv_big_endian_double" = yes
13857then
13858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013860
13861fi
13862
13863# Some ARM platforms use a mixed-endian representation for doubles.
13864# While Python doesn't currently have full support for these platforms
13865# (see e.g., issue 1762561), we can at least make sure that float <-> string
13866# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13868$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013869if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871else
13872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013874 ac_cv_mixed_endian_double=no
13875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013877/* end confdefs.h. */
13878
13879#include <string.h>
13880int main() {
13881 double x = 9006104071832581.0;
13882 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13883 return 0;
13884 else
13885 return 1;
13886}
13887
13888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013889if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013890 ac_cv_mixed_endian_double=yes
13891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013896fi
13897
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013898fi
13899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13901$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902if test "$ac_cv_mixed_endian_double" = yes
13903then
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906
13907fi
13908
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013909# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013910# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013911# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013912# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013913# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013914# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013915
13916# This inline assembler syntax may also work for suncc and icc,
13917# so we try it on all platforms.
13918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13920$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922/* end confdefs.h. */
13923
13924int
13925main ()
13926{
13927
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013928 unsigned short cw;
13929 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13930 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013931
13932 ;
13933 return 0;
13934}
13935_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013936if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013937 have_gcc_asm_for_x87=yes
13938else
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013940fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013941rm -f core conftest.err conftest.$ac_objext \
13942 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13944$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013945if test "$have_gcc_asm_for_x87" = yes
13946then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013951
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13953$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13955/* end confdefs.h. */
13956
13957int
13958main ()
13959{
13960
13961 unsigned int fpcr;
13962 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13963 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13964
13965 ;
13966 return 0;
13967}
13968_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013969if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013970 have_gcc_asm_for_mc68881=yes
13971else
13972 have_gcc_asm_for_mc68881=no
13973fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013974rm -f core conftest.err conftest.$ac_objext \
13975 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13977$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13978if test "$have_gcc_asm_for_mc68881" = yes
13979then
13980
13981$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13982
13983fi
13984
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013985# Detect whether system arithmetic is subject to x87-style double
13986# rounding issues. The result of this test has little meaning on non
13987# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13988# mode is round-to-nearest and double rounding issues are present, and
13989# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13991$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992# $BASECFLAGS may affect the result
13993ac_save_cc="$CC"
13994CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013995if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013996 ac_cv_x87_double_rounding=no
13997else
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013999/* end confdefs.h. */
14000
14001#include <stdlib.h>
14002#include <math.h>
14003int main() {
14004 volatile double x, y, z;
14005 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14006 x = 0.99999999999999989; /* 1-2**-53 */
14007 y = 1./x;
14008 if (y != 1.)
14009 exit(0);
14010 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14011 x = 1e16;
14012 y = 2.99999;
14013 z = x + y;
14014 if (z != 1e16+4.)
14015 exit(0);
14016 /* both tests show evidence of double rounding */
14017 exit(1);
14018}
14019
14020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014021if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014022 ac_cv_x87_double_rounding=no
14023else
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14027 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014028fi
14029
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14032$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033if test "$ac_cv_x87_double_rounding" = yes
14034then
14035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014037
14038fi
14039
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014040# ************************************
14041# * Check for mathematical functions *
14042# ************************************
14043
14044LIBS_SAVE=$LIBS
14045LIBS="$LIBS $LIBM"
14046
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014047for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14048do :
14049 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14050ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014051if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014052 cat >>confdefs.h <<_ACEOF
14053#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14054_ACEOF
14055
14056fi
14057done
14058
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014059for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014060do :
14061 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14062ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014063if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014064 cat >>confdefs.h <<_ACEOF
14065#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14066_ACEOF
14067
14068fi
14069done
14070
14071ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14072"
Victor Stinnere0be4232011-10-25 13:06:09 +020014073if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014074 ac_have_decl=1
14075else
14076 ac_have_decl=0
14077fi
14078
14079cat >>confdefs.h <<_ACEOF
14080#define HAVE_DECL_ISINF $ac_have_decl
14081_ACEOF
14082ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14083"
Victor Stinnere0be4232011-10-25 13:06:09 +020014084if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014085 ac_have_decl=1
14086else
14087 ac_have_decl=0
14088fi
14089
14090cat >>confdefs.h <<_ACEOF
14091#define HAVE_DECL_ISNAN $ac_have_decl
14092_ACEOF
14093ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14094"
Victor Stinnere0be4232011-10-25 13:06:09 +020014095if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014096 ac_have_decl=1
14097else
14098 ac_have_decl=0
14099fi
14100
14101cat >>confdefs.h <<_ACEOF
14102#define HAVE_DECL_ISFINITE $ac_have_decl
14103_ACEOF
14104
14105
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014106# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14107# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14109$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014110if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014112else
14113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014115 ac_cv_tanh_preserves_zero_sign=no
14116else
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014118/* end confdefs.h. */
14119
14120#include <math.h>
14121#include <stdlib.h>
14122int main() {
14123 /* return 0 if either negative zeros don't exist
14124 on this platform or if negative zeros exist
14125 and tanh(-0.) == -0. */
14126 if (atan2(0., -1.) == atan2(-0., -1.) ||
14127 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14128 else exit(1);
14129}
14130
14131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014132if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014133 ac_cv_tanh_preserves_zero_sign=yes
14134else
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014139fi
14140
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014141fi
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14144$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014145if test "$ac_cv_tanh_preserves_zero_sign" = yes
14146then
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014149
14150fi
14151
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014152if test "$ac_cv_func_log1p" = yes
14153then
14154 # On some versions of AIX, log1p(-0.) returns 0. instead of
14155 # -0. See issue #9920.
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14157$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014158 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014159 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014161
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014162 if test "$cross_compiling" = yes; then :
14163 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014164else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14166/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014167
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014168 #include <math.h>
14169 #include <stdlib.h>
14170 int main() {
14171 /* Fail if the signs of log1p(-0.) and -0. can be
14172 distinguished. */
14173 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14174 return 0;
14175 else
14176 return 1;
14177 }
14178
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014179_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014180if ac_fn_c_try_run "$LINENO"; then :
14181 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014182else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014183 ac_cv_log1p_drops_zero_sign=yes
14184fi
14185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014187fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014188
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014189fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014190
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14192$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14193fi
14194if test "$ac_cv_log1p_drops_zero_sign" = yes
14195then
14196
14197$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14198
14199fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014200
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014201LIBS=$LIBS_SAVE
14202
Mark Dickinsona614f042009-11-28 12:48:43 +000014203# For multiprocessing module, check that sem_open
14204# actually works. For FreeBSD versions <= 7.2,
14205# the kernel module that provides POSIX semaphores
14206# isn't loaded by default, so an attempt to call
14207# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14209$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014210if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014214 ac_cv_posix_semaphores_enabled=yes
14215else
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014217/* end confdefs.h. */
14218
14219#include <unistd.h>
14220#include <fcntl.h>
14221#include <stdio.h>
14222#include <semaphore.h>
14223#include <sys/stat.h>
14224
14225int main(void) {
14226 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14227 if (a == SEM_FAILED) {
14228 perror("sem_open");
14229 return 1;
14230 }
14231 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014232 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014233 return 0;
14234}
14235
14236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014237if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014238 ac_cv_posix_semaphores_enabled=yes
14239else
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014244fi
14245
14246
Mark Dickinsona614f042009-11-28 12:48:43 +000014247fi
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14250$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014251if test $ac_cv_posix_semaphores_enabled = no
14252then
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014255
14256fi
14257
Mark Dickinson10683072009-04-18 21:18:19 +000014258# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14260$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014261if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014263else
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014266else
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014268/* end confdefs.h. */
14269
14270#include <unistd.h>
14271#include <fcntl.h>
14272#include <stdio.h>
14273#include <semaphore.h>
14274#include <sys/stat.h>
14275
14276int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014277 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014278 int count;
14279 int res;
14280 if(a==SEM_FAILED){
14281 perror("sem_open");
14282 return 1;
14283
14284 }
14285 res = sem_getvalue(a, &count);
14286 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014287 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014288 return res==-1 ? 1 : 0;
14289}
14290
Mark Dickinson10683072009-04-18 21:18:19 +000014291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014292if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014293 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014294else
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14298 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014299fi
14300
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014301
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014302fi
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14305$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014306if test $ac_cv_broken_sem_getvalue = yes
14307then
14308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014310
14311fi
14312
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014313ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14314"
14315if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14316 ac_have_decl=1
14317else
14318 ac_have_decl=0
14319fi
14320
14321cat >>confdefs.h <<_ACEOF
14322#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14323_ACEOF
14324ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14325"
14326if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14327 ac_have_decl=1
14328else
14329 ac_have_decl=0
14330fi
14331
14332cat >>confdefs.h <<_ACEOF
14333#define HAVE_DECL_RTLD_NOW $ac_have_decl
14334_ACEOF
14335ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14336"
14337if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14338 ac_have_decl=1
14339else
14340 ac_have_decl=0
14341fi
14342
14343cat >>confdefs.h <<_ACEOF
14344#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14345_ACEOF
14346ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14347"
14348if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14349 ac_have_decl=1
14350else
14351 ac_have_decl=0
14352fi
14353
14354cat >>confdefs.h <<_ACEOF
14355#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14356_ACEOF
14357ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14358"
14359if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14360 ac_have_decl=1
14361else
14362 ac_have_decl=0
14363fi
14364
14365cat >>confdefs.h <<_ACEOF
14366#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14367_ACEOF
14368ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14369"
14370if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14371 ac_have_decl=1
14372else
14373 ac_have_decl=0
14374fi
14375
14376cat >>confdefs.h <<_ACEOF
14377#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14378_ACEOF
14379ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14380"
14381if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14382 ac_have_decl=1
14383else
14384 ac_have_decl=0
14385fi
14386
14387cat >>confdefs.h <<_ACEOF
14388#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14389_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014390ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14391"
14392if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14393 ac_have_decl=1
14394else
14395 ac_have_decl=0
14396fi
14397
14398cat >>confdefs.h <<_ACEOF
14399#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14400_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014401
14402
Mark Dickinsonbd792642009-03-18 20:06:12 +000014403# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14405$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014406# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014407if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014408 enableval=$enable_big_digits; case $enable_big_digits in
14409yes)
14410 enable_big_digits=30 ;;
14411no)
14412 enable_big_digits=15 ;;
1441315|30)
14414 ;;
14415*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014416 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 +000014417esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14419$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014420
14421cat >>confdefs.h <<_ACEOF
14422#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14423_ACEOF
14424
14425
14426else
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14428$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014429fi
14430
14431
Guido van Rossumef2255b2000-03-10 22:30:29 +000014432# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014433ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014434if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
14436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014439 wchar_h="yes"
14440
Guido van Rossumef2255b2000-03-10 22:30:29 +000014441else
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014443
14444fi
14445
Michael W. Hudson54241132001-12-07 15:38:26 +000014446
Martin v. Löwis11437992002-04-12 09:54:03 +000014447
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014448# determine wchar_t size
14449if test "$wchar_h" = yes
14450then
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14453# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14454# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14456$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014457if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014459else
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14461"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 if test "$ac_cv_type_wchar_t" = yes; then
14465 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014467as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014468See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469 else
14470 ac_cv_sizeof_wchar_t=0
14471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014473
Martin v. Löwis11437992002-04-12 09:54:03 +000014474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14476$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477
14478
14479
Martin v. Löwis11437992002-04-12 09:54:03 +000014480cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014481#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014482_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014483
Michael W. Hudson54241132001-12-07 15:38:26 +000014484
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014485fi
14486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14488$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014489have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014491/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014492
14493#include <tcl.h>
14494#if TCL_UTF_MAX != 6
14495# error "NOT UCS4_TCL"
14496#endif
14497int
14498main ()
14499{
14500
14501 ;
14502 return 0;
14503}
14504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014506
14507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014509
14510 have_ucs4_tcl=yes
14511
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14515$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014516
Skip Montanaro6dead952003-09-25 14:50:04 +000014517# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014518if test "$wchar_h" = yes
14519then
14520 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14522$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014523 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014525else
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014528 ac_cv_wchar_t_signed=yes
14529else
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014531/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014532
14533 #include <wchar.h>
14534 int main()
14535 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014536 /* Success: exit code 0 */
14537 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014538 }
14539
14540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014542 ac_cv_wchar_t_signed=yes
14543else
Matthias Kloseb9621712010-04-24 17:59:49 +000014544 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014548fi
14549
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014550fi
14551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14553$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554fi
14555
Georg Brandl52d168a2008-01-07 18:10:24 +000014556# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014557if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014558 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014559then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014560 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014561
Matthias Kloseb9621712010-04-24 17:59:49 +000014562$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014563
Georg Brandl52d168a2008-01-07 18:10:24 +000014564else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014565 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014566fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14568$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014569
14570# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14572$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014573if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575else
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 ac_cv_c_bigendian=unknown
14577 # See if we're dealing with a universal compiler.
14578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579/* end confdefs.h. */
14580#ifndef __APPLE_CC__
14581 not a universal capable compiler
14582 #endif
14583 typedef int dummy;
14584
Skip Montanaro6dead952003-09-25 14:50:04 +000014585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014586if ac_fn_c_try_compile "$LINENO"; then :
14587
14588 # Check for potential -arch flags. It is not universal unless
14589 # there are at least two -arch flags with different values.
14590 ac_arch=
14591 ac_prev=
14592 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14593 if test -n "$ac_prev"; then
14594 case $ac_word in
14595 i?86 | x86_64 | ppc | ppc64)
14596 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14597 ac_arch=$ac_word
14598 else
14599 ac_cv_c_bigendian=universal
14600 break
14601 fi
14602 ;;
14603 esac
14604 ac_prev=
14605 elif test "x$ac_word" = "x-arch"; then
14606 ac_prev=arch
14607 fi
14608 done
14609fi
14610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14611 if test $ac_cv_c_bigendian = unknown; then
14612 # See if sys/param.h defines the BYTE_ORDER macro.
14613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014614/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014615#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618int
14619main ()
14620{
Matthias Kloseb9621712010-04-24 17:59:49 +000014621#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14622 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14623 && LITTLE_ENDIAN)
14624 bogus endian macros
14625 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627 ;
14628 return 0;
14629}
14630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014631if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014632 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014634/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014635#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014636 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014637
Martin v. Löwis11437992002-04-12 09:54:03 +000014638int
14639main ()
14640{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014641#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 not big endian
14643 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
14645 ;
14646 return 0;
14647}
14648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014650 ac_cv_c_bigendian=yes
14651else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014655fi
14656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14657 fi
14658 if test $ac_cv_c_bigendian = unknown; then
14659 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014661/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014662#include <limits.h>
14663
Martin v. Löwis11437992002-04-12 09:54:03 +000014664int
14665main ()
14666{
Matthias Kloseb9621712010-04-24 17:59:49 +000014667#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14668 bogus endian macros
14669 #endif
14670
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 ;
14672 return 0;
14673}
14674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014675if ac_fn_c_try_compile "$LINENO"; then :
14676 # It does; now see whether it defined to _BIG_ENDIAN or not.
14677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14678/* end confdefs.h. */
14679#include <limits.h>
14680
14681int
14682main ()
14683{
14684#ifndef _BIG_ENDIAN
14685 not big endian
14686 #endif
14687
14688 ;
14689 return 0;
14690}
14691_ACEOF
14692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014693 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014696fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14698fi
14699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14700 fi
14701 if test $ac_cv_c_bigendian = unknown; then
14702 # Compile a test program.
14703 if test "$cross_compiling" = yes; then :
14704 # Try to guess by grepping values from an object file.
14705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14706/* end confdefs.h. */
14707short int ascii_mm[] =
14708 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14709 short int ascii_ii[] =
14710 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14711 int use_ascii (int i) {
14712 return ascii_mm[i] + ascii_ii[i];
14713 }
14714 short int ebcdic_ii[] =
14715 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14716 short int ebcdic_mm[] =
14717 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14718 int use_ebcdic (int i) {
14719 return ebcdic_mm[i] + ebcdic_ii[i];
14720 }
14721 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722
Matthias Kloseb9621712010-04-24 17:59:49 +000014723int
14724main ()
14725{
14726return use_ascii (foo) == use_ebcdic (foo);
14727 ;
14728 return 0;
14729}
14730_ACEOF
14731if ac_fn_c_try_compile "$LINENO"; then :
14732 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14733 ac_cv_c_bigendian=yes
14734 fi
14735 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14736 if test "$ac_cv_c_bigendian" = unknown; then
14737 ac_cv_c_bigendian=no
14738 else
14739 # finding both strings is unlikely to happen, but who knows?
14740 ac_cv_c_bigendian=unknown
14741 fi
14742 fi
14743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014747/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014749int
14750main ()
14751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014752
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 /* Are we little or big endian? From Harbison&Steele. */
14754 union
14755 {
14756 long int l;
14757 char c[sizeof (long int)];
14758 } u;
14759 u.l = 1;
14760 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014761
14762 ;
14763 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014764}
Martin v. Löwis11437992002-04-12 09:54:03 +000014765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014766if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014767 ac_cv_c_bigendian=no
14768else
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14778$as_echo "$ac_cv_c_bigendian" >&6; }
14779 case $ac_cv_c_bigendian in #(
14780 yes)
14781 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14782;; #(
14783 no)
14784 ;; #(
14785 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014786
Matthias Kloseb9621712010-04-24 17:59:49 +000014787$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 ;; #(
14790 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014791 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014792 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014794
Michael W. Hudson54241132001-12-07 15:38:26 +000014795
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014796# ABI version string for Python extension modules. This appears between the
14797# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14798# from the following attributes which affect the ABI of this Python build (in
14799# this order):
14800#
14801# * The Python implementation (always 'cpython-' for us)
14802# * The major and minor version numbers
14803# * --with-pydebug (adds a 'd')
14804# * --with-pymalloc (adds a 'm')
14805# * --with-wide-unicode (adds a 'u')
14806#
14807# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014808# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14809# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014810
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14812$as_echo_n "checking ABIFLAGS... " >&6; }
14813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14814$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14816$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014817SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14819$as_echo "$SOABI" >&6; }
14820
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014821
14822case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014823 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014824 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14825 *)
14826 EXT_SUFFIX=${SHLIB_SUFFIX};;
14827esac
14828
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14830$as_echo_n "checking LDVERSION... " >&6; }
14831LDVERSION='$(VERSION)$(ABIFLAGS)'
14832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14833$as_echo "$LDVERSION" >&6; }
14834
doko@python.org87421192013-01-26 11:39:31 +010014835
doko@ubuntu.com55532312016-06-14 08:55:19 +020014836if test x$PLATFORM_TRIPLET = x; then
14837 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14838else
14839 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14840fi
doko@python.org87421192013-01-26 11:39:31 +010014841
14842
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014843# Check whether right shifting a negative integer extends the sign bit
14844# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14846$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014847if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014849else
Martin v. Löwis11437992002-04-12 09:54:03 +000014850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014852 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014853else
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014855/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014856
14857int main()
14858{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014859 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014860}
14861
Martin v. Löwis11437992002-04-12 09:54:03 +000014862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014863if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014864 ac_cv_rshift_extends_sign=yes
14865else
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014867fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014870fi
14871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872fi
14873
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14875$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014876if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014877then
Martin v. Löwis11437992002-04-12 09:54:03 +000014878
Matthias Kloseb9621712010-04-24 17:59:49 +000014879$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014880
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014881fi
14882
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014883# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14885$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014886if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014888else
Martin v. Löwis11437992002-04-12 09:54:03 +000014889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014891/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014893int
14894main ()
14895{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014896
14897 FILE *f = fopen("/dev/null", "r");
14898 flockfile(f);
14899 getc_unlocked(f);
14900 funlockfile(f);
14901
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ;
14903 return 0;
14904}
14905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014906if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014907 ac_cv_have_getc_unlocked=yes
14908else
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 ac_cv_have_getc_unlocked=no
14910fi
14911rm -f core conftest.err conftest.$ac_objext \
14912 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14916$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014917if test "$ac_cv_have_getc_unlocked" = yes
14918then
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014921
14922fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014923
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014924# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014925# save the value of LIBS so we don't actually link Python with readline
14926LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014927
Gregory P. Smith18820942008-09-07 06:24:49 +000014928# On some systems we need to link readline to a termcap compatible
14929# library. NOTE: Keep the precedence of listed libraries synchronised
14930# with setup.py.
14931py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14933$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014934for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014935 if test -z "$py_libtermcap"; then
14936 READLINE_LIBS="-lreadline"
14937 else
14938 READLINE_LIBS="-lreadline -l$py_libtermcap"
14939 fi
14940 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014942/* end confdefs.h. */
14943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944/* Override any GCC internal prototype to avoid an error.
14945 Use char because int might match the return type of a GCC
14946 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014947#ifdef __cplusplus
14948extern "C"
14949#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014950char readline ();
14951int
14952main ()
14953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014955 ;
14956 return 0;
14957}
14958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014960 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014962rm -f core conftest.err conftest.$ac_objext \
14963 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014964 if test $py_cv_lib_readline = yes; then
14965 break
14966 fi
14967done
14968# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14969#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014970if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14972$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014973else
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14975$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014978
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014979fi
14980
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014981# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014983/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014984#include <readline/readline.h>
14985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014986if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014987 have_readline=yes
14988else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014990
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014992rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014993if test $have_readline = yes
14994then
Matthias Kloseb9621712010-04-24 17:59:49 +000014995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014996/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014997#include <readline/readline.h>
14998
14999_ACEOF
15000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015004
15005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015006rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015007
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015009/* end confdefs.h. */
15010#include <readline/readline.h>
15011
15012_ACEOF
15013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015014 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015017
15018fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015019rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015020
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015021fi
15022
Martin v. Löwis0daad592001-09-30 21:09:59 +000015023# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15025$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015026if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015028else
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015030LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034/* Override any GCC internal prototype to avoid an error.
15035 Use char because int might match the return type of a GCC
15036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015037#ifdef __cplusplus
15038extern "C"
15039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015040char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015041int
15042main ()
15043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ;
15046 return 0;
15047}
15048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015051else
Matthias Kloseb9621712010-04-24 17:59:49 +000015052 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015054rm -f core conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015056LIBS=$ac_check_lib_save_LIBS
15057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15059$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015060if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015063
Martin v. Löwis0daad592001-09-30 21:09:59 +000015064fi
15065
Michael W. Hudson54241132001-12-07 15:38:26 +000015066
Thomas Wouters89d996e2007-09-08 17:39:28 +000015067# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15069$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015070if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015072else
15073 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015074LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015076/* end confdefs.h. */
15077
15078/* Override any GCC internal prototype to avoid an error.
15079 Use char because int might match the return type of a GCC
15080 builtin and then its argument prototype would still apply. */
15081#ifdef __cplusplus
15082extern "C"
15083#endif
15084char rl_completion_display_matches_hook ();
15085int
15086main ()
15087{
15088return rl_completion_display_matches_hook ();
15089 ;
15090 return 0;
15091}
15092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015093if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015094 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15095else
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015098rm -f core conftest.err conftest.$ac_objext \
15099 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015100LIBS=$ac_check_lib_save_LIBS
15101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15103$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015104if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015105
Matthias Kloseb9621712010-04-24 17:59:49 +000015106$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015107
15108fi
15109
15110
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015111# also in 4.0, but not in editline
15112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15113$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15114if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15115 $as_echo_n "(cached) " >&6
15116else
15117 ac_check_lib_save_LIBS=$LIBS
15118LIBS="-lreadline $READLINE_LIBS $LIBS"
15119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15120/* end confdefs.h. */
15121
15122/* Override any GCC internal prototype to avoid an error.
15123 Use char because int might match the return type of a GCC
15124 builtin and then its argument prototype would still apply. */
15125#ifdef __cplusplus
15126extern "C"
15127#endif
15128char rl_resize_terminal ();
15129int
15130main ()
15131{
15132return rl_resize_terminal ();
15133 ;
15134 return 0;
15135}
15136_ACEOF
15137if ac_fn_c_try_link "$LINENO"; then :
15138 ac_cv_lib_readline_rl_resize_terminal=yes
15139else
15140 ac_cv_lib_readline_rl_resize_terminal=no
15141fi
15142rm -f core conftest.err conftest.$ac_objext \
15143 conftest$ac_exeext conftest.$ac_ext
15144LIBS=$ac_check_lib_save_LIBS
15145fi
15146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15147$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15148if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15149
15150$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15151
15152fi
15153
15154
Martin v. Löwis0daad592001-09-30 21:09:59 +000015155# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15157$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015158if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015160else
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015162LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166/* Override any GCC internal prototype to avoid an error.
15167 Use char because int might match the return type of a GCC
15168 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015169#ifdef __cplusplus
15170extern "C"
15171#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015172char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015173int
15174main ()
15175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 ;
15178 return 0;
15179}
15180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015183else
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015186rm -f core conftest.err conftest.$ac_objext \
15187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015188LIBS=$ac_check_lib_save_LIBS
15189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15191$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015192if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015193
Matthias Kloseb9621712010-04-24 17:59:49 +000015194$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015195
Guido van Rossum353ae582001-07-10 16:45:32 +000015196fi
15197
Jack Jansendd19cf82001-12-06 22:36:17 +000015198
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015199# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201/* end confdefs.h. */
15202#include <readline/readline.h>
15203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015204if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015205 have_readline=yes
15206else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015208
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015210rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015211if test $have_readline = yes
15212then
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015214/* end confdefs.h. */
15215#include <readline/readline.h>
15216
15217_ACEOF
15218if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015222
15223fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015224rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015225
15226fi
15227
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15229$as_echo_n "checking for append_history in -lreadline... " >&6; }
15230if ${ac_cv_lib_readline_append_history+:} false; then :
15231 $as_echo_n "(cached) " >&6
15232else
15233 ac_check_lib_save_LIBS=$LIBS
15234LIBS="-lreadline $READLINE_LIBS $LIBS"
15235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15236/* end confdefs.h. */
15237
15238/* Override any GCC internal prototype to avoid an error.
15239 Use char because int might match the return type of a GCC
15240 builtin and then its argument prototype would still apply. */
15241#ifdef __cplusplus
15242extern "C"
15243#endif
15244char append_history ();
15245int
15246main ()
15247{
15248return append_history ();
15249 ;
15250 return 0;
15251}
15252_ACEOF
15253if ac_fn_c_try_link "$LINENO"; then :
15254 ac_cv_lib_readline_append_history=yes
15255else
15256 ac_cv_lib_readline_append_history=no
15257fi
15258rm -f core conftest.err conftest.$ac_objext \
15259 conftest$ac_exeext conftest.$ac_ext
15260LIBS=$ac_check_lib_save_LIBS
15261fi
15262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15263$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15264if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15265
15266$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15267
15268fi
15269
15270
Martin v. Löwis82bca632006-02-10 20:49:30 +000015271# End of readline checks: restore LIBS
15272LIBS=$LIBS_no_readline
15273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15275$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015276if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015278else
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015281 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015282else
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015284/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015285
15286int main()
15287{
15288 int val1 = nice(1);
15289 if (val1 != -1 && val1 == nice(2))
15290 exit(0);
15291 exit(1);
15292}
15293
Martin v. Löwis11437992002-04-12 09:54:03 +000015294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015296 ac_cv_broken_nice=yes
15297else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15301 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015302fi
15303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304fi
15305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15307$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015308if test "$ac_cv_broken_nice" = yes
15309then
Martin v. Löwis11437992002-04-12 09:54:03 +000015310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015312
15313fi
15314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15316$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015317if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015319else
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015321 ac_cv_broken_poll=no
15322else
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015324/* end confdefs.h. */
15325
15326#include <poll.h>
15327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015328int main()
15329{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015330 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015331 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015332
15333 close (42);
15334
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015335 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015337 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015338 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341 return 1;
15342}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015343
15344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015345if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015346 ac_cv_broken_poll=yes
15347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15351 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015354fi
15355
Matthias Kloseb9621712010-04-24 17:59:49 +000015356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15357$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015358if test "$ac_cv_broken_poll" = yes
15359then
15360
Matthias Kloseb9621712010-04-24 17:59:49 +000015361$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015362
15363fi
15364
Brett Cannon43802422005-02-10 20:48:03 +000015365# 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 +000015366# (which is not required by ISO C or UNIX spec) and/or if we support
15367# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015368ac_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 +000015369#include <$ac_cv_struct_tm>
15370
Matthias Kloseb9621712010-04-24 17:59:49 +000015371"
Victor Stinnere0be4232011-10-25 13:06:09 +020015372if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015373
15374cat >>confdefs.h <<_ACEOF
15375#define HAVE_STRUCT_TM_TM_ZONE 1
15376_ACEOF
15377
15378
15379fi
15380
15381if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015384
15385else
Matthias Kloseb9621712010-04-24 17:59:49 +000015386 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15387"
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390else
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392fi
15393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015395#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396_ACEOF
15397
Matthias Kloseb9621712010-04-24 17:59:49 +000015398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15399$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015400if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402else
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015404/* end confdefs.h. */
15405#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015406#if !HAVE_DECL_TZNAME
15407extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015408#endif
15409
15410int
15411main ()
15412{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015414 ;
15415 return 0;
15416}
15417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015418if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015419 ac_cv_var_tzname=yes
15420else
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015423rm -f core conftest.err conftest.$ac_objext \
15424 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15427$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015428 if test $ac_cv_var_tzname = yes; then
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015431
15432 fi
15433fi
15434
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015435
Martin v. Löwis1d459062005-03-14 21:23:33 +000015436# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15438$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015439if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015441else
15442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015444 ac_cv_working_tzset=no
15445else
Matthias Kloseb9621712010-04-24 17:59:49 +000015446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015447/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015448
15449#include <stdlib.h>
15450#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015451#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015452
15453#if HAVE_TZNAME
15454extern char *tzname[];
15455#endif
15456
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015457int main()
15458{
Brett Cannon18367812003-09-19 00:59:16 +000015459 /* Note that we need to ensure that not only does tzset(3)
15460 do 'something' with localtime, but it works as documented
15461 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015462 This includes making sure that tzname is set properly if
15463 tm->tm_zone does not exist since it is the alternative way
15464 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015465
15466 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015467 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015468 */
15469
Martin v. Löwis1d459062005-03-14 21:23:33 +000015470 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015471 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15472
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015473 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015474 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015475 if (localtime(&groundhogday)->tm_hour != 0)
15476 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015477#if HAVE_TZNAME
15478 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15479 if (strcmp(tzname[0], "UTC") ||
15480 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15481 exit(1);
15482#endif
Brett Cannon18367812003-09-19 00:59:16 +000015483
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015484 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015486 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015487 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015488#if HAVE_TZNAME
15489 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15490 exit(1);
15491#endif
Brett Cannon18367812003-09-19 00:59:16 +000015492
15493 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15494 tzset();
15495 if (localtime(&groundhogday)->tm_hour != 11)
15496 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015497#if HAVE_TZNAME
15498 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15499 exit(1);
15500#endif
15501
15502#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015503 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15504 exit(1);
15505 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15506 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015507#endif
Brett Cannon18367812003-09-19 00:59:16 +000015508
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015509 exit(0);
15510}
15511
15512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015513if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015514 ac_cv_working_tzset=yes
15515else
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015520fi
15521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522fi
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15525$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015526if test "$ac_cv_working_tzset" = yes
15527then
15528
Matthias Kloseb9621712010-04-24 17:59:49 +000015529$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015530
15531fi
15532
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015533# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15535$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015536if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015538else
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015540/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015541#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015542int
15543main ()
15544{
15545
15546struct stat st;
15547st.st_mtim.tv_nsec = 1;
15548
15549 ;
15550 return 0;
15551}
15552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015554 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15559fi
15560
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15562$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015563if test "$ac_cv_stat_tv_nsec" = yes
15564then
15565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015567
15568fi
15569
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015570# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15572$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015573if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015575else
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015577/* end confdefs.h. */
15578#include <sys/stat.h>
15579int
15580main ()
15581{
15582
15583struct stat st;
15584st.st_mtimespec.tv_nsec = 1;
15585
15586 ;
15587 return 0;
15588}
15589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015591 ac_cv_stat_tv_nsec2=yes
15592else
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15596fi
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15599$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015600if test "$ac_cv_stat_tv_nsec2" = yes
15601then
15602
Matthias Kloseb9621712010-04-24 17:59:49 +000015603$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015604
15605fi
15606
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015607# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015608ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015609if test "$cross_compiling" = no; then
15610 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15611fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015612
15613for ac_header in curses.h ncurses.h
15614do :
15615 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15616ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15618 cat >>confdefs.h <<_ACEOF
15619#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15620_ACEOF
15621
15622fi
15623
15624done
15625
15626
15627# On Solaris, term.h requires curses.h
15628for ac_header in term.h
15629do :
15630 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15631#ifdef HAVE_CURSES_H
15632#include <curses.h>
15633#endif
15634
15635"
15636if test "x$ac_cv_header_term_h" = xyes; then :
15637 cat >>confdefs.h <<_ACEOF
15638#define HAVE_TERM_H 1
15639_ACEOF
15640
15641fi
15642
15643done
15644
15645
Jack Jansen666b1e72001-10-31 12:11:48 +000015646# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15648$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015649if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015651else
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015653/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015654#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015655int
15656main ()
15657{
Jack Jansen666b1e72001-10-31 12:11:48 +000015658
15659 int rtn;
15660 rtn = mvwdelch(0,0,0);
15661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 ;
15663 return 0;
15664}
15665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015666if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015667 ac_cv_mvwdelch_is_expression=yes
15668else
Matthias Kloseb9621712010-04-24 17:59:49 +000015669 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15672fi
15673
Matthias Kloseb9621712010-04-24 17:59:49 +000015674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15675$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015676
15677if test "$ac_cv_mvwdelch_is_expression" = yes
15678then
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015681
15682fi
15683
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015684# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15685# structs since version 5.7. If the macro is defined as zero before including
15686# [n]curses.h, ncurses will expose fields of the structs regardless of the
15687# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15689$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015690if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015692else
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015694/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015695
15696 #define NCURSES_OPAQUE 0
15697 #include <curses.h>
15698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699int
15700main ()
15701{
Jack Jansen666b1e72001-10-31 12:11:48 +000015702
15703 WINDOW *w;
15704 w->_flags = 0;
15705
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 ;
15707 return 0;
15708}
15709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015710if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015711 ac_cv_window_has_flags=yes
15712else
Matthias Kloseb9621712010-04-24 17:59:49 +000015713 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15716fi
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15719$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015720
Jack Jansen666b1e72001-10-31 12:11:48 +000015721
15722if test "$ac_cv_window_has_flags" = yes
15723then
Martin v. Löwis11437992002-04-12 09:54:03 +000015724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015726
15727fi
15728
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15730$as_echo_n "checking for is_pad... " >&6; }
15731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15732/* end confdefs.h. */
15733#include <curses.h>
15734int
15735main ()
15736{
15737
15738#ifndef is_pad
15739void *x=is_pad
15740#endif
15741
15742 ;
15743 return 0;
15744}
15745_ACEOF
15746if ac_fn_c_try_compile "$LINENO"; then :
15747
15748$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15749
15750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15751$as_echo "yes" >&6; }
15752else
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15754$as_echo "no" >&6; }
15755
15756fi
15757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15760$as_echo_n "checking for is_term_resized... " >&6; }
15761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015762/* end confdefs.h. */
15763#include <curses.h>
15764int
15765main ()
15766{
15767void *x=is_term_resized
15768 ;
15769 return 0;
15770}
15771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015773
Matthias Kloseb9621712010-04-24 17:59:49 +000015774$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015775
Matthias Kloseb159a552010-04-25 21:00:44 +000015776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015777$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015778else
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15780$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015781
15782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15786$as_echo_n "checking for resize_term... " >&6; }
15787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015788/* end confdefs.h. */
15789#include <curses.h>
15790int
15791main ()
15792{
15793void *x=resize_term
15794 ;
15795 return 0;
15796}
15797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015798if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015799
Matthias Kloseb9621712010-04-24 17:59:49 +000015800$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015801
Matthias Kloseb159a552010-04-25 21:00:44 +000015802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015803$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015804else
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15806$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015807
15808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15810
Matthias Kloseb9621712010-04-24 17:59:49 +000015811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15812$as_echo_n "checking for resizeterm... " >&6; }
15813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015814/* end confdefs.h. */
15815#include <curses.h>
15816int
15817main ()
15818{
15819void *x=resizeterm
15820 ;
15821 return 0;
15822}
15823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015824if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015825
Matthias Kloseb9621712010-04-24 17:59:49 +000015826$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015827
Matthias Kloseb159a552010-04-25 21:00:44 +000015828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015829$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015830else
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15832$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015833
15834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015836
15837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15838$as_echo_n "checking for immedok... " >&6; }
15839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15840/* end confdefs.h. */
15841#include <curses.h>
15842int
15843main ()
15844{
15845
15846#ifndef immedok
15847void *x=immedok
15848#endif
15849
15850 ;
15851 return 0;
15852}
15853_ACEOF
15854if ac_fn_c_try_compile "$LINENO"; then :
15855
15856$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15857
15858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15859$as_echo "yes" >&6; }
15860else
15861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15862$as_echo "no" >&6; }
15863
15864fi
15865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15866
15867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15868$as_echo_n "checking for syncok... " >&6; }
15869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15870/* end confdefs.h. */
15871#include <curses.h>
15872int
15873main ()
15874{
15875
15876#ifndef syncok
15877void *x=syncok
15878#endif
15879
15880 ;
15881 return 0;
15882}
15883_ACEOF
15884if ac_fn_c_try_compile "$LINENO"; then :
15885
15886$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15887
15888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15889$as_echo "yes" >&6; }
15890else
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15892$as_echo "no" >&6; }
15893
15894fi
15895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15896
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15898$as_echo_n "checking for wchgat... " >&6; }
15899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900/* end confdefs.h. */
15901#include <curses.h>
15902int
15903main ()
15904{
15905
15906#ifndef wchgat
15907void *x=wchgat
15908#endif
15909
15910 ;
15911 return 0;
15912}
15913_ACEOF
15914if ac_fn_c_try_compile "$LINENO"; then :
15915
15916$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15917
15918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15919$as_echo "yes" >&6; }
15920else
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15922$as_echo "no" >&6; }
15923
15924fi
15925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15926
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15928$as_echo_n "checking for filter... " >&6; }
15929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15930/* end confdefs.h. */
15931#include <curses.h>
15932int
15933main ()
15934{
15935
15936#ifndef filter
15937void *x=filter
15938#endif
15939
15940 ;
15941 return 0;
15942}
15943_ACEOF
15944if ac_fn_c_try_compile "$LINENO"; then :
15945
15946$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15947
15948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15949$as_echo "yes" >&6; }
15950else
15951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15952$as_echo "no" >&6; }
15953
15954fi
15955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15956
15957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15958$as_echo_n "checking for has_key... " >&6; }
15959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15960/* end confdefs.h. */
15961#include <curses.h>
15962int
15963main ()
15964{
15965
15966#ifndef has_key
15967void *x=has_key
15968#endif
15969
15970 ;
15971 return 0;
15972}
15973_ACEOF
15974if ac_fn_c_try_compile "$LINENO"; then :
15975
15976$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15977
15978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15979$as_echo "yes" >&6; }
15980else
15981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15982$as_echo "no" >&6; }
15983
15984fi
15985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15986
15987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15988$as_echo_n "checking for typeahead... " >&6; }
15989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990/* end confdefs.h. */
15991#include <curses.h>
15992int
15993main ()
15994{
15995
15996#ifndef typeahead
15997void *x=typeahead
15998#endif
15999
16000 ;
16001 return 0;
16002}
16003_ACEOF
16004if ac_fn_c_try_compile "$LINENO"; then :
16005
16006$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16007
16008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16009$as_echo "yes" >&6; }
16010else
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16012$as_echo "no" >&6; }
16013
16014fi
16015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16016
16017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16018$as_echo_n "checking for use_env... " >&6; }
16019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16020/* end confdefs.h. */
16021#include <curses.h>
16022int
16023main ()
16024{
16025
16026#ifndef use_env
16027void *x=use_env
16028#endif
16029
16030 ;
16031 return 0;
16032}
16033_ACEOF
16034if ac_fn_c_try_compile "$LINENO"; then :
16035
16036$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16037
16038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16039$as_echo "yes" >&6; }
16040else
16041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16042$as_echo "no" >&6; }
16043
16044fi
16045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016046# last curses configure check
16047CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16050$as_echo "$as_me: checking for device files" >&6;}
16051
16052if test "x$cross_compiling" = xyes; then
16053 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16055$as_echo_n "checking for /dev/ptmx... " >&6; }
16056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16057$as_echo "not set" >&6; }
16058 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16059 fi
16060 if test "${ac_cv_file__dev_ptc+set}" != set; then
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16062$as_echo_n "checking for /dev/ptc... " >&6; }
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16064$as_echo "not set" >&6; }
16065 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16066 fi
16067fi
16068
Matthias Kloseb9621712010-04-24 17:59:49 +000016069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16070$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016071if ${ac_cv_file__dev_ptmx+:} false; then :
16072 $as_echo_n "(cached) " >&6
16073else
16074 test "$cross_compiling" = yes &&
16075 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16076if test -r "/dev/ptmx"; then
16077 ac_cv_file__dev_ptmx=yes
16078else
16079 ac_cv_file__dev_ptmx=no
16080fi
16081fi
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16083$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16084if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016085
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016086fi
16087
16088if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016089
Matthias Kloseb9621712010-04-24 17:59:49 +000016090$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016091
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16094$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016095if ${ac_cv_file__dev_ptc+:} false; then :
16096 $as_echo_n "(cached) " >&6
16097else
16098 test "$cross_compiling" = yes &&
16099 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16100if test -r "/dev/ptc"; then
16101 ac_cv_file__dev_ptc=yes
16102else
16103 ac_cv_file__dev_ptc=no
16104fi
16105fi
16106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16107$as_echo "$ac_cv_file__dev_ptc" >&6; }
16108if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016109
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016110fi
16111
16112if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016113
Matthias Kloseb9621712010-04-24 17:59:49 +000016114$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016115
Neal Norwitz865400f2003-03-21 01:42:58 +000016116fi
16117
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016118if test $ac_sys_system = Darwin
16119then
16120 LIBS="$LIBS -framework CoreFoundation"
16121fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016122
Matthias Kloseb9621712010-04-24 17:59:49 +000016123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16124$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016125if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016127else
Matthias Kloseb9621712010-04-24 17:59:49 +000016128 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016129 ac_cv_have_size_t_format="cross -- assuming yes"
16130
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131else
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016133/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016134
Thomas Wouters477c8d52006-05-27 19:21:47 +000016135#include <stdio.h>
16136#include <stddef.h>
16137#include <string.h>
16138
Christian Heimes2c181612007-12-17 20:04:13 +000016139#ifdef HAVE_SYS_TYPES_H
16140#include <sys/types.h>
16141#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016142
16143#ifdef HAVE_SSIZE_T
16144typedef ssize_t Py_ssize_t;
16145#elif SIZEOF_VOID_P == SIZEOF_LONG
16146typedef long Py_ssize_t;
16147#else
16148typedef int Py_ssize_t;
16149#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016150
Christian Heimes2c181612007-12-17 20:04:13 +000016151int main()
16152{
16153 char buffer[256];
16154
Thomas Wouters477c8d52006-05-27 19:21:47 +000016155 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16156 return 1;
16157
Thomas Wouters89f507f2006-12-13 04:49:30 +000016158 if (strcmp(buffer, "123"))
16159 return 1;
16160
16161 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16162 return 1;
16163
16164 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016165 return 1;
16166
16167 return 0;
16168}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016169
Thomas Wouters477c8d52006-05-27 19:21:47 +000016170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016171if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016172 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016173else
Matthias Kloseb9621712010-04-24 17:59:49 +000016174 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16177 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016178fi
16179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16182$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016183if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016184
Matthias Kloseb9621712010-04-24 17:59:49 +000016185$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016186
16187fi
16188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016190#ifdef HAVE_SYS_TYPES_H
16191#include <sys/types.h>
16192#endif
16193#ifdef HAVE_SYS_SOCKET_H
16194#include <sys/socket.h>
16195#endif
16196
Matthias Kloseb9621712010-04-24 17:59:49 +000016197"
Victor Stinnere0be4232011-10-25 13:06:09 +020016198if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016199
Martin v. Löwis11437992002-04-12 09:54:03 +000016200else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016201
Matthias Kloseb9621712010-04-24 17:59:49 +000016202$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016203
16204fi
16205
Michael W. Hudson54241132001-12-07 15:38:26 +000016206
Matthias Kloseb9621712010-04-24 17:59:49 +000016207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16208$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016209if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016210 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016211else
Matthias Kloseb9621712010-04-24 17:59:49 +000016212 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016213 ac_cv_broken_mbstowcs=no
16214else
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016216/* end confdefs.h. */
16217
Stefan Krah19c21392012-11-22 23:47:32 +010016218#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016219#include<stdlib.h>
16220int main() {
16221 size_t len = -1;
16222 const char *str = "text";
16223 len = mbstowcs(NULL, str, 0);
16224 return (len != 4);
16225}
16226
16227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016228if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016229 ac_cv_broken_mbstowcs=no
16230else
Matthias Kloseb9621712010-04-24 17:59:49 +000016231 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016235fi
16236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016237fi
16238
Matthias Kloseb9621712010-04-24 17:59:49 +000016239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16240$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016241if test "$ac_cv_broken_mbstowcs" = yes
16242then
16243
Matthias Kloseb9621712010-04-24 17:59:49 +000016244$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016245
16246fi
16247
Antoine Pitroub52ec782009-01-25 16:34:23 +000016248# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16250$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016251
16252# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016253if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016254 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016255if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016256then
16257
Matthias Kloseb9621712010-04-24 17:59:49 +000016258$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016259
Matthias Kloseb9621712010-04-24 17:59:49 +000016260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16261$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016262fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016263if test "$withval" = no
16264then
16265
16266$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16267
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16269$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016270fi
16271
Antoine Pitrou042b1282010-08-13 21:15:58 +000016272else
16273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16274$as_echo "no value specified" >&6; }
16275fi
16276
Antoine Pitroub52ec782009-01-25 16:34:23 +000016277
Matthias Kloseb17289e2012-03-15 19:51:34 +010016278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16279$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16280if ${ac_cv_computed_gotos+:} false; then :
16281 $as_echo_n "(cached) " >&6
16282else
16283 if test "$cross_compiling" = yes; then :
16284 if test "${with_computed_gotos+set}" = set; then
16285 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16286 else
16287 ac_cv_computed_gotos=no
16288 fi
16289else
16290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16291/* end confdefs.h. */
16292
16293int main(int argc, char **argv)
16294{
16295 static void *targets[1] = { &&LABEL1 };
16296 goto LABEL2;
16297LABEL1:
16298 return 0;
16299LABEL2:
16300 goto *targets[0];
16301 return 1;
16302}
16303
16304_ACEOF
16305if ac_fn_c_try_run "$LINENO"; then :
16306 ac_cv_computed_gotos=yes
16307else
16308 ac_cv_computed_gotos=no
16309fi
16310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16311 conftest.$ac_objext conftest.beam conftest.$ac_ext
16312fi
16313
16314fi
16315
16316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16317$as_echo "$ac_cv_computed_gotos" >&6; }
16318case "$ac_cv_computed_gotos" in yes*)
16319
16320$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16321
16322esac
16323
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016324case $ac_sys_system in
16325AIX*)
16326
16327$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16328 ;;
16329esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016330
Michael W. Hudson54241132001-12-07 15:38:26 +000016331
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016332
16333
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016334for h in `(cd $srcdir;echo Python/thread_*.h)`
16335do
16336 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16337done
16338
Michael W. Hudson54241132001-12-07 15:38:26 +000016339
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016340SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16342$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016343for dir in $SRCDIRS; do
16344 if test ! -d $dir; then
16345 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016346 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016347done
Matthias Kloseb9621712010-04-24 17:59:49 +000016348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16349$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016350
Stefan Krah1919b7e2012-03-21 18:25:23 +010016351# Availability of -O2:
16352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16353$as_echo_n "checking for -O2... " >&6; }
16354saved_cflags="$CFLAGS"
16355CFLAGS="-O2"
16356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16357/* end confdefs.h. */
16358
16359int
16360main ()
16361{
16362
16363
16364 ;
16365 return 0;
16366}
16367_ACEOF
16368if ac_fn_c_try_compile "$LINENO"; then :
16369 have_O2=yes
16370else
16371 have_O2=no
16372fi
16373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16375$as_echo "$have_O2" >&6; }
16376CFLAGS="$saved_cflags"
16377
16378# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16379# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16381$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16382saved_cflags="$CFLAGS"
16383CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16384if test "$have_O2" = no; then
16385 CFLAGS=""
16386fi
16387if test "$cross_compiling" = yes; then :
16388 have_glibc_memmove_bug=undefined
16389else
16390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16391/* end confdefs.h. */
16392
16393#include <stdio.h>
16394#include <stdlib.h>
16395#include <string.h>
16396void foo(void *p, void *q) { memmove(p, q, 19); }
16397int main() {
16398 char a[32] = "123456789000000000";
16399 foo(&a[9], a);
16400 if (strcmp(a, "123456789123456789000000000") != 0)
16401 return 1;
16402 foo(a, &a[9]);
16403 if (strcmp(a, "123456789000000000") != 0)
16404 return 1;
16405 return 0;
16406}
16407
16408_ACEOF
16409if ac_fn_c_try_run "$LINENO"; then :
16410 have_glibc_memmove_bug=no
16411else
16412 have_glibc_memmove_bug=yes
16413fi
16414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16415 conftest.$ac_objext conftest.beam conftest.$ac_ext
16416fi
16417
16418CFLAGS="$saved_cflags"
16419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16420$as_echo "$have_glibc_memmove_bug" >&6; }
16421if test "$have_glibc_memmove_bug" = yes; then
16422
16423$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16424
16425fi
16426
16427if test "$have_gcc_asm_for_x87" = yes; then
16428 # Some versions of gcc miscompile inline asm:
16429 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16430 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16431 case $CC in
16432 *gcc*)
16433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16434$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16435 saved_cflags="$CFLAGS"
16436 CFLAGS="-O2"
16437 if test "$cross_compiling" = yes; then :
16438 have_ipa_pure_const_bug=undefined
16439else
16440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16441/* end confdefs.h. */
16442
16443 __attribute__((noinline)) int
16444 foo(int *p) {
16445 int r;
16446 asm ( "movl \$6, (%1)\n\t"
16447 "xorl %0, %0\n\t"
16448 : "=r" (r) : "r" (p) : "memory"
16449 );
16450 return r;
16451 }
16452 int main() {
16453 int p = 8;
16454 if ((foo(&p) ? : p) != 6)
16455 return 1;
16456 return 0;
16457 }
16458
16459_ACEOF
16460if ac_fn_c_try_run "$LINENO"; then :
16461 have_ipa_pure_const_bug=no
16462else
16463 have_ipa_pure_const_bug=yes
16464fi
16465rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16466 conftest.$ac_objext conftest.beam conftest.$ac_ext
16467fi
16468
16469 CFLAGS="$saved_cflags"
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16471$as_echo "$have_ipa_pure_const_bug" >&6; }
16472 if test "$have_ipa_pure_const_bug" = yes; then
16473
16474$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16475
16476 fi
16477 ;;
16478 esac
16479fi
16480
Victor Stinner4f5366e2015-01-09 02:13:19 +010016481# Check for stdatomic.h
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16483$as_echo_n "checking for stdatomic.h... " >&6; }
16484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16485/* end confdefs.h. */
16486
16487
16488 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016489 atomic_int value = ATOMIC_VAR_INIT(1);
16490 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016491 int main() {
16492 int loaded_value = atomic_load(&value);
16493 return 0;
16494 }
16495
16496
16497_ACEOF
16498if ac_fn_c_try_link "$LINENO"; then :
16499 have_stdatomic_h=yes
16500else
16501 have_stdatomic_h=no
16502fi
16503rm -f core conftest.err conftest.$ac_objext \
16504 conftest$ac_exeext conftest.$ac_ext
16505
16506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16507$as_echo "$have_stdatomic_h" >&6; }
16508
16509if test "$have_stdatomic_h" = yes; then
16510
16511$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16512
16513fi
16514
16515# Check for GCC >= 4.7 __atomic builtins
16516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16517$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16519/* end confdefs.h. */
16520
16521
16522 volatile int val = 1;
16523 int main() {
16524 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16525 return 0;
16526 }
16527
16528
16529_ACEOF
16530if ac_fn_c_try_link "$LINENO"; then :
16531 have_builtin_atomic=yes
16532else
16533 have_builtin_atomic=no
16534fi
16535rm -f core conftest.err conftest.$ac_objext \
16536 conftest$ac_exeext conftest.$ac_ext
16537
16538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16539$as_echo "$have_builtin_atomic" >&6; }
16540
16541if test "$have_builtin_atomic" = yes; then
16542
16543$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16544
16545fi
16546
Ned Deily322f5ba2013-11-21 23:01:59 -080016547# ensurepip option
16548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16549$as_echo_n "checking for ensurepip... " >&6; }
16550
16551# Check whether --with-ensurepip was given.
16552if test "${with_ensurepip+set}" = set; then :
16553 withval=$with_ensurepip;
16554else
16555 with_ensurepip=upgrade
16556fi
16557
16558case $with_ensurepip in #(
16559 yes|upgrade) :
16560 ENSUREPIP=upgrade ;; #(
16561 install) :
16562 ENSUREPIP=install ;; #(
16563 no) :
16564 ENSUREPIP=no ;; #(
16565 *) :
16566 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16567esac
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16569$as_echo "$ENSUREPIP" >&6; }
16570
16571
Victor Stinner35a97c02015-03-08 02:59:09 +010016572# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16574$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16576/* end confdefs.h. */
16577
16578
16579 #include <dirent.h>
16580
16581 int main() {
16582 struct dirent entry;
16583 return entry.d_type == DT_UNKNOWN;
16584 }
16585
16586
16587_ACEOF
16588if ac_fn_c_try_link "$LINENO"; then :
16589 have_dirent_d_type=yes
16590else
16591 have_dirent_d_type=no
16592fi
16593rm -f core conftest.err conftest.$ac_objext \
16594 conftest$ac_exeext conftest.$ac_ext
16595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16596$as_echo "$have_dirent_d_type" >&6; }
16597
16598if test "$have_dirent_d_type" = yes; then
16599
16600$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16601
16602fi
16603
Victor Stinner9eb57c52015-03-19 22:21:49 +010016604# check if the Linux getrandom() syscall is available
16605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16606$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16608/* end confdefs.h. */
16609
16610
Victor Stinner1b80b242016-04-12 22:34:58 +020016611 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016612 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016613 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016614
16615 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016616 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016617 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016618 const int flags = GRND_NONBLOCK;
16619 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016620 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016621 return 0;
16622 }
16623
16624
16625_ACEOF
16626if ac_fn_c_try_link "$LINENO"; then :
16627 have_getrandom_syscall=yes
16628else
16629 have_getrandom_syscall=no
16630fi
16631rm -f core conftest.err conftest.$ac_objext \
16632 conftest$ac_exeext conftest.$ac_ext
16633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16634$as_echo "$have_getrandom_syscall" >&6; }
16635
16636if test "$have_getrandom_syscall" = yes; then
16637
16638$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16639
16640fi
16641
Victor Stinner3abf44e2015-09-18 15:38:37 +020016642# check if the getrandom() function is available
16643# the test was written for the Solaris function of <sys/random.h>
16644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16645$as_echo_n "checking for the getrandom() function... " >&6; }
16646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16647/* end confdefs.h. */
16648
16649
16650 #include <sys/random.h>
16651
16652 int main() {
16653 char buffer[1];
16654 const size_t buflen = sizeof(buffer);
16655 const int flags = 0;
16656 /* ignore the result, Python checks for ENOSYS at runtime */
16657 (void)getrandom(buffer, buflen, flags);
16658 return 0;
16659 }
16660
16661
16662_ACEOF
16663if ac_fn_c_try_link "$LINENO"; then :
16664 have_getrandom=yes
16665else
16666 have_getrandom=no
16667fi
16668rm -f core conftest.err conftest.$ac_objext \
16669 conftest$ac_exeext conftest.$ac_ext
16670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16671$as_echo "$have_getrandom" >&6; }
16672
16673if test "$have_getrandom" = yes; then
16674
16675$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16676
16677fi
16678
Christian Heimesff5be6e2018-01-20 13:19:21 +010016679# Check for usable OpenSSL
16680
16681 found=false
16682
16683# Check whether --with-openssl was given.
16684if test "${with_openssl+set}" = set; then :
16685 withval=$with_openssl;
16686 case "$withval" in
16687 "" | y | ye | yes | n | no)
16688 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16689 ;;
16690 *) ssldirs="$withval"
16691 ;;
16692 esac
16693
16694else
16695
16696 # if pkg-config is installed and openssl has installed a .pc file,
16697 # then use that information and don't search ssldirs
16698 if test -n "$ac_tool_prefix"; then
16699 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16700set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16702$as_echo_n "checking for $ac_word... " >&6; }
16703if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16704 $as_echo_n "(cached) " >&6
16705else
16706 if test -n "$PKG_CONFIG"; then
16707 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16708else
16709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16710for as_dir in $PATH
16711do
16712 IFS=$as_save_IFS
16713 test -z "$as_dir" && as_dir=.
16714 for ac_exec_ext in '' $ac_executable_extensions; do
16715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16716 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16718 break 2
16719 fi
16720done
16721 done
16722IFS=$as_save_IFS
16723
16724fi
16725fi
16726PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16727if test -n "$PKG_CONFIG"; then
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16729$as_echo "$PKG_CONFIG" >&6; }
16730else
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16732$as_echo "no" >&6; }
16733fi
16734
16735
16736fi
16737if test -z "$ac_cv_prog_PKG_CONFIG"; then
16738 ac_ct_PKG_CONFIG=$PKG_CONFIG
16739 # Extract the first word of "pkg-config", so it can be a program name with args.
16740set dummy pkg-config; ac_word=$2
16741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16742$as_echo_n "checking for $ac_word... " >&6; }
16743if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16744 $as_echo_n "(cached) " >&6
16745else
16746 if test -n "$ac_ct_PKG_CONFIG"; then
16747 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16748else
16749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16750for as_dir in $PATH
16751do
16752 IFS=$as_save_IFS
16753 test -z "$as_dir" && as_dir=.
16754 for ac_exec_ext in '' $ac_executable_extensions; do
16755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16756 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16758 break 2
16759 fi
16760done
16761 done
16762IFS=$as_save_IFS
16763
16764fi
16765fi
16766ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16767if test -n "$ac_ct_PKG_CONFIG"; then
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16769$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16770else
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16772$as_echo "no" >&6; }
16773fi
16774
16775 if test "x$ac_ct_PKG_CONFIG" = x; then
16776 PKG_CONFIG=""
16777 else
16778 case $cross_compiling:$ac_tool_warned in
16779yes:)
16780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16782ac_tool_warned=yes ;;
16783esac
16784 PKG_CONFIG=$ac_ct_PKG_CONFIG
16785 fi
16786else
16787 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16788fi
16789
16790 if test x"$PKG_CONFIG" != x""; then
16791 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16792 if test $? = 0; then
16793 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16794 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16795 found=true
16796 fi
16797 fi
16798
16799 # no such luck; use some default ssldirs
16800 if ! $found; then
16801 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16802 fi
16803
16804
16805fi
16806
16807
16808
16809 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16810 # an 'openssl' subdirectory
16811
16812 if ! $found; then
16813 OPENSSL_INCLUDES=
16814 for ssldir in $ssldirs; do
16815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16816$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16817 if test -f "$ssldir/include/openssl/ssl.h"; then
16818 OPENSSL_INCLUDES="-I$ssldir/include"
16819 OPENSSL_LDFLAGS="-L$ssldir/lib"
16820 OPENSSL_LIBS="-lssl -lcrypto"
16821 found=true
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16823$as_echo "yes" >&6; }
16824 break
16825 else
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16827$as_echo "no" >&6; }
16828 fi
16829 done
16830
16831 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16832 # it will just work!
16833 fi
16834
16835 # try the preprocessor and linker with our new flags,
16836 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16837
16838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16839$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16840 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16841 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16842
16843 save_LIBS="$LIBS"
16844 save_LDFLAGS="$LDFLAGS"
16845 save_CPPFLAGS="$CPPFLAGS"
16846 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16847 LIBS="$OPENSSL_LIBS $LIBS"
16848 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850/* end confdefs.h. */
16851#include <openssl/ssl.h>
16852int
16853main ()
16854{
16855SSL_new(NULL)
16856 ;
16857 return 0;
16858}
16859_ACEOF
16860if ac_fn_c_try_link "$LINENO"; then :
16861
16862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16863$as_echo "yes" >&6; }
16864 have_openssl=yes
16865
16866else
16867
16868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16869$as_echo "no" >&6; }
16870 have_openssl=no
16871
16872fi
16873rm -f core conftest.err conftest.$ac_objext \
16874 conftest$ac_exeext conftest.$ac_ext
16875 CPPFLAGS="$save_CPPFLAGS"
16876 LDFLAGS="$save_LDFLAGS"
16877 LIBS="$save_LIBS"
16878
16879
16880
16881
16882
16883
16884if test "$have_openssl" = yes; then
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16886$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16887
16888 save_LIBS="$LIBS"
16889 save_LDFLAGS="$LDFLAGS"
16890 save_CPPFLAGS="$CPPFLAGS"
16891 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16892 LIBS="$OPENSSL_LIBS $LIBS"
16893 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16894
16895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16896/* end confdefs.h. */
16897
16898 #include <openssl/x509_vfy.h>
16899
16900int
16901main ()
16902{
16903
16904 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16905 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16906 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16907 X509_VERIFY_PARAM_set_hostflags(p, 0);
16908
16909 ;
16910 return 0;
16911}
16912
16913_ACEOF
16914if ac_fn_c_try_link "$LINENO"; then :
16915
16916 ac_cv_has_x509_verify_param_set1_host=yes
16917
16918else
16919
16920 ac_cv_has_x509_verify_param_set1_host=no
16921
16922fi
16923rm -f core conftest.err conftest.$ac_objext \
16924 conftest$ac_exeext conftest.$ac_ext
16925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16926$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16927 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16928
16929$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16930
16931 fi
16932
16933 CPPFLAGS="$save_CPPFLAGS"
16934 LDFLAGS="$save_LDFLAGS"
16935 LIBS="$save_LIBS"
16936fi
16937
Guido van Rossum627b2d71993-12-24 10:39:16 +000016938# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016939ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016940
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016941ac_config_files="$ac_config_files Modules/ld_so_aix"
16942
Martin v. Löwis11437992002-04-12 09:54:03 +000016943cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016944# This file is a shell script that caches the results of configure
16945# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016946# scripts and configure runs, see configure's option --config-cache.
16947# It is not useful on other systems. If it contains results you don't
16948# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016949#
Martin v. Löwis11437992002-04-12 09:54:03 +000016950# config.status only pays attention to the cache file if you give it
16951# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016952#
Skip Montanaro6dead952003-09-25 14:50:04 +000016953# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016954# loading this file, other *unset* `ac_cv_foo' will be assigned the
16955# following values.
16956
16957_ACEOF
16958
Guido van Rossumf78abae1997-01-21 22:02:36 +000016959# The following way of writing the cache mishandles newlines in values,
16960# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016962# Ultrix sh set writes to stderr and can't be redirected directly,
16963# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964(
16965 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16966 eval ac_val=\$$ac_var
16967 case $ac_val in #(
16968 *${as_nl}*)
16969 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016970 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16971$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972 esac
16973 case $ac_var in #(
16974 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016975 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16976 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977 esac ;;
16978 esac
16979 done
16980
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16983 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 # `set' does not quote correctly, so add quotes: double-quote
16985 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016987 "s/'/'\\\\''/g;
16988 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 *)
16991 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016994 esac |
16995 sort
16996) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016997 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016998 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016999 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017001 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17002 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017003 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17004 :end' >>confcache
17005if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17006 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017007 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017008 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17009$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017010 if test ! -f "$cache_file" || test -h "$cache_file"; then
17011 cat confcache >"$cache_file"
17012 else
17013 case $cache_file in #(
17014 */* | ?:*)
17015 mv -f confcache "$cache_file"$$ &&
17016 mv -f "$cache_file"$$ "$cache_file" ;; #(
17017 *)
17018 mv -f confcache "$cache_file" ;;
17019 esac
17020 fi
17021 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017022 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17024$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017025 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017026fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017027rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017028
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017029test "x$prefix" = xNONE && prefix=$ac_default_prefix
17030# Let make expand exec_prefix.
17031test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017032
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017033DEFS=-DHAVE_CONFIG_H
17034
Skip Montanaro6dead952003-09-25 14:50:04 +000017035ac_libobjs=
17036ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017037U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017038for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17039 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017041 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17043 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017044 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17045 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017046done
17047LIBOBJS=$ac_libobjs
17048
17049LTLIBOBJS=$ac_ltlibobjs
17050
17051
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Matthias Kloseb9621712010-04-24 17:59:49 +000017053
Victor Stinnere0be4232011-10-25 13:06:09 +020017054: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017055ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017056ac_clean_files_save=$ac_clean_files
17057ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017058{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17059$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17060as_write_fail=0
17061cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017062#! $SHELL
17063# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017064# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017065# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017066# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017067
Martin v. Löwis11437992002-04-12 09:54:03 +000017068debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017069ac_cs_recheck=false
17070ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017071
Matthias Kloseb9621712010-04-24 17:59:49 +000017072SHELL=\${CONFIG_SHELL-$SHELL}
17073export SHELL
17074_ASEOF
17075cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17076## -------------------- ##
17077## M4sh Initialization. ##
17078## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080# Be more Bourne compatible
17081DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017082if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017083 emulate sh
17084 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017086 # is contrary to our usage. Disable this feature.
17087 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017089else
Matthias Kloseb9621712010-04-24 17:59:49 +000017090 case `(set -o) 2>/dev/null` in #(
17091 *posix*) :
17092 set -o posix ;; #(
17093 *) :
17094 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017096fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017097
17098
Matthias Kloseb9621712010-04-24 17:59:49 +000017099as_nl='
17100'
17101export as_nl
17102# Printing a long string crashes Solaris 7 /usr/bin/printf.
17103as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17104as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17105as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17106# Prefer a ksh shell builtin over an external printf program on Solaris,
17107# but without wasting forks for bash or zsh.
17108if test -z "$BASH_VERSION$ZSH_VERSION" \
17109 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17110 as_echo='print -r --'
17111 as_echo_n='print -rn --'
17112elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17113 as_echo='printf %s\n'
17114 as_echo_n='printf %s'
17115else
17116 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17117 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17118 as_echo_n='/usr/ucb/echo -n'
17119 else
17120 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17121 as_echo_n_body='eval
17122 arg=$1;
17123 case $arg in #(
17124 *"$as_nl"*)
17125 expr "X$arg" : "X\\(.*\\)$as_nl";
17126 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17127 esac;
17128 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17129 '
17130 export as_echo_n_body
17131 as_echo_n='sh -c $as_echo_n_body as_echo'
17132 fi
17133 export as_echo_body
17134 as_echo='sh -c $as_echo_body as_echo'
17135fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137# The user is always right.
17138if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017139 PATH_SEPARATOR=:
17140 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17141 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17142 PATH_SEPARATOR=';'
17143 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017146
17147# IFS
17148# We need space, tab and new line, in precisely that order. Quoting is
17149# there to prevent editors from complaining about space-tab.
17150# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17151# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152IFS=" "" $as_nl"
17153
17154# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017155as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017156case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157 *[\\/]* ) as_myself=$0 ;;
17158 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017159for as_dir in $PATH
17160do
17161 IFS=$as_save_IFS
17162 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017163 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17164 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167 ;;
17168esac
17169# We did not find ourselves, most probably we were run as `sh COMMAND'
17170# in which case we are not to be found in the path.
17171if test "x$as_myself" = x; then
17172 as_myself=$0
17173fi
17174if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017175 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17176 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177fi
17178
Matthias Kloseb9621712010-04-24 17:59:49 +000017179# Unset variables that we do not need and which cause bugs (e.g. in
17180# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17181# suppresses any "Segmentation fault" message there. '((' could
17182# trigger a bug in pdksh 5.2.14.
17183for as_var in BASH_ENV ENV MAIL MAILPATH
17184do eval test x\${$as_var+set} = xset \
17185 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186done
17187PS1='$ '
17188PS2='> '
17189PS4='+ '
17190
17191# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017192LC_ALL=C
17193export LC_ALL
17194LANGUAGE=C
17195export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196
Matthias Kloseb9621712010-04-24 17:59:49 +000017197# CDPATH.
17198(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17199
17200
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017201# as_fn_error STATUS ERROR [LINENO LOG_FD]
17202# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017203# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17204# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017205# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017206as_fn_error ()
17207{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017208 as_status=$1; test $as_status -eq 0 && as_status=1
17209 if test "$4"; then
17210 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17211 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017212 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017213 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017214 as_fn_exit $as_status
17215} # as_fn_error
17216
17217
17218# as_fn_set_status STATUS
17219# -----------------------
17220# Set $? to STATUS, without forking.
17221as_fn_set_status ()
17222{
17223 return $1
17224} # as_fn_set_status
17225
17226# as_fn_exit STATUS
17227# -----------------
17228# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17229as_fn_exit ()
17230{
17231 set +e
17232 as_fn_set_status $1
17233 exit $1
17234} # as_fn_exit
17235
17236# as_fn_unset VAR
17237# ---------------
17238# Portably unset VAR.
17239as_fn_unset ()
17240{
17241 { eval $1=; unset $1;}
17242}
17243as_unset=as_fn_unset
17244# as_fn_append VAR VALUE
17245# ----------------------
17246# Append the text in VALUE to the end of the definition contained in VAR. Take
17247# advantage of any shell optimizations that allow amortized linear growth over
17248# repeated appends, instead of the typical quadratic growth present in naive
17249# implementations.
17250if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17251 eval 'as_fn_append ()
17252 {
17253 eval $1+=\$2
17254 }'
17255else
17256 as_fn_append ()
17257 {
17258 eval $1=\$$1\$2
17259 }
17260fi # as_fn_append
17261
17262# as_fn_arith ARG...
17263# ------------------
17264# Perform arithmetic evaluation on the ARGs, and store the result in the
17265# global $as_val. Take advantage of shells that can avoid forks. The arguments
17266# must be portable across $(()) and expr.
17267if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17268 eval 'as_fn_arith ()
17269 {
17270 as_val=$(( $* ))
17271 }'
17272else
17273 as_fn_arith ()
17274 {
17275 as_val=`expr "$@" || test $? -eq 1`
17276 }
17277fi # as_fn_arith
17278
17279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280if expr a : '\(a\)' >/dev/null 2>&1 &&
17281 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17282 as_expr=expr
17283else
17284 as_expr=false
17285fi
17286
17287if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17288 as_basename=basename
17289else
17290 as_basename=false
17291fi
17292
Matthias Kloseb9621712010-04-24 17:59:49 +000017293if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17294 as_dirname=dirname
17295else
17296 as_dirname=false
17297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299as_me=`$as_basename -- "$0" ||
17300$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17301 X"$0" : 'X\(//\)$' \| \
17302 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017303$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017304 sed '/^.*\/\([^/][^/]*\)\/*$/{
17305 s//\1/
17306 q
17307 }
17308 /^X\/\(\/\/\)$/{
17309 s//\1/
17310 q
17311 }
17312 /^X\/\(\/\).*/{
17313 s//\1/
17314 q
17315 }
17316 s/.*/./; q'`
17317
Matthias Kloseb9621712010-04-24 17:59:49 +000017318# Avoid depending upon Character Ranges.
17319as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17320as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17321as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17322as_cr_digits='0123456789'
17323as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324
17325ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017326case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017330 xy) ECHO_C='\c';;
17331 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17332 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 esac;;
17334*)
17335 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017337
Martin v. Löwis11437992002-04-12 09:54:03 +000017338rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339if test -d conf$$.dir; then
17340 rm -f conf$$.dir/conf$$.file
17341else
17342 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017343 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017345if (echo >conf$$.file) 2>/dev/null; then
17346 if ln -s conf$$.file conf$$ 2>/dev/null; then
17347 as_ln_s='ln -s'
17348 # ... but there are two gotchas:
17349 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17350 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017351 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017352 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017353 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017354 elif ln conf$$.file conf$$ 2>/dev/null; then
17355 as_ln_s=ln
17356 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017357 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017359else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017360 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017362rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17363rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017364
Matthias Kloseb9621712010-04-24 17:59:49 +000017365
17366# as_fn_mkdir_p
17367# -------------
17368# Create "$as_dir" as a directory, including parents if necessary.
17369as_fn_mkdir_p ()
17370{
17371
17372 case $as_dir in #(
17373 -*) as_dir=./$as_dir;;
17374 esac
17375 test -d "$as_dir" || eval $as_mkdir_p || {
17376 as_dirs=
17377 while :; do
17378 case $as_dir in #(
17379 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17380 *) as_qdir=$as_dir;;
17381 esac
17382 as_dirs="'$as_qdir' $as_dirs"
17383 as_dir=`$as_dirname -- "$as_dir" ||
17384$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17385 X"$as_dir" : 'X\(//\)[^/]' \| \
17386 X"$as_dir" : 'X\(//\)$' \| \
17387 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17388$as_echo X"$as_dir" |
17389 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17390 s//\1/
17391 q
17392 }
17393 /^X\(\/\/\)[^/].*/{
17394 s//\1/
17395 q
17396 }
17397 /^X\(\/\/\)$/{
17398 s//\1/
17399 q
17400 }
17401 /^X\(\/\).*/{
17402 s//\1/
17403 q
17404 }
17405 s/.*/./; q'`
17406 test -d "$as_dir" && break
17407 done
17408 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017409 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017410
17411
17412} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017413if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017414 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017415else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017416 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017417 as_mkdir_p=false
17418fi
17419
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017420
17421# as_fn_executable_p FILE
17422# -----------------------
17423# Test if FILE is an executable regular file.
17424as_fn_executable_p ()
17425{
17426 test -f "$1" && test -x "$1"
17427} # as_fn_executable_p
17428as_test_x='test -x'
17429as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017430
17431# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017432as_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 +000017433
17434# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017435as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017436
17437
Martin v. Löwis11437992002-04-12 09:54:03 +000017438exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017439## ----------------------------------- ##
17440## Main body of $CONFIG_STATUS script. ##
17441## ----------------------------------- ##
17442_ASEOF
17443test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017444
Matthias Kloseb9621712010-04-24 17:59:49 +000017445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17446# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017447# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448# values after options handling.
17449ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017450This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017451generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017452
17453 CONFIG_FILES = $CONFIG_FILES
17454 CONFIG_HEADERS = $CONFIG_HEADERS
17455 CONFIG_LINKS = $CONFIG_LINKS
17456 CONFIG_COMMANDS = $CONFIG_COMMANDS
17457 $ $0 $@
17458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459on `(hostname || uname -n) 2>/dev/null | sed 1q`
17460"
17461
Martin v. Löwis11437992002-04-12 09:54:03 +000017462_ACEOF
17463
Matthias Kloseb9621712010-04-24 17:59:49 +000017464case $ac_config_files in *"
17465"*) set x $ac_config_files; shift; ac_config_files=$*;;
17466esac
17467
17468case $ac_config_headers in *"
17469"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17470esac
17471
17472
17473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017474# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017475config_files="$ac_config_files"
17476config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017479
Matthias Kloseb9621712010-04-24 17:59:49 +000017480cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017481ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017482\`$as_me' instantiates files and other configuration actions
17483from templates according to the current configuration. Unless the files
17484and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017485
Matthias Kloseb9621712010-04-24 17:59:49 +000017486Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017487
17488 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017489 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 --config print configuration, then exit
17491 -q, --quiet, --silent
17492 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 -d, --debug don't remove temporary files
17494 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017495 --file=FILE[:TEMPLATE]
17496 instantiate the configuration file FILE
17497 --header=FILE[:TEMPLATE]
17498 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
17500Configuration files:
17501$config_files
17502
17503Configuration headers:
17504$config_headers
17505
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017506Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17510ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017511ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017512python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017513configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017514 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017515
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017516Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017517This config.status script is free software; the Free Software Foundation
17518gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519
17520ac_pwd='$ac_pwd'
17521srcdir='$srcdir'
17522INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017523MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017524test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017525_ACEOF
17526
Matthias Kloseb9621712010-04-24 17:59:49 +000017527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17528# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017529ac_need_defaults=:
17530while test $# != 0
17531do
17532 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017533 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17535 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017536 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017538 --*=)
17539 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17540 ac_optarg=
17541 ac_shift=:
17542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017544 ac_option=$1
17545 ac_optarg=$2
17546 ac_shift=shift
17547 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 esac
17549
Skip Montanaro6dead952003-09-25 14:50:04 +000017550 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017551 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017552 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17553 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017555 $as_echo "$ac_cs_version"; exit ;;
17556 --config | --confi | --conf | --con | --co | --c )
17557 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 debug=: ;;
17560 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017561 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 case $ac_optarg in
17563 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017564 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017565 esac
17566 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017567 ac_need_defaults=false;;
17568 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017569 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017570 case $ac_optarg in
17571 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17572 esac
17573 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017574 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 --he | --h)
17576 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017577 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017578Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017581 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17582 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17583 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017584
17585 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017586 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017587Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017588
Matthias Kloseb9621712010-04-24 17:59:49 +000017589 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017591
17592 esac
17593 shift
17594done
17595
Skip Montanaro6dead952003-09-25 14:50:04 +000017596ac_configure_extra_args=
17597
17598if $ac_cs_silent; then
17599 exec 6>/dev/null
17600 ac_configure_extra_args="$ac_configure_extra_args --silent"
17601fi
17602
17603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017605if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017606 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 shift
17608 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17609 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017610 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017611 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017612fi
17613
Martin v. Löwis11437992002-04-12 09:54:03 +000017614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616exec 5>>config.log
17617{
17618 echo
17619 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17620## Running $as_me. ##
17621_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017622 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017628
Matthias Kloseb9621712010-04-24 17:59:49 +000017629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630
17631# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017632for ac_config_target in $ac_config_targets
17633do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 case $ac_config_target in
17635 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17636 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17637 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017638 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17639 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017641 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017642 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017643 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644
Victor Stinnere0be4232011-10-25 13:06:09 +020017645 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 esac
17647done
17648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649
Martin v. Löwis11437992002-04-12 09:54:03 +000017650# If the user did not use the arguments to specify the items to instantiate,
17651# then the envvar interface is used. Set only those that are not.
17652# We use the long form for the default assignment because of an extremely
17653# bizarre bug on SunOS 4.1.3.
17654if $ac_need_defaults; then
17655 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17656 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17657fi
17658
Skip Montanaro6dead952003-09-25 14:50:04 +000017659# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017661# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662# Hook for its removal unless debugging.
17663# Note that there is a small window in which the directory will not be cleaned:
17664# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017665$debug ||
17666{
Victor Stinnere0be4232011-10-25 13:06:09 +020017667 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017668 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017669 : "${ac_tmp:=$tmp}"
17670 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017672 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017673}
Martin v. Löwis11437992002-04-12 09:54:03 +000017674# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017675
Martin v. Löwis11437992002-04-12 09:54:03 +000017676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017678 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017679} ||
17680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681 tmp=./conf$$-$RANDOM
17682 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017683} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017684ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017685
Matthias Kloseb9621712010-04-24 17:59:49 +000017686# Set up the scripts for CONFIG_FILES section.
17687# No need to generate them if there are no CONFIG_FILES.
17688# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017690
Matthias Kloseb9621712010-04-24 17:59:49 +000017691
17692ac_cr=`echo X | tr X '\015'`
17693# On cygwin, bash can eat \r inside `` if the user requested igncr.
17694# But we know of no other shell where ac_cr would be empty at this
17695# point, so we can use a bashism as a fallback.
17696if test "x$ac_cr" = x; then
17697 eval ac_cr=\$\'\\r\'
17698fi
17699ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17700if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017701 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017702else
17703 ac_cs_awk_cr=$ac_cr
17704fi
17705
Victor Stinnere0be4232011-10-25 13:06:09 +020017706echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017707_ACEOF
17708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709
Matthias Kloseb9621712010-04-24 17:59:49 +000017710{
17711 echo "cat >conf$$subs.awk <<_ACEOF" &&
17712 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17713 echo "_ACEOF"
17714} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017715 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17716ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717ac_delim='%!_!# '
17718for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017719 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017720 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17723 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 break
17725 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017726 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 else
17728 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730done
Matthias Kloseb9621712010-04-24 17:59:49 +000017731rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732
Matthias Kloseb9621712010-04-24 17:59:49 +000017733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017734cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017736sed -n '
17737h
17738s/^/S["/; s/!.*/"]=/
17739p
17740g
17741s/^[^!]*!//
17742:repl
17743t repl
17744s/'"$ac_delim"'$//
17745t delim
17746:nl
17747h
17748s/\(.\{148\}\)..*/\1/
17749t more1
17750s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17751p
17752n
17753b repl
17754:more1
17755s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17756p
17757g
17758s/.\{148\}//
17759t nl
17760:delim
17761h
17762s/\(.\{148\}\)..*/\1/
17763t more2
17764s/["\\]/\\&/g; s/^/"/; s/$/"/
17765p
17766b
17767:more2
17768s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17769p
17770g
17771s/.\{148\}//
17772t delim
17773' <conf$$subs.awk | sed '
17774/^[^""]/{
17775 N
17776 s/\n//
17777}
17778' >>$CONFIG_STATUS || ac_write_fail=1
17779rm -f conf$$subs.awk
17780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17781_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017782cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017783 for (key in S) S_is_set[key] = 1
17784 FS = ""
17785
17786}
17787{
17788 line = $ 0
17789 nfields = split(line, field, "@")
17790 substed = 0
17791 len = length(field[1])
17792 for (i = 2; i < nfields; i++) {
17793 key = field[i]
17794 keylen = length(key)
17795 if (S_is_set[key]) {
17796 value = S[key]
17797 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17798 len += length(value) + length(field[++i])
17799 substed = 1
17800 } else
17801 len += 1 + keylen
17802 }
17803
17804 print line
17805}
17806
17807_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017809cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17810if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17811 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17812else
17813 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017814fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017815 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017816_ACEOF
17817
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017818# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17819# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820# trailing colons and then remove the whole line if VPATH becomes empty
17821# (actually we leave an empty line to preserve line numbers).
17822if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017823 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17824h
17825s///
17826s/^/:/
17827s/[ ]*$/:/
17828s/:\$(srcdir):/:/g
17829s/:\${srcdir}:/:/g
17830s/:@srcdir@:/:/g
17831s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017833x
17834s/\(=[ ]*\).*/\1/
17835G
17836s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837s/^[^=]*=[ ]*$//
17838}'
17839fi
17840
Matthias Kloseb9621712010-04-24 17:59:49 +000017841cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017842fi # test -n "$CONFIG_FILES"
17843
Matthias Kloseb9621712010-04-24 17:59:49 +000017844# Set up the scripts for CONFIG_HEADERS section.
17845# No need to generate them if there are no CONFIG_HEADERS.
17846# This happens for instance with `./config.status Makefile'.
17847if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017848cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017849BEGIN {
17850_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851
Matthias Kloseb9621712010-04-24 17:59:49 +000017852# Transform confdefs.h into an awk script `defines.awk', embedded as
17853# here-document in config.status, that substitutes the proper values into
17854# config.h.in to produce config.h.
17855
17856# Create a delimiter string that does not exist in confdefs.h, to ease
17857# handling of long lines.
17858ac_delim='%!_!# '
17859for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017860 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17861 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017862 break
17863 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017864 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017865 else
17866 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17867 fi
17868done
17869
17870# For the awk script, D is an array of macro values keyed by name,
17871# likewise P contains macro parameters if any. Preserve backslash
17872# newline sequences.
17873
17874ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17875sed -n '
17876s/.\{148\}/&'"$ac_delim"'/g
17877t rset
17878:rset
17879s/^[ ]*#[ ]*define[ ][ ]*/ /
17880t def
17881d
17882:def
17883s/\\$//
17884t bsnl
17885s/["\\]/\\&/g
17886s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17887D["\1"]=" \3"/p
17888s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17889d
17890:bsnl
17891s/["\\]/\\&/g
17892s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17893D["\1"]=" \3\\\\\\n"\\/p
17894t cont
17895s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17896t cont
17897d
17898:cont
17899n
17900s/.\{148\}/&'"$ac_delim"'/g
17901t clear
17902:clear
17903s/\\$//
17904t bsnlc
17905s/["\\]/\\&/g; s/^/"/; s/$/"/p
17906d
17907:bsnlc
17908s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17909b cont
17910' <confdefs.h | sed '
17911s/'"$ac_delim"'/"\\\
17912"/g' >>$CONFIG_STATUS || ac_write_fail=1
17913
17914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17915 for (key in D) D_is_set[key] = 1
17916 FS = ""
17917}
17918/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17919 line = \$ 0
17920 split(line, arg, " ")
17921 if (arg[1] == "#") {
17922 defundef = arg[2]
17923 mac1 = arg[3]
17924 } else {
17925 defundef = substr(arg[1], 2)
17926 mac1 = arg[2]
17927 }
17928 split(mac1, mac2, "(") #)
17929 macro = mac2[1]
17930 prefix = substr(line, 1, index(line, defundef) - 1)
17931 if (D_is_set[macro]) {
17932 # Preserve the white space surrounding the "#".
17933 print prefix "define", macro P[macro] D[macro]
17934 next
17935 } else {
17936 # Replace #undef with comments. This is necessary, for example,
17937 # in the case of _POSIX_SOURCE, which is predefined and required
17938 # on some systems where configure will not decide to define it.
17939 if (defundef == "undef") {
17940 print "/*", prefix defundef, macro, "*/"
17941 next
17942 }
17943 }
17944}
17945{ print }
17946_ACAWK
17947_ACEOF
17948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017949 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017950fi # test -n "$CONFIG_HEADERS"
17951
17952
17953eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17954shift
17955for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956do
17957 case $ac_tag in
17958 :[FHLC]) ac_mode=$ac_tag; continue;;
17959 esac
17960 case $ac_mode$ac_tag in
17961 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017962 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963 :[FH]-) ac_tag=-:-;;
17964 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17965 esac
17966 ac_save_IFS=$IFS
17967 IFS=:
17968 set x $ac_tag
17969 IFS=$ac_save_IFS
17970 shift
17971 ac_file=$1
17972 shift
17973
17974 case $ac_mode in
17975 :L) ac_source=$1;;
17976 :[FH])
17977 ac_file_inputs=
17978 for ac_f
17979 do
17980 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017981 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982 *) # Look for the file first in the build tree, then in the source tree
17983 # (if the path is not absolute). The absolute path cannot be DOS-style,
17984 # because $ac_f cannot contain `:'.
17985 test -f "$ac_f" ||
17986 case $ac_f in
17987 [\\/$]*) false;;
17988 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17989 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017990 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017992 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17993 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994 done
17995
17996 # Let's still pretend it is `configure' which instantiates (i.e., don't
17997 # use $as_me), people would be surprised to read:
17998 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017999 configure_input='Generated from '`
18000 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18001 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002 if test x"$ac_file" != x-; then
18003 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018004 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18005$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018007 # Neutralize special characters interpreted by sed in replacement strings.
18008 case $configure_input in #(
18009 *\&* | *\|* | *\\* )
18010 ac_sed_conf_input=`$as_echo "$configure_input" |
18011 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18012 *) ac_sed_conf_input=$configure_input;;
18013 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014
18015 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018016 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18017 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018 esac
18019 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018020 esac
18021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018023$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018024 X"$ac_file" : 'X\(//\)[^/]' \| \
18025 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018027$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018028 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18029 s//\1/
18030 q
18031 }
18032 /^X\(\/\/\)[^/].*/{
18033 s//\1/
18034 q
18035 }
18036 /^X\(\/\/\)$/{
18037 s//\1/
18038 q
18039 }
18040 /^X\(\/\).*/{
18041 s//\1/
18042 q
18043 }
18044 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018045 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018046 ac_builddir=.
18047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048case "$ac_dir" in
18049.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18050*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018051 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018052 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018053 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054 case $ac_top_builddir_sub in
18055 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18056 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18057 esac ;;
18058esac
18059ac_abs_top_builddir=$ac_pwd
18060ac_abs_builddir=$ac_pwd$ac_dir_suffix
18061# for backward compatibility:
18062ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018063
18064case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018066 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 ac_top_srcdir=$ac_top_builddir_sub
18068 ac_abs_top_srcdir=$ac_pwd ;;
18069 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071 ac_top_srcdir=$srcdir
18072 ac_abs_top_srcdir=$srcdir ;;
18073 *) # Relative name.
18074 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18075 ac_top_srcdir=$ac_top_build_prefix$srcdir
18076 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018077esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079
Martin v. Löwis11437992002-04-12 09:54:03 +000018080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 case $ac_mode in
18082 :F)
18083 #
18084 # CONFIG_FILE
18085 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018086
18087 case $INSTALL in
18088 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018091 ac_MKDIR_P=$MKDIR_P
18092 case $MKDIR_P in
18093 [\\/$]* | ?:[\\/]* ) ;;
18094 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18095 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018096_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097
Matthias Kloseb9621712010-04-24 17:59:49 +000018098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018099# If the template does not know about datarootdir, expand it.
18100# FIXME: This hack should be removed a few years after 2.60.
18101ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018102ac_sed_dataroot='
18103/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 p
18105 q
18106}
18107/@datadir@/p
18108/@docdir@/p
18109/@infodir@/p
18110/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018111/@mandir@/p'
18112case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113*datarootdir*) ac_datarootdir_seen=yes;;
18114*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18116$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 ac_datarootdir_hack='
18120 s&@datadir@&$datadir&g
18121 s&@docdir@&$docdir&g
18122 s&@infodir@&$infodir&g
18123 s&@localedir@&$localedir&g
18124 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018125 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018126esac
18127_ACEOF
18128
18129# Neutralize VPATH when `$srcdir' = `.'.
18130# Shell code in configure.ac might set extrasub.
18131# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18133ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018134$extrasub
18135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018137:t
18138/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018139s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018140s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018141s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018142s&@srcdir@&$ac_srcdir&;t t
18143s&@abs_srcdir@&$ac_abs_srcdir&;t t
18144s&@top_srcdir@&$ac_top_srcdir&;t t
18145s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18146s&@builddir@&$ac_builddir&;t t
18147s&@abs_builddir@&$ac_abs_builddir&;t t
18148s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18149s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018150s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018151$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018152"
Victor Stinnere0be4232011-10-25 13:06:09 +020018153eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18154 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018157 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18158 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18159 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018161which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018162$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018163which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018164
Victor Stinnere0be4232011-10-25 13:06:09 +020018165 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018167 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18168 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018169 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018170 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018171 ;;
18172 :H)
18173 #
18174 # CONFIG_HEADER
18175 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018177 {
18178 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018179 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18180 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018181 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018182 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018183 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18184$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018185 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018186 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018187 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018188 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018189 fi
18190 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018191 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018192 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018193 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018194 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197
18198 esac
18199
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018200
18201 case $ac_file$ac_mode in
18202 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18203
18204 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205done # for ac_tag
18206
Guido van Rossum627b2d71993-12-24 10:39:16 +000018207
Matthias Kloseb9621712010-04-24 17:59:49 +000018208as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018209_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018210ac_clean_files=$ac_clean_files_save
18211
Matthias Kloseb9621712010-04-24 17:59:49 +000018212test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018213 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018214
Martin v. Löwis11437992002-04-12 09:54:03 +000018215
18216# configure is writing to config.log, and then calls config.status.
18217# config.status does its own redirection, appending to config.log.
18218# Unfortunately, on DOS this fails, as config.log is still kept open
18219# by configure, so config.status won't be able to write to it; its
18220# output is simply discarded. So we exec the FD to /dev/null,
18221# effectively closing config.log, so it can be properly (re)opened and
18222# appended to by config.status. When coming back to configure, we
18223# need to make the FD available again.
18224if test "$no_create" != yes; then
18225 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018226 ac_config_status_args=
18227 test "$silent" = yes &&
18228 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018230 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018231 exec 5>>config.log
18232 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18233 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018234 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018235fi
18236if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18237 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18238$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018239fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018240
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018241
Christian Heimes75ed8902013-11-20 01:11:18 +010018242echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018243if test ! -f Modules/Setup
18244then
18245 cp $srcdir/Modules/Setup.dist Modules/Setup
18246fi
18247
Christian Heimes75ed8902013-11-20 01:11:18 +010018248echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018249if test ! -f Modules/Setup.local
18250then
18251 echo "# Edit this file for local setup changes" >Modules/Setup.local
18252fi
18253
Christian Heimes75ed8902013-11-20 01:11:18 +010018254echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018255$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018256 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018257 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018258mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018259
18260if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18261 echo "" >&6
18262 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018263 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 +000018264 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018265 echo "" >&6
18266 echo "" >&6
18267fi
18268