blob: 1219cb9ffa915ee1290f11adb9bf9abca9d0ef87 [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
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700835with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_libm
837with_libc
838enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800840with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100841with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100842with_ssl_default_suites
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 \
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04001284 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 Deily8c9bb722018-01-30 07:42:14 -05001491 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1492 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001493 --with-framework-name=FRAMEWORK
1494 specify an alternate name of the framework built
1495 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001497 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001503 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001504 --with-lto Enable Link Time Optimization in any build. Disabled
1505 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-doc-strings disable/enable documentation strings
1525 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001526 --with(out)-c-locale-coercion
1527 disable/enable C locale coercion to a UTF-8 based
1528 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001529 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001530 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with-libm=STRING math library
1532 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001533 --with(out)-computed-gotos
1534 Use computed gotos in evaluation loop (enabled by
1535 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001536 --with(out)-ensurepip=[=upgrade]
1537 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001538 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001539 --with-ssl-default-suites=[python|openssl|STRING]
1540 Override default cipher suites string, python: use
1541 Python's preferred selection (default), openssl:
1542 leave OpenSSL's defaults untouched, STRING: use a
1543 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
1545Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001546 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 CC C compiler command
1548 CFLAGS C compiler flags
1549 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1550 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001555 PKG_CONFIG path to pkg-config utility
1556 PKG_CONFIG_PATH
1557 directories to add to pkg-config's search path
1558 PKG_CONFIG_LIBDIR
1559 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Use these variables to override the choices made by `configure' or to help
1562it to find libraries and programs with nonstandard names/locations.
1563
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001564Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001567fi
1568
1569if test "$ac_init_help" = "recursive"; then
1570 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 test -d "$ac_dir" ||
1573 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1574 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 ac_builddir=.
1576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577case "$ac_dir" in
1578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 case $ac_top_builddir_sub in
1584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1586 esac ;;
1587esac
1588ac_abs_top_builddir=$ac_pwd
1589ac_abs_builddir=$ac_pwd$ac_dir_suffix
1590# for backward compatibility:
1591ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$ac_top_builddir_sub
1597 ac_abs_top_srcdir=$ac_pwd ;;
1598 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$srcdir
1601 ac_abs_top_srcdir=$srcdir ;;
1602 *) # Relative name.
1603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1604 ac_top_srcdir=$ac_top_build_prefix$srcdir
1605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001606esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 cd "$ac_dir" || { ac_status=$?; continue; }
1610 # Check for guested configure.
1611 if test -f "$ac_srcdir/configure.gnu"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1614 elif test -f "$ac_srcdir/configure"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 fi || ac_status=$?
1620 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 done
1622fi
1623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001625if $ac_init_version; then
1626 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001627python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001628generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001629
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001631This configure script is free software; the Free Software Foundation
1632gives unlimited permission to copy, distribute and modify it.
1633_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001636
1637## ------------------------ ##
1638## Autoconf initialization. ##
1639## ------------------------ ##
1640
1641# ac_fn_c_try_compile LINENO
1642# --------------------------
1643# Try to compile conftest.$ac_ext, and return whether this succeeded.
1644ac_fn_c_try_compile ()
1645{
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 rm -f conftest.$ac_objext
1648 if { { ac_try="$ac_compile"
1649case "(($ac_try" in
1650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1651 *) ac_try_echo=$ac_try;;
1652esac
1653eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1654$as_echo "$ac_try_echo"; } >&5
1655 (eval "$ac_compile") 2>conftest.err
1656 ac_status=$?
1657 if test -s conftest.err; then
1658 grep -v '^ *+' conftest.err >conftest.er1
1659 cat conftest.er1 >&5
1660 mv -f conftest.er1 conftest.err
1661 fi
1662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1663 test $ac_status = 0; } && {
1664 test -z "$ac_c_werror_flag" ||
1665 test ! -s conftest.err
1666 } && test -s conftest.$ac_objext; then :
1667 ac_retval=0
1668else
1669 $as_echo "$as_me: failed program was:" >&5
1670sed 's/^/| /' conftest.$ac_ext >&5
1671
1672 ac_retval=1
1673fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001674 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 as_fn_set_status $ac_retval
1676
1677} # ac_fn_c_try_compile
1678
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001679# ac_fn_c_try_cpp LINENO
1680# ----------------------
1681# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1682ac_fn_c_try_cpp ()
1683{
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1685 if { { ac_try="$ac_cpp conftest.$ac_ext"
1686case "(($ac_try" in
1687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1688 *) ac_try_echo=$ac_try;;
1689esac
1690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1691$as_echo "$ac_try_echo"; } >&5
1692 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1693 ac_status=$?
1694 if test -s conftest.err; then
1695 grep -v '^ *+' conftest.err >conftest.er1
1696 cat conftest.er1 >&5
1697 mv -f conftest.er1 conftest.err
1698 fi
1699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1700 test $ac_status = 0; } > conftest.i && {
1701 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1702 test ! -s conftest.err
1703 }; then :
1704 ac_retval=0
1705else
1706 $as_echo "$as_me: failed program was:" >&5
1707sed 's/^/| /' conftest.$ac_ext >&5
1708
1709 ac_retval=1
1710fi
1711 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1712 as_fn_set_status $ac_retval
1713
1714} # ac_fn_c_try_cpp
1715
Matthias Kloseb9621712010-04-24 17:59:49 +00001716# ac_fn_c_try_link LINENO
1717# -----------------------
1718# Try to link conftest.$ac_ext, and return whether this succeeded.
1719ac_fn_c_try_link ()
1720{
1721 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1722 rm -f conftest.$ac_objext conftest$ac_exeext
1723 if { { ac_try="$ac_link"
1724case "(($ac_try" in
1725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726 *) ac_try_echo=$ac_try;;
1727esac
1728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1729$as_echo "$ac_try_echo"; } >&5
1730 (eval "$ac_link") 2>conftest.err
1731 ac_status=$?
1732 if test -s conftest.err; then
1733 grep -v '^ *+' conftest.err >conftest.er1
1734 cat conftest.er1 >&5
1735 mv -f conftest.er1 conftest.err
1736 fi
1737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1738 test $ac_status = 0; } && {
1739 test -z "$ac_c_werror_flag" ||
1740 test ! -s conftest.err
1741 } && test -s conftest$ac_exeext && {
1742 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001743 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 }; then :
1745 ac_retval=0
1746else
1747 $as_echo "$as_me: failed program was:" >&5
1748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751fi
1752 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1753 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1754 # interfere with the next link command; also delete a directory that is
1755 # left behind by Apple's compiler. We do this before executing the actions.
1756 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001757 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001758 as_fn_set_status $ac_retval
1759
1760} # ac_fn_c_try_link
1761
Matthias Kloseb9621712010-04-24 17:59:49 +00001762# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1763# -------------------------------------------------------
1764# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1765# the include files in INCLUDES and setting the cache variable VAR
1766# accordingly.
1767ac_fn_c_check_header_mongrel ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001770 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1772$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001773if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 $as_echo_n "(cached) " >&6
1775fi
1776eval ac_res=\$$3
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1778$as_echo "$ac_res" >&6; }
1779else
1780 # Is the header compilable?
1781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1782$as_echo_n "checking $2 usability... " >&6; }
1783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1784/* end confdefs.h. */
1785$4
1786#include <$2>
1787_ACEOF
1788if ac_fn_c_try_compile "$LINENO"; then :
1789 ac_header_compiler=yes
1790else
1791 ac_header_compiler=no
1792fi
1793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1795$as_echo "$ac_header_compiler" >&6; }
1796
1797# Is the header present?
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1799$as_echo_n "checking $2 presence... " >&6; }
1800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1801/* end confdefs.h. */
1802#include <$2>
1803_ACEOF
1804if ac_fn_c_try_cpp "$LINENO"; then :
1805 ac_header_preproc=yes
1806else
1807 ac_header_preproc=no
1808fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001809rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1811$as_echo "$ac_header_preproc" >&6; }
1812
1813# So? What about this header?
1814case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1815 yes:no: )
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1817$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1819$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1820 ;;
1821 no:yes:* )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1823$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1825$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1827$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1829$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1831$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001832( $as_echo "## --------------------------------------- ##
1833## Report this to https://bugs.python.org/ ##
1834## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001835 ) | sed "s/^/$as_me: WARNING: /" >&2
1836 ;;
1837esac
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1839$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001840if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 $as_echo_n "(cached) " >&6
1842else
1843 eval "$3=\$ac_header_compiler"
1844fi
1845eval ac_res=\$$3
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1847$as_echo "$ac_res" >&6; }
1848fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001849 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001850
1851} # ac_fn_c_check_header_mongrel
1852
1853# ac_fn_c_try_run LINENO
1854# ----------------------
1855# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1856# that executables *can* be run.
1857ac_fn_c_try_run ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1860 if { { ac_try="$ac_link"
1861case "(($ac_try" in
1862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863 *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867 (eval "$ac_link") 2>&5
1868 ac_status=$?
1869 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1871 { { case "(($ac_try" in
1872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1873 *) ac_try_echo=$ac_try;;
1874esac
1875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1876$as_echo "$ac_try_echo"; } >&5
1877 (eval "$ac_try") 2>&5
1878 ac_status=$?
1879 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1880 test $ac_status = 0; }; }; then :
1881 ac_retval=0
1882else
1883 $as_echo "$as_me: program exited with status $ac_status" >&5
1884 $as_echo "$as_me: failed program was:" >&5
1885sed 's/^/| /' conftest.$ac_ext >&5
1886
1887 ac_retval=$ac_status
1888fi
1889 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001890 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 as_fn_set_status $ac_retval
1892
1893} # ac_fn_c_try_run
1894
1895# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1896# -------------------------------------------------------
1897# Tests whether HEADER exists and can be compiled using the include files in
1898# INCLUDES, setting the cache variable VAR accordingly.
1899ac_fn_c_check_header_compile ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1903$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001904if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905 $as_echo_n "(cached) " >&6
1906else
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910#include <$2>
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913 eval "$3=yes"
1914else
1915 eval "$3=no"
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1918fi
1919eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001923
1924} # ac_fn_c_check_header_compile
1925
Matthias Kloseb9621712010-04-24 17:59:49 +00001926# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1927# -------------------------------------------
1928# Tests whether TYPE exists after having included INCLUDES, setting cache
1929# variable VAR accordingly.
1930ac_fn_c_check_type ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001935if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=no"
1939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1940/* end confdefs.h. */
1941$4
1942int
1943main ()
1944{
1945if (sizeof ($2))
1946 return 0;
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
1956main ()
1957{
1958if (sizeof (($2)))
1959 return 0;
1960 ;
1961 return 0;
1962}
1963_ACEOF
1964if ac_fn_c_try_compile "$LINENO"; then :
1965
1966else
1967 eval "$3=yes"
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973eval ac_res=\$$3
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1975$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001976 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978} # ac_fn_c_check_type
1979
Matthias Kloseb9621712010-04-24 17:59:49 +00001980# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1981# --------------------------------------------
1982# Tries to find the compile-time value of EXPR in a program that includes
1983# INCLUDES, setting VAR accordingly. Returns whether the value could be
1984# computed
1985ac_fn_c_compute_int ()
1986{
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 if test "$cross_compiling" = yes; then
1989 # Depending upon the size, compute the lo and hi bounds.
1990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$4
1993int
1994main ()
1995{
1996static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001997test_array [0] = 0;
1998return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005 ac_lo=0 ac_mid=0
2006 while :; do
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002014test_array [0] = 0;
2015return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_hi=$ac_mid; break
2023else
2024 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2025 if test $ac_lo -le $ac_mid; then
2026 ac_lo= ac_hi=
2027 break
2028 fi
2029 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032 done
2033else
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002041test_array [0] = 0;
2042return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 ac_hi=-1 ac_mid=-1
2050 while :; do
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$4
2054int
2055main ()
2056{
2057static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002058test_array [0] = 0;
2059return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_lo=$ac_mid; break
2067else
2068 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2069 if test $ac_mid -le $ac_hi; then
2070 ac_lo= ac_hi=
2071 break
2072 fi
2073 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076 done
2077else
2078 ac_lo= ac_hi=
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083# Binary search between lo and hi bounds.
2084while test "x$ac_lo" != "x$ac_hi"; do
2085 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2087/* end confdefs.h. */
2088$4
2089int
2090main ()
2091{
2092static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002093test_array [0] = 0;
2094return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002095
2096 ;
2097 return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101 ac_hi=$ac_mid
2102else
2103 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2104fi
2105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2106done
2107case $ac_lo in #((
2108?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2109'') ac_retval=1 ;;
2110esac
2111 else
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115static long int longval () { return $2; }
2116static unsigned long int ulongval () { return $2; }
2117#include <stdio.h>
2118#include <stdlib.h>
2119int
2120main ()
2121{
2122
2123 FILE *f = fopen ("conftest.val", "w");
2124 if (! f)
2125 return 1;
2126 if (($2) < 0)
2127 {
2128 long int i = longval ();
2129 if (i != ($2))
2130 return 1;
2131 fprintf (f, "%ld", i);
2132 }
2133 else
2134 {
2135 unsigned long int i = ulongval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%lu", i);
2139 }
2140 /* Do not output a trailing newline, as this causes \r\n confusion
2141 on some platforms. */
2142 return ferror (f) || fclose (f) != 0;
2143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_run "$LINENO"; then :
2149 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2150else
2151 ac_retval=1
2152fi
2153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2154 conftest.$ac_objext conftest.beam conftest.$ac_ext
2155rm -f conftest.val
2156
2157 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002158 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002159 as_fn_set_status $ac_retval
2160
2161} # ac_fn_c_compute_int
2162
2163# ac_fn_c_check_func LINENO FUNC VAR
2164# ----------------------------------
2165# Tests whether FUNC exists, setting the cache variable VAR accordingly
2166ac_fn_c_check_func ()
2167{
2168 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2170$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002171if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002172 $as_echo_n "(cached) " >&6
2173else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175/* end confdefs.h. */
2176/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2177 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2178#define $2 innocuous_$2
2179
2180/* System header to define __stub macros and hopefully few prototypes,
2181 which can conflict with char $2 (); below.
2182 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2183 <limits.h> exists even on freestanding compilers. */
2184
2185#ifdef __STDC__
2186# include <limits.h>
2187#else
2188# include <assert.h>
2189#endif
2190
2191#undef $2
2192
2193/* Override any GCC internal prototype to avoid an error.
2194 Use char because int might match the return type of a GCC
2195 builtin and then its argument prototype would still apply. */
2196#ifdef __cplusplus
2197extern "C"
2198#endif
2199char $2 ();
2200/* The GNU C library defines this for functions which it implements
2201 to always fail with ENOSYS. Some functions are actually named
2202 something starting with __ and the normal name is an alias. */
2203#if defined __stub_$2 || defined __stub___$2
2204choke me
2205#endif
2206
2207int
2208main ()
2209{
2210return $2 ();
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_link "$LINENO"; then :
2216 eval "$3=yes"
2217else
2218 eval "$3=no"
2219fi
2220rm -f core conftest.err conftest.$ac_objext \
2221 conftest$ac_exeext conftest.$ac_ext
2222fi
2223eval ac_res=\$$3
2224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2225$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002226 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002227
2228} # ac_fn_c_check_func
2229
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002230# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2231# ---------------------------------------------
2232# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2233# accordingly.
2234ac_fn_c_check_decl ()
2235{
2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237 as_decl_name=`echo $2|sed 's/ *(.*//'`
2238 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2240$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2241if eval \${$3+:} false; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$4
2247int
2248main ()
2249{
2250#ifndef $as_decl_name
2251#ifdef __cplusplus
2252 (void) $as_decl_use;
2253#else
2254 (void) $as_decl_name;
2255#endif
2256#endif
2257
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262if ac_fn_c_try_compile "$LINENO"; then :
2263 eval "$3=yes"
2264else
2265 eval "$3=no"
2266fi
2267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2268fi
2269eval ac_res=\$$3
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2271$as_echo "$ac_res" >&6; }
2272 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2273
2274} # ac_fn_c_check_decl
2275
Matthias Kloseb9621712010-04-24 17:59:49 +00002276# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2277# ----------------------------------------------------
2278# Tries to find if the field MEMBER exists in type AGGR, after including
2279# INCLUDES, setting cache variable VAR accordingly.
2280ac_fn_c_check_member ()
2281{
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2284$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002285if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 $as_echo_n "(cached) " >&6
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290$5
2291int
2292main ()
2293{
2294static $2 ac_aggr;
2295if (ac_aggr.$3)
2296return 0;
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_compile "$LINENO"; then :
2302 eval "$4=yes"
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$5
2307int
2308main ()
2309{
2310static $2 ac_aggr;
2311if (sizeof ac_aggr.$3)
2312return 0;
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$4=yes"
2319else
2320 eval "$4=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326eval ac_res=\$$4
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002330
2331} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002333This file contains any messages produced by compilers while
2334running configure, to aid debugging if configure makes a mistake.
2335
Ned Deily4829bc62016-09-12 17:29:04 -04002336It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002337generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002338
2339 $ $0 $@
2340
2341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002342exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002343{
2344cat <<_ASUNAME
2345## --------- ##
2346## Platform. ##
2347## --------- ##
2348
2349hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2350uname -m = `(uname -m) 2>/dev/null || echo unknown`
2351uname -r = `(uname -r) 2>/dev/null || echo unknown`
2352uname -s = `(uname -s) 2>/dev/null || echo unknown`
2353uname -v = `(uname -v) 2>/dev/null || echo unknown`
2354
2355/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2356/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2357
2358/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2359/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2360/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002362/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2363/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2364/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2365
2366_ASUNAME
2367
2368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2369for as_dir in $PATH
2370do
2371 IFS=$as_save_IFS
2372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002373 $as_echo "PATH: $as_dir"
2374 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377} >&5
2378
2379cat >&5 <<_ACEOF
2380
2381
2382## ----------- ##
2383## Core tests. ##
2384## ----------- ##
2385
2386_ACEOF
2387
2388
2389# Keep a trace of the command line.
2390# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002391# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002392# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002395ac_configure_args0=
2396ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_must_keep_next=false
2398for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002399do
Skip Montanaro6dead952003-09-25 14:50:04 +00002400 for ac_arg
2401 do
2402 case $ac_arg in
2403 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2404 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2405 | -silent | --silent | --silen | --sile | --sil)
2406 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 esac
2410 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002415 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 case $ac_arg in
2418 *=* | --config-cache | -C | -disable-* | --disable-* \
2419 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2420 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2421 | -with-* | --with-* | -without-* | --without-* | --x)
2422 case "$ac_configure_args0 " in
2423 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2424 esac
2425 ;;
2426 -* ) ac_must_keep_next=true ;;
2427 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 ;;
2431 esac
2432 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002433done
Matthias Kloseb9621712010-04-24 17:59:49 +00002434{ ac_configure_args0=; unset ac_configure_args0;}
2435{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437# When interrupted or exit'd, cleanup temporary files, and complete
2438# config.log. We remove comments because anyway the quotes in there
2439# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440# WARNING: Use '\'' to represent an apostrophe within the trap.
2441# 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 +00002442trap 'exit_status=$?
2443 # Save into config.log some information that might help in debugging.
2444 {
2445 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002446
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002447 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002448## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 echo
2451 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452(
2453 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2454 eval ac_val=\$$ac_var
2455 case $ac_val in #(
2456 *${as_nl}*)
2457 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 esac
2461 case $ac_var in #(
2462 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2464 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac ;;
2466 esac
2467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2470 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 "s/'\''/'\''\\\\'\'''\''/g;
2473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2474 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac |
2479 sort
2480)
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002483 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002484## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002498 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_files
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511 fi
2512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002515## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
2520 fi
2521 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 $as_echo "$as_me: caught signal $ac_signal"
2523 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 rm -f core *.core core.conftest.* &&
2526 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002529for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002531done
2532ac_signal=0
2533
2534# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536
Matthias Kloseb9621712010-04-24 17:59:49 +00002537$as_echo "/* confdefs.h */" > confdefs.h
2538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539# Predefined preprocessor variables.
2540
2541cat >>confdefs.h <<_ACEOF
2542#define PACKAGE_NAME "$PACKAGE_NAME"
2543_ACEOF
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_VERSION "$PACKAGE_VERSION"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_STRING "$PACKAGE_STRING"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2559_ACEOF
2560
Matthias Kloseb9621712010-04-24 17:59:49 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_URL "$PACKAGE_URL"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002567# Prefer an explicitly selected file to automatically selected ones.
2568ac_site_file1=NONE
2569ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571 # We do not want a PATH search for config.site.
2572 case $CONFIG_SITE in #((
2573 -*) ac_site_file1=./$CONFIG_SITE;;
2574 */*) ac_site_file1=$CONFIG_SITE;;
2575 *) ac_site_file1=./$CONFIG_SITE;;
2576 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$prefix/share/config.site
2579 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580else
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$ac_default_prefix/share/config.site
2582 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002584for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585do
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 test "x$ac_site_file" = xNONE && continue
2587 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2589$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002591 . "$ac_site_file" \
2592 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2594as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002595See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002596 fi
2597done
2598
2599if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 # Some versions of bash will fail to source /dev/null (special files
2601 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2602 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2604$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2607 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 esac
2609 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610else
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2612$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 >$cache_file
2614fi
2615
2616# Check that the precious variables saved in the cache have kept the same
2617# value.
2618ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2621 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2623 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $ac_old_set,$ac_new_set in
2625 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2627$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 +00002628 ac_cache_corrupted=: ;;
2629 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2631$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_cache_corrupted=: ;;
2633 ,);;
2634 *)
2635 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 # differences in whitespace do not lead to failure.
2637 ac_old_val_w=`echo x $ac_old_val`
2638 ac_new_val_w=`echo x $ac_new_val`
2639 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2641$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2642 ac_cache_corrupted=:
2643 else
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2645$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2646 eval $ac_var=\$ac_old_val
2647 fi
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2649$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2651$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 fi;;
2653 esac
2654 # Pass precious variables to config.status.
2655 if test "$ac_new_set" = set; then
2656 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 *) ac_arg=$ac_var=$ac_new_val ;;
2659 esac
2660 case " $ac_configure_args " in
2661 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 esac
2664 fi
2665done
2666if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2670$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002671 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002673## -------------------- ##
2674## Main body of script. ##
2675## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676
Guido van Rossum7f43da71994-08-01 12:15:30 +00002677ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2681ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682
Guido van Rossum627b2d71993-12-24 10:39:16 +00002683
Michael W. Hudson54241132001-12-07 15:38:26 +00002684
Trent Nelson4d4ec652012-10-16 08:51:24 -04002685
Christian Heimesff5be6e2018-01-20 13:19:21 +01002686
2687
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002688if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689 # If we're building out-of-tree, we need to make sure the following
2690 # resources get picked up before their $srcdir counterparts.
2691 # Objects/ -> typeslots.inc
2692 # Include/ -> Python-ast.h, graminit.h
2693 # Python/ -> importlib.h
2694 # (A side effect of this is that these resources will automatically be
2695 # regenerated when building out-of-tree, regardless of whether or not
2696 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2697 # off.)
2698 BASECPPFLAGS="-IObjects -IInclude -IPython"
2699else
2700 BASECPPFLAGS=""
2701fi
2702
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703
2704
2705
2706
Victor Stinner9ed34a82017-05-02 22:35:58 +02002707if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002709# Extract the first word of "git", so it can be a program name with args.
2710set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 $as_echo_n "(cached) " >&6
2715else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716 if test -n "$HAS_GIT"; then
2717 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002726 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731 done
2732IFS=$as_save_IFS
2733
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002735fi
2736fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737HAS_GIT=$ac_cv_prog_HAS_GIT
2738if test -n "$HAS_GIT"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2740$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743$as_echo "no" >&6; }
2744fi
2745
2746
2747else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002750if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002751then
Miss Islington (bot)2011dd72018-08-20 10:48:31 -04002752 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2753 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2754 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756 GITVERSION=""
2757 GITTAG=""
2758 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759fi
2760
2761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
2764
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002765ac_aux_dir=
2766for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2767 if test -f "$ac_dir/install-sh"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/install-sh -c"
2770 break
2771 elif test -f "$ac_dir/install.sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install.sh -c"
2774 break
2775 elif test -f "$ac_dir/shtool"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/shtool install -c"
2778 break
2779 fi
2780done
2781if test -z "$ac_aux_dir"; then
2782 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2783fi
2784
2785# These three variables are undocumented and unsupported,
2786# and are intended to be withdrawn in a future Autoconf release.
2787# They can cause serious problems if a builder's source tree is in a directory
2788# whose full name contains unusual characters.
2789ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2790ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2791ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2792
2793
2794# Make sure we can run config.sub.
2795$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2796 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2797
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2799$as_echo_n "checking build system type... " >&6; }
2800if ${ac_cv_build+:} false; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 ac_build_alias=$build_alias
2804test "x$ac_build_alias" = x &&
2805 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2806test "x$ac_build_alias" = x &&
2807 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2808ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2810
2811fi
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2813$as_echo "$ac_cv_build" >&6; }
2814case $ac_cv_build in
2815*-*-*) ;;
2816*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2817esac
2818build=$ac_cv_build
2819ac_save_IFS=$IFS; IFS='-'
2820set x $ac_cv_build
2821shift
2822build_cpu=$1
2823build_vendor=$2
2824shift; shift
2825# Remember, the first character of IFS is used to create $*,
2826# except with old shells:
2827build_os=$*
2828IFS=$ac_save_IFS
2829case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2833$as_echo_n "checking host system type... " >&6; }
2834if ${ac_cv_host+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 if test "x$host_alias" = x; then
2838 ac_cv_host=$ac_cv_build
2839else
2840 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2841 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2842fi
2843
2844fi
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2846$as_echo "$ac_cv_host" >&6; }
2847case $ac_cv_host in
2848*-*-*) ;;
2849*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2850esac
2851host=$ac_cv_host
2852ac_save_IFS=$IFS; IFS='-'
2853set x $ac_cv_host
2854shift
2855host_cpu=$1
2856host_vendor=$2
2857shift; shift
2858# Remember, the first character of IFS is used to create $*,
2859# except with old shells:
2860host_os=$*
2861IFS=$ac_save_IFS
2862case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2863
2864
2865
doko@python.orga10e4a92013-01-25 18:45:12 +01002866
2867
Ned Deilyfcbc2462014-08-22 13:32:49 -07002868# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2869rm -f pybuilddir.txt
2870
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002871for ac_prog in python$PACKAGE_VERSION python3 python
2872do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874set dummy $ac_prog; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002877if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878 $as_echo_n "(cached) " >&6
2879else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880 if test -n "$PYTHON_FOR_REGEN"; then
2881 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882else
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002890 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002900PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2901if test -n "$PYTHON_FOR_REGEN"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2903$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
Victor Stinnera5c62a82017-05-03 18:21:48 +02002910 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002912test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914
2915
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002916if test "$cross_compiling" = yes; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2918$as_echo_n "checking for python interpreter for cross build... " >&6; }
2919 if test -z "$PYTHON_FOR_BUILD"; then
2920 for interp in python$PACKAGE_VERSION python3 python; do
2921 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002922 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 +02002923 break
2924 fi
2925 interp=
2926 done
2927 if test x$interp = x; then
2928 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2929 fi
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2931$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002932 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 +02002933 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002934elif test "$cross_compiling" = maybe; then
2935 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002936else
2937 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2938fi
2939
2940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Benjamin Petersond23f8222009-04-05 19:13:16 +00002942if test "$prefix" != "/"; then
2943 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
2948
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002949# We don't use PACKAGE_ variables, and they cause conflicts
2950# with other autoconf-based packages that include Python.h
2951grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2952rm confdefs.h
2953mv confdefs.h.new confdefs.h
2954
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002955
Ned Deily4829bc62016-09-12 17:29:04 -04002956VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002957
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002958# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002959
2960SOVERSION=1.0
2961
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002962# The later defininition of _XOPEN_SOURCE disables certain features
2963# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2964
Matthias Kloseb9621712010-04-24 17:59:49 +00002965$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966
2967
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002968# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2969# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2970# them.
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973
2974
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980
2981
Martin v. Löwisd6320502004-08-12 13:45:08 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002983# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002987
2988
2989
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002990define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002991
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002992# Arguments passed to configure.
2993
2994CONFIG_ARGS="$ac_configure_args"
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2997$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002999if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003001 case $enableval in
3002 yes)
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003003 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003004 # information
3005 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003006 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003007 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003008 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3009 if test ! -d "${enableval}"
3010 then
3011 enableval=/
3012 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003014 ;;
3015 esac
3016 case $enableval in
3017 no)
3018 UNIVERSALSDK=
3019 enable_universalsdk=
3020 ;;
3021 *)
3022 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 if test ! -d "${UNIVERSALSDK}"
3024 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003025 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027 ;;
3028 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003029
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030
Thomas Wouters477c8d52006-05-27 19:21:47 +00003031else
3032
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003036fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038if test -n "${UNIVERSALSDK}"
3039then
Matthias Kloseb9621712010-04-24 17:59:49 +00003040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3041$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042else
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3044$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003048
Ned Deily87adb6e2013-10-18 21:09:56 -07003049ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003050
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051# For backward compatibility reasons we prefer to select '32-bit' if available,
3052# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003053UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054if test "`uname -s`" = "Darwin"
3055then
3056 if test -n "${UNIVERSALSDK}"
3057 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003058 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059 then
3060 UNIVERSAL_ARCHS="intel"
3061 fi
3062 fi
3063fi
3064
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003065
Matthias Kloseb9621712010-04-24 17:59:49 +00003066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3067$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068
3069# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003070if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072 UNIVERSAL_ARCHS="$withval"
3073
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074fi
3075
Ned Deily87adb6e2013-10-18 21:09:56 -07003076if test -n "${UNIVERSALSDK}"
3077then
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3079$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3080else
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3082$as_echo "no" >&6; }
3083fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003085
3086# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003087if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088 withval=$with_framework_name;
3089 PYTHONFRAMEWORK=${withval}
3090 PYTHONFRAMEWORKDIR=${withval}.framework
3091 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3092
3093else
3094
3095 PYTHONFRAMEWORK=Python
3096 PYTHONFRAMEWORKDIR=Python.framework
3097 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3098
3099fi
3100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003101# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003103 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003104 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003105 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003106 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003107 esac
3108 case $enableval in
3109 no)
3110 PYTHONFRAMEWORK=
3111 PYTHONFRAMEWORKDIR=no-framework
3112 PYTHONFRAMEWORKPREFIX=
3113 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003114 FRAMEWORKINSTALLFIRST=
3115 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003116 FRAMEWORKALTINSTALLFIRST=
3117 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003118 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 if test "x${prefix}" = "xNONE"; then
3120 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3121 else
3122 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3123 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003124 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003125 ;;
3126 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003127 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003130 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003131 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3132 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003135
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 if test "x${prefix}" = "xNONE" ; then
3137 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 else
3140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3141 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
3143 case "${enableval}" in
3144 /System*)
3145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3146 if test "${prefix}" = "NONE" ; then
3147 # See below
3148 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3149 fi
3150 ;;
3151
3152 /Library*)
3153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3154 ;;
3155
3156 */Library/Frameworks)
3157 MDIR="`dirname "${enableval}"`"
3158 MDIR="`dirname "${MDIR}"`"
3159 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3160
3161 if test "${prefix}" = "NONE"; then
3162 # User hasn't specified the
3163 # --prefix option, but wants to install
3164 # the framework in a non-default location,
3165 # ensure that the compatibility links get
3166 # installed relative to that prefix as well
3167 # instead of in /usr/local.
3168 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3169 fi
3170 ;;
3171
3172 *)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175 esac
3176
Jack Jansen127e56e2001-09-11 14:41:54 +00003177 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003178
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003179 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003180 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003181 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003185 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3186
3187 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3188
Jack Jansene578a632001-08-15 01:27:14 +00003189 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003190
Guido van Rossum563e7081996-09-10 18:20:48 +00003191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192
Jack Jansene578a632001-08-15 01:27:14 +00003193 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003194 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003195 PYTHONFRAMEWORKPREFIX=
3196 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197 FRAMEWORKINSTALLFIRST=
3198 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 FRAMEWORKALTINSTALLFIRST=
3200 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003201 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 if test "x${prefix}" = "xNONE" ; then
3203 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3204 else
3205 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3206 fi
Jack Jansene578a632001-08-15 01:27:14 +00003207 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003208
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003210fi
3211
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212
3213
Michael W. Hudson54241132001-12-07 15:38:26 +00003214
3215
3216
3217
Jack Jansene578a632001-08-15 01:27:14 +00003218
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219
3220
3221
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003222
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003223
Ned Deilyb8f944f2013-11-21 22:42:25 -08003224
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003225
3226cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003227#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003228_ACEOF
3229
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003232## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003233## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003234##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003235# Set name for machine-dependent library files
3236
Matthias Kloseb9621712010-04-24 17:59:49 +00003237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3238$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239if test -z "$MACHDEP"
3240then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003241 # avoid using uname for cross builds
3242 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003243 # ac_sys_system and ac_sys_release are used for setting
3244 # a lot of different things including 'define_xopen_source'
3245 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003247 *-*-linux-android*)
3248 ac_sys_system=Linux-android
3249 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 *-*-linux*)
3251 ac_sys_system=Linux
3252 ;;
3253 *-*-cygwin*)
3254 ac_sys_system=Cygwin
3255 ;;
3256 *)
3257 # for now, limit cross builds to known configurations
3258 MACHDEP="unknown"
3259 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3260 esac
3261 ac_sys_release=
3262 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003264 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003265 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 fi
3271 ac_md_system=`echo $ac_sys_system |
3272 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3273 ac_md_release=`echo $ac_sys_release |
3274 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3275 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003276
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003278 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003279 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003280 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003281 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003283fi
Guido van Rossum91922671997-10-09 20:24:13 +00003284
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003285
3286if test "$cross_compiling" = yes; then
3287 case "$host" in
3288 *-*-linux*)
3289 case "$host_cpu" in
3290 arm*)
3291 _host_cpu=arm
3292 ;;
3293 *)
3294 _host_cpu=$host_cpu
3295 esac
3296 ;;
3297 *-*-cygwin*)
3298 _host_cpu=
3299 ;;
3300 *)
3301 # for now, limit cross builds to known configurations
3302 MACHDEP="unknown"
3303 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3304 esac
3305 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3306fi
3307
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003308# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3309# disable features if it is defined, without any means to access these
3310# features as extensions. For these systems, we skip the definition of
3311# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3312# some feature, make sure there is no alternative way to access this
3313# feature. Also, when using wildcards, make sure you have verified the
3314# need for not defining _XOPEN_SOURCE on all systems matching the
3315# wildcard, and that the wildcard does not include future systems
3316# (which may remove their limitations).
3317case $ac_sys_system/$ac_sys_release in
3318 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3319 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003320 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003321 # In addition, Stefan Krah confirms that issue #1244610 exists through
3322 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003323 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003324 define_xopen_source=no
3325 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3326 # also defined. This can be overridden by defining _BSD_SOURCE
3327 # As this has a different meaning on Linux, only define it on OpenBSD
3328
Matthias Kloseb9621712010-04-24 17:59:49 +00003329$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003330
3331 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003332 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3334 # also defined. This can be overridden by defining _BSD_SOURCE
3335 # As this has a different meaning on Linux, only define it on OpenBSD
3336
Matthias Kloseb9621712010-04-24 17:59:49 +00003337$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003338
3339 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003340 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3341 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3342 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003343 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 +00003344 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003345 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3346 # request to enable features supported by the standard as a request
3347 # to disable features not supported by the standard. The best way
3348 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3349 # entirely and define __EXTENSIONS__ instead.
3350 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003351 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003352 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3353 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003354 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003355 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 define_xopen_source=no;;
3357 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003358 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003360 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003361 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3362 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3363 # identifies itself as Darwin/7.*
3364 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3365 # disables platform specific features beyond repair.
3366 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3367 # has no effect, don't bother defining them
3368 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003369 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003370 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003371 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003372 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3373 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3374 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003375 AIX/4)
3376 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003377 AIX/5)
3378 if test `uname -r` -eq 1; then
3379 define_xopen_source=no
3380 fi
3381 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003382 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3383 # defining NI_NUMERICHOST.
3384 QNX/6.3.2)
3385 define_xopen_source=no
3386 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003387
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003388esac
3389
3390if test $define_xopen_source = yes
3391then
Victor Stinner14d098d2011-09-07 22:29:43 +02003392 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
Victor Stinner14d098d2011-09-07 22:29:43 +02003394$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003395
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003396
3397 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3398 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3399 # several APIs are not declared. Since this is also needed in some
3400 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Matthias Kloseb9621712010-04-24 17:59:49 +00003402$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
3404
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003405
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003406$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408fi
3409
Christian Heimes647cd872013-12-07 23:39:33 +01003410# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3411case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003412 hp*|HP*)
3413 define_stdc_a1=yes;;
3414 *)
3415 define_stdc_a1=no;;
3416esac
3417
3418if test $define_stdc_a1 = yes
3419then
Christian Heimes647cd872013-12-07 23:39:33 +01003420
3421$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3422
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423fi
Christian Heimes647cd872013-12-07 23:39:33 +01003424
Jack Jansen6b08a402004-06-03 12:41:45 +00003425# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3426# it may influence the way we can build extensions, so distutils
3427# needs to check it
3428
Thomas Wouters477c8d52006-05-27 19:21:47 +00003429
Jack Jansen6b08a402004-06-03 12:41:45 +00003430CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003431EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003432
Guido van Rossum627b2d71993-12-24 10:39:16 +00003433# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003434
3435# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3436# for debug/optimization stuff. BASECFLAGS is for flags that are required
3437# just to get things to compile and link. Users are free to override OPT
3438# when running configure or make. The build should not break if they do.
3439# BASECFLAGS should generally not be messed with, however.
3440
3441# XXX shouldn't some/most/all of this code be merged with the stuff later
3442# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3444$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003446# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003447if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003449 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003450 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003451 without_gcc=yes;;
3452 yes) CC=gcc
3453 without_gcc=no;;
3454 *) CC=$withval
3455 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003456 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003457else
Martin v. Löwis11437992002-04-12 09:54:03 +00003458
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003459 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003460 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003461 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003462 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003463 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464fi
3465
Matthias Kloseb9621712010-04-24 17:59:49 +00003466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3467$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003468
Zachary Ware5af85642015-12-21 12:09:17 -06003469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3470$as_echo_n "checking for --with-icc... " >&6; }
3471
3472# Check whether --with-icc was given.
3473if test "${with_icc+set}" = set; then :
3474 withval=$with_icc;
3475 case $withval in
3476 no) CC=${CC:-cc}
3477 with_icc=no;;
3478 yes) CC=icc
3479 CXX=icpc
3480 with_icc=yes;;
3481 *) CC=$withval
3482 with_icc=$withval;;
3483 esac
3484else
3485
3486 with_icc=no
3487fi
3488
3489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3490$as_echo "$with_icc" >&6; }
3491
Guido van Rossum8b131c51995-03-09 14:10:13 +00003492# If the user switches compilers, we can't believe the cache
3493if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3494then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003495 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003496(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003497fi
3498
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003499# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3500# when the compiler supports them, but we don't always want -O2, and
3501# we set -g later.
3502if test -z "$CFLAGS"; then
3503 CFLAGS=
3504fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003505
3506if test "$ac_sys_system" = "Darwin"
3507then
3508 # Compiler selection on MacOSX is more complicated than
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003509 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003510 # information
3511 if test -z "${CC}"
3512 then
3513 found_gcc=
3514 found_clang=
3515 as_save_IFS=$IFS; IFS=:
3516 for as_dir in $PATH
3517 do
3518 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003519 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003520 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003521 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003522 fi
3523 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003524 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003526 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003527 fi
3528 fi
3529 done
3530 IFS=$as_save_IFS
3531
3532 if test -n "$found_gcc" -a -n "$found_clang"
3533 then
3534 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3537$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3538 CC="$found_clang"
3539 CXX="$found_clang++"
3540 fi
3541
3542
3543 elif test -z "$found_gcc" -a -n "$found_clang"
3544 then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3546$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3547 CC="$found_clang"
3548 CXX="$found_clang++"
3549
3550 elif test -z "$found_gcc" -a -z "$found_clang"
3551 then
3552 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3553 if test -n "${found_clang}"
3554 then
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3556$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3557 CC="${found_clang}"
3558 CXX="`/usr/bin/xcrun -find clang++`"
3559
3560 # else: use default behaviour
3561 fi
3562 fi
3563 fi
3564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003565ac_ext=c
3566ac_cpp='$CPP $CPPFLAGS'
3567ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3568ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3569ac_compiler_gnu=$ac_cv_c_compiler_gnu
3570if test -n "$ac_tool_prefix"; then
3571 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3572set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3574$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003575if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003576 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003577else
3578 if test -n "$CC"; then
3579 ac_cv_prog_CC="$CC" # Let the user override the test.
3580else
Martin v. Löwis11437992002-04-12 09:54:03 +00003581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3582for as_dir in $PATH
3583do
3584 IFS=$as_save_IFS
3585 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 $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 +00003590 break 2
3591 fi
3592done
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003595
Jack Jansendd19cf82001-12-06 22:36:17 +00003596fi
3597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003598CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003599if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3601$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003602else
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3604$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605fi
3606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609if test -z "$ac_cv_prog_CC"; then
3610 ac_ct_CC=$CC
3611 # Extract the first word of "gcc", so it can be a program name with args.
3612set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3614$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003615if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003617else
3618 if test -n "$ac_ct_CC"; then
3619 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3620else
3621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH
3623do
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $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 +00003630 break 2
3631 fi
3632done
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003635
3636fi
3637fi
3638ac_ct_CC=$ac_cv_prog_ac_ct_CC
3639if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3641$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3644$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645fi
3646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003647 if test "x$ac_ct_CC" = x; then
3648 CC=""
3649 else
3650 case $cross_compiling:$ac_tool_warned in
3651yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3653$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654ac_tool_warned=yes ;;
3655esac
3656 CC=$ac_ct_CC
3657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
3659 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003660fi
3661
Jack Jansendd19cf82001-12-06 22:36:17 +00003662if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 if test -n "$ac_tool_prefix"; then
3664 # 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 +00003665set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3667$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003668if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003669 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003670else
3671 if test -n "$CC"; then
3672 ac_cv_prog_CC="$CC" # Let the user override the test.
3673else
Martin v. Löwis11437992002-04-12 09:54:03 +00003674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3675for as_dir in $PATH
3676do
3677 IFS=$as_save_IFS
3678 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 $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 +00003683 break 2
3684 fi
3685done
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003687IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003688
3689fi
3690fi
3691CC=$ac_cv_prog_CC
3692if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3694$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003695else
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3697$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698fi
3699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003702fi
3703if test -z "$CC"; then
3704 # Extract the first word of "cc", so it can be a program name with args.
3705set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003708if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003710else
3711 if test -n "$CC"; then
3712 ac_cv_prog_CC="$CC" # Let the user override the test.
3713else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003714 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716for as_dir in $PATH
3717do
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3723 ac_prog_rejected=yes
3724 continue
3725 fi
3726 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $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 +00003728 break 2
3729 fi
3730done
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003734if test $ac_prog_rejected = yes; then
3735 # We found a bogon in the path, so make sure we never use it.
3736 set dummy $ac_cv_prog_CC
3737 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003738 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739 # We chose a different compiler from the bogus one.
3740 # However, it has the same basename, so the bogon will be chosen
3741 # first if we set CC to just the basename; use the full file name.
3742 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003743 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 fi
3745fi
3746fi
3747fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003748CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3751$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3754$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755fi
3756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757
Martin v. Löwis11437992002-04-12 09:54:03 +00003758fi
3759if test -z "$CC"; then
3760 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 do
3763 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3764set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3766$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003767if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003769else
3770 if test -n "$CC"; then
3771 ac_cv_prog_CC="$CC" # Let the user override the test.
3772else
Martin v. Löwis11437992002-04-12 09:54:03 +00003773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776 IFS=$as_save_IFS
3777 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $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 +00003782 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003783 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003784done
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
3788fi
3789fi
3790CC=$ac_cv_prog_CC
3791if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3793$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003797fi
3798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 test -n "$CC" && break
3801 done
3802fi
3803if test -z "$CC"; then
3804 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003806do
3807 # Extract the first word of "$ac_prog", so it can be a program name with args.
3808set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3810$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003811if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
3814 if test -n "$ac_ct_CC"; then
3815 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3816else
3817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3818for as_dir in $PATH
3819do
3820 IFS=$as_save_IFS
3821 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $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 +00003826 break 2
3827 fi
3828done
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003831
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
3833fi
3834ac_ct_CC=$ac_cv_prog_ac_ct_CC
3835if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3837$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3840$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 test -n "$ac_ct_CC" && break
3845done
Michael W. Hudson54241132001-12-07 15:38:26 +00003846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 if test "x$ac_ct_CC" = x; then
3848 CC=""
3849 else
3850 case $cross_compiling:$ac_tool_warned in
3851yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3853$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854ac_tool_warned=yes ;;
3855esac
3856 CC=$ac_ct_CC
3857 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003858fi
3859
3860fi
3861
3862
Matthias Kloseb9621712010-04-24 17:59:49 +00003863test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003865as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003866See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
3868# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003869$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3870set X $ac_compile
3871ac_compiler=$2
3872for ac_option in --version -v -V -qversion; do
3873 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874case "(($ac_try" in
3875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876 *) ac_try_echo=$ac_try;;
3877esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3879$as_echo "$ac_try_echo"; } >&5
3880 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 if test -s conftest.err; then
3883 sed '10a\
3884... rest of stderr output deleted ...
3885 10q' conftest.err >conftest.er1
3886 cat conftest.er1 >&5
3887 fi
3888 rm -f conftest.er1 conftest.err
3889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3890 test $ac_status = 0; }
3891done
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003894/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003895
Martin v. Löwis11437992002-04-12 09:54:03 +00003896int
3897main ()
3898{
3899
3900 ;
3901 return 0;
3902}
3903_ACEOF
3904ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003905ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003906# Try to create an executable without -o first, disregard a.out.
3907# It will help us diagnose broken compilers, and finding out an intuition
3908# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3910$as_echo_n "checking whether the C compiler works... " >&6; }
3911ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3912
3913# The possible output files:
3914ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916ac_rmfiles=
3917for ac_file in $ac_files
3918do
3919 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3922 esac
3923done
3924rm -f $ac_rmfiles
3925
Matthias Kloseb9621712010-04-24 17:59:49 +00003926if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927case "(($ac_try" in
3928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3929 *) ac_try_echo=$ac_try;;
3930esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003931eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3932$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3936 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3938# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3939# in a Makefile. We should not override ac_cv_exeext if it was cached,
3940# so that the user can short-circuit this test for compilers unknown to
3941# Autoconf.
3942for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003943do
3944 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003945 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003947 ;;
3948 [ab].out )
3949 # We found the default executable, but exeext='' is most
3950 # certainly right.
3951 break;;
3952 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 then :; else
3955 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3956 fi
3957 # We set ac_cv_exeext here because the later test for it is not
3958 # safe: cross compilers may not add the suffix if given an `-o'
3959 # argument, so we may need to know it at that point already.
3960 # Even if this section looks crufty: it has the advantage of
3961 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003962 break;;
3963 * )
3964 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003965 esac
3966done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967test "$ac_cv_exeext" = no && ac_cv_exeext=
3968
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003969else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 ac_file=''
3971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003972if test -z "$ac_file"; then :
3973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003976sed 's/^/| /' conftest.$ac_ext >&5
3977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003980as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003981See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003982else
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3984$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3987$as_echo_n "checking for C compiler default output file name... " >&6; }
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3989$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003991
Matthias Kloseb9621712010-04-24 17:59:49 +00003992rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3995$as_echo_n "checking for suffix of executables... " >&6; }
3996if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997case "(($ac_try" in
3998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3999 *) ac_try_echo=$ac_try;;
4000esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4002$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004003 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4006 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004007 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4008# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4009# work properly (i.e., refer to `conftest.exe'), while it won't with
4010# `rm'.
4011for ac_file in conftest.exe conftest conftest.*; do
4012 test -f "$ac_file" || continue
4013 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4016 break;;
4017 * ) break;;
4018 esac
4019done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020else
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004023as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004024See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004026rm -f conftest conftest$ac_cv_exeext
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4028$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
4030rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004031EXEEXT=$ac_cv_exeext
4032ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4034/* end confdefs.h. */
4035#include <stdio.h>
4036int
4037main ()
4038{
4039FILE *f = fopen ("conftest.out", "w");
4040 return ferror (f) || fclose (f) != 0;
4041
4042 ;
4043 return 0;
4044}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004046ac_clean_files="$ac_clean_files conftest.out"
4047# Check that the compiler produces executables we can run. If not, either
4048# the compiler is broken, or we cross compile.
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4050$as_echo_n "checking whether we are cross compiling... " >&6; }
4051if test "$cross_compiling" != yes; then
4052 { { ac_try="$ac_link"
4053case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
4057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4058$as_echo "$ac_try_echo"; } >&5
4059 (eval "$ac_link") 2>&5
4060 ac_status=$?
4061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4062 test $ac_status = 0; }
4063 if { ac_try='./conftest$ac_cv_exeext'
4064 { { case "(($ac_try" in
4065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4066 *) ac_try_echo=$ac_try;;
4067esac
4068eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4069$as_echo "$ac_try_echo"; } >&5
4070 (eval "$ac_try") 2>&5
4071 ac_status=$?
4072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4073 test $ac_status = 0; }; }; then
4074 cross_compiling=no
4075 else
4076 if test "$cross_compiling" = maybe; then
4077 cross_compiling=yes
4078 else
4079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004081as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004082If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004083See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 fi
4085 fi
4086fi
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4088$as_echo "$cross_compiling" >&6; }
4089
4090rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4091ac_clean_files=$ac_clean_files_save
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4093$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004094if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo_n "(cached) " >&6
4096else
4097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004098/* end confdefs.h. */
4099
4100int
4101main ()
4102{
4103
4104 ;
4105 return 0;
4106}
4107_ACEOF
4108rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004109if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110case "(($ac_try" in
4111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4112 *) ac_try_echo=$ac_try;;
4113esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4115$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4119 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004120 for ac_file in conftest.o conftest.obj conftest.*; do
4121 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4125 break;;
4126 esac
4127done
4128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004130sed 's/^/| /' conftest.$ac_ext >&5
4131
Matthias Kloseb9621712010-04-24 17:59:49 +00004132{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004134as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004135See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004136fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4140$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141OBJEXT=$ac_cv_objext
4142ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4144$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004145if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004147else
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
Martin v. Löwis11437992002-04-12 09:54:03 +00004151int
4152main ()
4153{
4154#ifndef __GNUC__
4155 choke me
4156#endif
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 ac_compiler_gnu=yes
4164else
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004168ac_cv_c_compiler_gnu=$ac_compiler_gnu
4169
4170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4172$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4173if test $ac_compiler_gnu = yes; then
4174 GCC=yes
4175else
4176 GCC=
4177fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004178ac_test_CFLAGS=${CFLAGS+set}
4179ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4181$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004182if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004184else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185 ac_save_c_werror_flag=$ac_c_werror_flag
4186 ac_c_werror_flag=yes
4187 ac_cv_prog_cc_g=no
4188 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004191
Martin v. Löwis11437992002-04-12 09:54:03 +00004192int
4193main ()
4194{
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004201 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 CFLAGS=""
4204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205/* end confdefs.h. */
4206
4207int
4208main ()
4209{
4210
4211 ;
4212 return 0;
4213}
4214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004215if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216
Matthias Kloseb9621712010-04-24 17:59:49 +00004217else
4218 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221/* end confdefs.h. */
4222
4223int
4224main ()
4225{
4226
4227 ;
4228 return 0;
4229}
4230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004231if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4239 ac_c_werror_flag=$ac_save_c_werror_flag
4240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4242$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004245elif test $ac_cv_prog_cc_g = yes; then
4246 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004247 CFLAGS="-g -O2"
4248 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250 fi
4251else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252 if test "$GCC" = yes; then
4253 CFLAGS="-O2"
4254 else
4255 CFLAGS=
4256 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4259$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004260if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004262else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004264ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* end confdefs.h. */
4267#include <stdarg.h>
4268#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004269struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004270/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4271struct buf { int x; };
4272FILE * (*rcsopen) (struct buf *, struct stat *, int);
4273static char *e (p, i)
4274 char **p;
4275 int i;
4276{
4277 return p[i];
4278}
4279static char *f (char * (*g) (char **, int), char **p, ...)
4280{
4281 char *s;
4282 va_list v;
4283 va_start (v,p);
4284 s = g (p, va_arg (v,int));
4285 va_end (v);
4286 return s;
4287}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004288
4289/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4290 function prototypes and stuff, but not '\xHH' hex character constants.
4291 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4294 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4299 inside strings and character constants. */
4300#define FOO(x) 'x'
4301int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4302
Skip Montanaro6dead952003-09-25 14:50:04 +00004303int test (int i, double x);
4304struct s1 {int (*f) (int a);};
4305struct s2 {int (*f) (double a);};
4306int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4307int argc;
4308char **argv;
4309int
4310main ()
4311{
4312return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4313 ;
4314 return 0;
4315}
4316_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4318 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004319do
4320 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324rm -f core conftest.err conftest.$ac_objext
4325 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004326done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004328CC=$ac_save_CC
4329
4330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331# AC_CACHE_VAL
4332case "x$ac_cv_prog_cc_c89" in
4333 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4335$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4338$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004339 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4342$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004343esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004344if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004345
Matthias Kloseb9621712010-04-24 17:59:49 +00004346fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004347
Martin v. Löwis11437992002-04-12 09:54:03 +00004348ac_ext=c
4349ac_cpp='$CPP $CPPFLAGS'
4350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4352ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
4359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4360$as_echo_n "checking how to run the C preprocessor... " >&6; }
4361# On Suns, sometimes $CPP names a directory.
4362if test -n "$CPP" && test -d "$CPP"; then
4363 CPP=
4364fi
4365if test -z "$CPP"; then
4366 if ${ac_cv_prog_CPP+:} false; then :
4367 $as_echo_n "(cached) " >&6
4368else
4369 # Double quotes because CPP needs to be expanded
4370 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4371 do
4372 ac_preproc_ok=false
4373for ac_c_preproc_warn_flag in '' yes
4374do
4375 # Use a header file that comes with gcc, so configuring glibc
4376 # with a fresh cross-compiler works.
4377 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4378 # <limits.h> exists even on freestanding compilers.
4379 # On the NeXT, cc -E runs the code through the compiler's parser,
4380 # not just through cpp. "Syntax error" is here to catch this case.
4381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4382/* end confdefs.h. */
4383#ifdef __STDC__
4384# include <limits.h>
4385#else
4386# include <assert.h>
4387#endif
4388 Syntax error
4389_ACEOF
4390if ac_fn_c_try_cpp "$LINENO"; then :
4391
4392else
4393 # Broken: fails on valid input.
4394continue
4395fi
4396rm -f conftest.err conftest.i conftest.$ac_ext
4397
4398 # OK, works on sane cases. Now check whether nonexistent headers
4399 # can be detected and how.
4400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h. */
4402#include <ac_nonexistent.h>
4403_ACEOF
4404if ac_fn_c_try_cpp "$LINENO"; then :
4405 # Broken: success on invalid input.
4406continue
4407else
4408 # Passes both tests.
4409ac_preproc_ok=:
4410break
4411fi
4412rm -f conftest.err conftest.i conftest.$ac_ext
4413
4414done
4415# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4416rm -f conftest.i conftest.err conftest.$ac_ext
4417if $ac_preproc_ok; then :
4418 break
4419fi
4420
4421 done
4422 ac_cv_prog_CPP=$CPP
4423
4424fi
4425 CPP=$ac_cv_prog_CPP
4426else
4427 ac_cv_prog_CPP=$CPP
4428fi
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4430$as_echo "$CPP" >&6; }
4431ac_preproc_ok=false
4432for ac_c_preproc_warn_flag in '' yes
4433do
4434 # Use a header file that comes with gcc, so configuring glibc
4435 # with a fresh cross-compiler works.
4436 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4437 # <limits.h> exists even on freestanding compilers.
4438 # On the NeXT, cc -E runs the code through the compiler's parser,
4439 # not just through cpp. "Syntax error" is here to catch this case.
4440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h. */
4442#ifdef __STDC__
4443# include <limits.h>
4444#else
4445# include <assert.h>
4446#endif
4447 Syntax error
4448_ACEOF
4449if ac_fn_c_try_cpp "$LINENO"; then :
4450
4451else
4452 # Broken: fails on valid input.
4453continue
4454fi
4455rm -f conftest.err conftest.i conftest.$ac_ext
4456
4457 # OK, works on sane cases. Now check whether nonexistent headers
4458 # can be detected and how.
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460/* end confdefs.h. */
4461#include <ac_nonexistent.h>
4462_ACEOF
4463if ac_fn_c_try_cpp "$LINENO"; then :
4464 # Broken: success on invalid input.
4465continue
4466else
4467 # Passes both tests.
4468ac_preproc_ok=:
4469break
4470fi
4471rm -f conftest.err conftest.i conftest.$ac_ext
4472
4473done
4474# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4475rm -f conftest.i conftest.err conftest.$ac_ext
4476if $ac_preproc_ok; then :
4477
4478else
4479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4481as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4482See \`config.log' for more details" "$LINENO" 5; }
4483fi
4484
4485ac_ext=c
4486ac_cpp='$CPP $CPPFLAGS'
4487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4489ac_compiler_gnu=$ac_cv_c_compiler_gnu
4490
4491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4492$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4493if ${ac_cv_path_GREP+:} false; then :
4494 $as_echo_n "(cached) " >&6
4495else
4496 if test -z "$GREP"; then
4497 ac_path_GREP_found=false
4498 # Loop through the user's path and test for each of PROGNAME-LIST
4499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4501do
4502 IFS=$as_save_IFS
4503 test -z "$as_dir" && as_dir=.
4504 for ac_prog in grep ggrep; do
4505 for ac_exec_ext in '' $ac_executable_extensions; do
4506 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4507 as_fn_executable_p "$ac_path_GREP" || continue
4508# Check for GNU ac_path_GREP and select it if it is found.
4509 # Check for GNU $ac_path_GREP
4510case `"$ac_path_GREP" --version 2>&1` in
4511*GNU*)
4512 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4513*)
4514 ac_count=0
4515 $as_echo_n 0123456789 >"conftest.in"
4516 while :
4517 do
4518 cat "conftest.in" "conftest.in" >"conftest.tmp"
4519 mv "conftest.tmp" "conftest.in"
4520 cp "conftest.in" "conftest.nl"
4521 $as_echo 'GREP' >> "conftest.nl"
4522 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4523 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4524 as_fn_arith $ac_count + 1 && ac_count=$as_val
4525 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4526 # Best one so far, save it but keep looking for a better one
4527 ac_cv_path_GREP="$ac_path_GREP"
4528 ac_path_GREP_max=$ac_count
4529 fi
4530 # 10*(2^10) chars as input seems more than enough
4531 test $ac_count -gt 10 && break
4532 done
4533 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4534esac
4535
4536 $ac_path_GREP_found && break 3
4537 done
4538 done
4539 done
4540IFS=$as_save_IFS
4541 if test -z "$ac_cv_path_GREP"; then
4542 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4543 fi
4544else
4545 ac_cv_path_GREP=$GREP
4546fi
4547
4548fi
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4550$as_echo "$ac_cv_path_GREP" >&6; }
4551 GREP="$ac_cv_path_GREP"
4552
4553
Łukasz Langaa785c872016-09-09 17:37:37 -07004554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4555$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4556if ${ac_cv_path_SED+:} false; then :
4557 $as_echo_n "(cached) " >&6
4558else
4559 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4560 for ac_i in 1 2 3 4 5 6 7; do
4561 ac_script="$ac_script$as_nl$ac_script"
4562 done
4563 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4564 { ac_script=; unset ac_script;}
4565 if test -z "$SED"; then
4566 ac_path_SED_found=false
4567 # Loop through the user's path and test for each of PROGNAME-LIST
4568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4569for as_dir in $PATH
4570do
4571 IFS=$as_save_IFS
4572 test -z "$as_dir" && as_dir=.
4573 for ac_prog in sed gsed; do
4574 for ac_exec_ext in '' $ac_executable_extensions; do
4575 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4576 as_fn_executable_p "$ac_path_SED" || continue
4577# Check for GNU ac_path_SED and select it if it is found.
4578 # Check for GNU $ac_path_SED
4579case `"$ac_path_SED" --version 2>&1` in
4580*GNU*)
4581 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4582*)
4583 ac_count=0
4584 $as_echo_n 0123456789 >"conftest.in"
4585 while :
4586 do
4587 cat "conftest.in" "conftest.in" >"conftest.tmp"
4588 mv "conftest.tmp" "conftest.in"
4589 cp "conftest.in" "conftest.nl"
4590 $as_echo '' >> "conftest.nl"
4591 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4592 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4593 as_fn_arith $ac_count + 1 && ac_count=$as_val
4594 if test $ac_count -gt ${ac_path_SED_max-0}; then
4595 # Best one so far, save it but keep looking for a better one
4596 ac_cv_path_SED="$ac_path_SED"
4597 ac_path_SED_max=$ac_count
4598 fi
4599 # 10*(2^10) chars as input seems more than enough
4600 test $ac_count -gt 10 && break
4601 done
4602 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4603esac
4604
4605 $ac_path_SED_found && break 3
4606 done
4607 done
4608 done
4609IFS=$as_save_IFS
4610 if test -z "$ac_cv_path_SED"; then
4611 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4612 fi
4613else
4614 ac_cv_path_SED=$SED
4615fi
4616
4617fi
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4619$as_echo "$ac_cv_path_SED" >&6; }
4620 SED="$ac_cv_path_SED"
4621 rm -f conftest.sed
4622
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004623
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004624
4625
Matthias Kloseb9621712010-04-24 17:59:49 +00004626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4627$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004629# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004630if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004631 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004632
4633 case $withval in
4634 no) with_cxx_main=no
4635 MAINCC='$(CC)';;
4636 yes) with_cxx_main=yes
4637 MAINCC='$(CXX)';;
4638 *) with_cxx_main=yes
4639 MAINCC=$withval
4640 if test -z "$CXX"
4641 then
4642 CXX=$withval
4643 fi;;
4644 esac
4645else
4646
4647 with_cxx_main=no
4648 MAINCC='$(CC)'
4649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004650fi
4651
Matthias Kloseb9621712010-04-24 17:59:49 +00004652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4653$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004654
4655preset_cxx="$CXX"
4656if test -z "$CXX"
4657then
4658 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004659 gcc) if test -n "$ac_tool_prefix"; then
4660 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4661set dummy ${ac_tool_prefix}g++; ac_word=$2
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
4664if ${ac_cv_path_CXX+:} false; then :
4665 $as_echo_n "(cached) " >&6
4666else
4667 case $CXX in
4668 [\\/]* | ?:[\\/]*)
4669 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4670 ;;
4671 *)
4672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in notfound
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
4677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 break 2
4682 fi
4683done
4684 done
4685IFS=$as_save_IFS
4686
4687 ;;
4688esac
4689fi
4690CXX=$ac_cv_path_CXX
4691if test -n "$CXX"; then
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4693$as_echo "$CXX" >&6; }
4694else
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699
4700fi
4701if test -z "$ac_cv_path_CXX"; then
4702 ac_pt_CXX=$CXX
4703 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004704set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707if ${ac_cv_path_ac_pt_CXX+:} false; then :
4708 $as_echo_n "(cached) " >&6
4709else
4710 case $ac_pt_CXX in
4711 [\\/]* | ?:[\\/]*)
4712 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4713 ;;
4714 *)
4715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in notfound
4717do
4718 IFS=$as_save_IFS
4719 test -z "$as_dir" && as_dir=.
4720 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004722 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4724 break 2
4725 fi
4726done
4727 done
4728IFS=$as_save_IFS
4729
4730 ;;
4731esac
4732fi
4733ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4734if test -n "$ac_pt_CXX"; then
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4736$as_echo "$ac_pt_CXX" >&6; }
4737else
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742 if test "x$ac_pt_CXX" = x; then
4743 CXX="g++"
4744 else
4745 case $cross_compiling:$ac_tool_warned in
4746yes:)
4747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4749ac_tool_warned=yes ;;
4750esac
4751 CXX=$ac_pt_CXX
4752 fi
4753else
4754 CXX="$ac_cv_path_CXX"
4755fi
4756 ;;
4757 cc) if test -n "$ac_tool_prefix"; then
4758 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4759set dummy ${ac_tool_prefix}c++; ac_word=$2
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004762if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
4765 case $CXX in
4766 [\\/]* | ?:[\\/]*)
4767 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4768 ;;
4769 *)
4770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in notfound
4772do
4773 IFS=$as_save_IFS
4774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 break 2
4780 fi
4781done
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ;;
4786esac
4787fi
4788CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004789if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4791$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792else
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797
4798fi
4799if test -z "$ac_cv_path_CXX"; then
4800 ac_pt_CXX=$CXX
4801 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4804$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004810 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 +00004811 ;;
4812 *)
4813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4814for as_dir in notfound
4815do
4816 IFS=$as_save_IFS
4817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004820 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 break 2
4823 fi
4824done
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004826IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004828 ;;
4829esac
4830fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004831ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4832if test -n "$ac_pt_CXX"; then
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4834$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004835else
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4837$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004839
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 if test "x$ac_pt_CXX" = x; then
4841 CXX="c++"
4842 else
4843 case $cross_compiling:$ac_tool_warned in
4844yes:)
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4846$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4847ac_tool_warned=yes ;;
4848esac
4849 CXX=$ac_pt_CXX
4850 fi
4851else
4852 CXX="$ac_cv_path_CXX"
4853fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004855 clang|*/clang) if test -n "$ac_tool_prefix"; then
4856 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4857set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if ${ac_cv_path_CXX+:} false; then :
4861 $as_echo_n "(cached) " >&6
4862else
4863 case $CXX in
4864 [\\/]* | ?:[\\/]*)
4865 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4866 ;;
4867 *)
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in notfound
4870do
4871 IFS=$as_save_IFS
4872 test -z "$as_dir" && as_dir=.
4873 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004875 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877 break 2
4878 fi
4879done
4880 done
4881IFS=$as_save_IFS
4882
Ned Deilycbfb9a52012-06-23 16:02:19 -07004883 ;;
4884esac
4885fi
4886CXX=$ac_cv_path_CXX
4887if test -n "$CXX"; then
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4889$as_echo "$CXX" >&6; }
4890else
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004895
4896fi
4897if test -z "$ac_cv_path_CXX"; then
4898 ac_pt_CXX=$CXX
4899 # Extract the first word of "clang++", so it can be a program name with args.
4900set dummy clang++; ac_word=$2
4901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4902$as_echo_n "checking for $ac_word... " >&6; }
4903if ${ac_cv_path_ac_pt_CXX+:} false; then :
4904 $as_echo_n "(cached) " >&6
4905else
4906 case $ac_pt_CXX in
4907 [\\/]* | ?:[\\/]*)
4908 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4909 ;;
4910 *)
4911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4912for as_dir in notfound
4913do
4914 IFS=$as_save_IFS
4915 test -z "$as_dir" && as_dir=.
4916 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004918 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4920 break 2
4921 fi
4922done
4923 done
4924IFS=$as_save_IFS
4925
4926 ;;
4927esac
4928fi
4929ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4930if test -n "$ac_pt_CXX"; then
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4932$as_echo "$ac_pt_CXX" >&6; }
4933else
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4935$as_echo "no" >&6; }
4936fi
4937
4938 if test "x$ac_pt_CXX" = x; then
4939 CXX="clang++"
4940 else
4941 case $cross_compiling:$ac_tool_warned in
4942yes:)
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4945ac_tool_warned=yes ;;
4946esac
4947 CXX=$ac_pt_CXX
4948 fi
4949else
4950 CXX="$ac_cv_path_CXX"
4951fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004952 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004953 icc|*/icc) if test -n "$ac_tool_prefix"; then
4954 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4955set dummy ${ac_tool_prefix}icpc; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
4958if ${ac_cv_path_CXX+:} false; then :
4959 $as_echo_n "(cached) " >&6
4960else
4961 case $CXX in
4962 [\\/]* | ?:[\\/]*)
4963 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4964 ;;
4965 *)
4966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in notfound
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 for ac_exec_ext in '' $ac_executable_extensions; do
4972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975 break 2
4976 fi
4977done
4978 done
4979IFS=$as_save_IFS
4980
4981 ;;
4982esac
4983fi
4984CXX=$ac_cv_path_CXX
4985if test -n "$CXX"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4987$as_echo "$CXX" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993
4994fi
4995if test -z "$ac_cv_path_CXX"; then
4996 ac_pt_CXX=$CXX
4997 # Extract the first word of "icpc", so it can be a program name with args.
4998set dummy icpc; ac_word=$2
4999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5000$as_echo_n "checking for $ac_word... " >&6; }
5001if ${ac_cv_path_ac_pt_CXX+:} false; then :
5002 $as_echo_n "(cached) " >&6
5003else
5004 case $ac_pt_CXX in
5005 [\\/]* | ?:[\\/]*)
5006 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5007 ;;
5008 *)
5009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in notfound
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
5014 for ac_exec_ext in '' $ac_executable_extensions; do
5015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5016 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5018 break 2
5019 fi
5020done
5021 done
5022IFS=$as_save_IFS
5023
5024 ;;
5025esac
5026fi
5027ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5028if test -n "$ac_pt_CXX"; then
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5030$as_echo "$ac_pt_CXX" >&6; }
5031else
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033$as_echo "no" >&6; }
5034fi
5035
5036 if test "x$ac_pt_CXX" = x; then
5037 CXX="icpc"
5038 else
5039 case $cross_compiling:$ac_tool_warned in
5040yes:)
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5042$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5043ac_tool_warned=yes ;;
5044esac
5045 CXX=$ac_pt_CXX
5046 fi
5047else
5048 CXX="$ac_cv_path_CXX"
5049fi
5050 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005051 esac
5052 if test "$CXX" = "notfound"
5053 then
5054 CXX=""
5055 fi
5056fi
5057if test -z "$CXX"
5058then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005059 if test -n "$ac_tool_prefix"; then
5060 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5061 do
5062 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5063set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005066if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005068else
5069 if test -n "$CXX"; then
5070 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5071else
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075 IFS=$as_save_IFS
5076 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005081 break 2
5082 fi
5083done
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005085IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005086
5087fi
5088fi
5089CXX=$ac_cv_prog_CXX
5090if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5092$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005093else
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096fi
5097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005099 test -n "$CXX" && break
5100 done
5101fi
5102if test -z "$CXX"; then
5103 ac_ct_CXX=$CXX
5104 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5105do
5106 # Extract the first word of "$ac_prog", so it can be a program name with args.
5107set dummy $ac_prog; ac_word=$2
5108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5109$as_echo_n "checking for $ac_word... " >&6; }
5110if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5111 $as_echo_n "(cached) " >&6
5112else
5113 if test -n "$ac_ct_CXX"; then
5114 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5115else
5116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5117for as_dir in $PATH
5118do
5119 IFS=$as_save_IFS
5120 test -z "$as_dir" && as_dir=.
5121 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005123 ac_cv_prog_ac_ct_CXX="$ac_prog"
5124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5125 break 2
5126 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005127done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005128 done
5129IFS=$as_save_IFS
5130
5131fi
5132fi
5133ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5134if test -n "$ac_ct_CXX"; then
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5136$as_echo "$ac_ct_CXX" >&6; }
5137else
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5139$as_echo "no" >&6; }
5140fi
5141
5142
5143 test -n "$ac_ct_CXX" && break
5144done
5145
5146 if test "x$ac_ct_CXX" = x; then
5147 CXX="notfound"
5148 else
5149 case $cross_compiling:$ac_tool_warned in
5150yes:)
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5153ac_tool_warned=yes ;;
5154esac
5155 CXX=$ac_ct_CXX
5156 fi
5157fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005158
5159 if test "$CXX" = "notfound"
5160 then
5161 CXX=""
5162 fi
5163fi
5164if test "$preset_cxx" != "$CXX"
5165then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005166 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167
5168 By default, distutils will build C++ extension modules with \"$CXX\".
5169 If this is not intended, then set CXX on the configure command line.
5170 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005171$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173 By default, distutils will build C++ extension modules with \"$CXX\".
5174 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176fi
5177
5178
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005179MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5180
5181
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5183$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5184cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005185#undef bfin
5186#undef cris
5187#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005189#undef hppa
5190#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005191#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005192#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005193#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005195#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005196#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005197 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005198#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199# if defined(__x86_64__) && defined(__LP64__)
5200 x86_64-linux-gnu
5201# elif defined(__x86_64__) && defined(__ILP32__)
5202 x86_64-linux-gnux32
5203# elif defined(__i386__)
5204 i386-linux-gnu
5205# elif defined(__aarch64__) && defined(__AARCH64EL__)
5206# if defined(__ILP32__)
5207 aarch64_ilp32-linux-gnu
5208# else
5209 aarch64-linux-gnu
5210# endif
5211# elif defined(__aarch64__) && defined(__AARCH64EB__)
5212# if defined(__ILP32__)
5213 aarch64_be_ilp32-linux-gnu
5214# else
5215 aarch64_be-linux-gnu
5216# endif
5217# elif defined(__alpha__)
5218 alpha-linux-gnu
5219# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5220# if defined(__ARMEL__)
5221 arm-linux-gnueabihf
5222# else
5223 armeb-linux-gnueabihf
5224# endif
5225# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5226# if defined(__ARMEL__)
5227 arm-linux-gnueabi
5228# else
5229 armeb-linux-gnueabi
5230# endif
5231# elif defined(__hppa__)
5232 hppa-linux-gnu
5233# elif defined(__ia64__)
5234 ia64-linux-gnu
5235# elif defined(__m68k__) && !defined(__mcoldfire__)
5236 m68k-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005237# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5238# if _MIPS_SIM == _ABIO32
5239 mipsisa32r6el-linux-gnu
5240# elif _MIPS_SIM == _ABIN32
5241 mipsisa64r6el-linux-gnuabin32
5242# elif _MIPS_SIM == _ABI64
5243 mipsisa64r6el-linux-gnuabi64
5244# else
5245# error unknown platform triplet
5246# endif
5247# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5248# if _MIPS_SIM == _ABIO32
5249 mipsisa32r6-linux-gnu
5250# elif _MIPS_SIM == _ABIN32
5251 mipsisa64r6-linux-gnuabin32
5252# elif _MIPS_SIM == _ABI64
5253 mipsisa64r6-linux-gnuabi64
5254# else
5255# error unknown platform triplet
5256# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005257# elif defined(__mips_hard_float) && defined(_MIPSEL)
5258# if _MIPS_SIM == _ABIO32
5259 mipsel-linux-gnu
5260# elif _MIPS_SIM == _ABIN32
5261 mips64el-linux-gnuabin32
5262# elif _MIPS_SIM == _ABI64
5263 mips64el-linux-gnuabi64
5264# else
5265# error unknown platform triplet
5266# endif
5267# elif defined(__mips_hard_float)
5268# if _MIPS_SIM == _ABIO32
5269 mips-linux-gnu
5270# elif _MIPS_SIM == _ABIN32
5271 mips64-linux-gnuabin32
5272# elif _MIPS_SIM == _ABI64
5273 mips64-linux-gnuabi64
5274# else
5275# error unknown platform triplet
5276# endif
5277# elif defined(__or1k__)
5278 or1k-linux-gnu
5279# elif defined(__powerpc__) && defined(__SPE__)
5280 powerpc-linux-gnuspe
5281# elif defined(__powerpc64__)
5282# if defined(__LITTLE_ENDIAN__)
5283 powerpc64le-linux-gnu
5284# else
5285 powerpc64-linux-gnu
5286# endif
5287# elif defined(__powerpc__)
5288 powerpc-linux-gnu
5289# elif defined(__s390x__)
5290 s390x-linux-gnu
5291# elif defined(__s390__)
5292 s390-linux-gnu
5293# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5294 sh4-linux-gnu
5295# elif defined(__sparc__) && defined(__arch64__)
5296 sparc64-linux-gnu
5297# elif defined(__sparc__)
5298 sparc-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005299# elif defined(__riscv)
5300# if __riscv_xlen == 32
5301 riscv32-linux-gnu
5302# elif __riscv_xlen == 64
5303 riscv64-linux-gnu
5304# else
5305# error unknown platform triplet
5306# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307# else
5308# error unknown platform triplet
5309# endif
5310#elif defined(__FreeBSD_kernel__)
5311# if defined(__LP64__)
5312 x86_64-kfreebsd-gnu
5313# elif defined(__i386__)
5314 i386-kfreebsd-gnu
5315# else
5316# error unknown platform triplet
5317# endif
5318#elif defined(__gnu_hurd__)
5319 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005320#elif defined(__APPLE__)
5321 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322#else
5323# error unknown platform triplet
5324#endif
5325
5326EOF
5327
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005328if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5331$as_echo "$PLATFORM_TRIPLET" >&6; }
5332else
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5334$as_echo "none" >&6; }
5335fi
5336rm -f conftest.c conftest.out
5337
5338if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5339 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5340 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5341 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005342elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5343 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005344fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005345
doko@ubuntu.com55532312016-06-14 08:55:19 +02005346if test x$MULTIARCH != x; then
5347 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5348fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005349
5350
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5352$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5353save_LDFLAGS="$LDFLAGS"
5354LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005355
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5357/* end confdefs.h. */
5358
5359int
5360main ()
5361{
5362
5363 ;
5364 return 0;
5365}
5366_ACEOF
5367if ac_fn_c_try_link "$LINENO"; then :
5368 NO_AS_NEEDED="-Wl,--no-as-needed"
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5370$as_echo "yes" >&6; }
5371else
5372 NO_AS_NEEDED=""
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5374$as_echo "no" >&6; }
5375fi
5376rm -f core conftest.err conftest.$ac_objext \
5377 conftest$ac_exeext conftest.$ac_ext
5378LDFLAGS="$save_LDFLAGS"
5379
5380
5381
5382# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383
Matthias Kloseb9621712010-04-24 17:59:49 +00005384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5385$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005386if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388else
5389 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5390 then ac_cv_path_EGREP="$GREP -E"
5391 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 # Loop through the user's path and test for each of PROGNAME-LIST
5395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5397do
5398 IFS=$as_save_IFS
5399 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 for ac_prog in egrep; do
5401 for ac_exec_ext in '' $ac_executable_extensions; do
5402 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005403 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005404# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 # Check for GNU $ac_path_EGREP
5406case `"$ac_path_EGREP" --version 2>&1` in
5407*GNU*)
5408 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5409*)
5410 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 while :
5413 do
5414 cat "conftest.in" "conftest.in" >"conftest.tmp"
5415 mv "conftest.tmp" "conftest.in"
5416 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5419 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5422 # Best one so far, save it but keep looking for a better one
5423 ac_cv_path_EGREP="$ac_path_EGREP"
5424 ac_path_EGREP_max=$ac_count
5425 fi
5426 # 10*(2^10) chars as input seems more than enough
5427 test $ac_count -gt 10 && break
5428 done
5429 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5430esac
5431
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 $ac_path_EGREP_found && break 3
5433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005438 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 +00005439 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005440else
5441 ac_cv_path_EGREP=$EGREP
5442fi
5443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444 fi
5445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5447$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005449
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5452$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005453if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 $as_echo_n "(cached) " >&6
5455else
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005457/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005458#include <stdlib.h>
5459#include <stdarg.h>
5460#include <string.h>
5461#include <float.h>
5462
5463int
5464main ()
5465{
5466
5467 ;
5468 return 0;
5469}
5470_ACEOF
5471if ac_fn_c_try_compile "$LINENO"; then :
5472 ac_cv_header_stdc=yes
5473else
5474 ac_cv_header_stdc=no
5475fi
5476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5481/* end confdefs.h. */
5482#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005483
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005484_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005486 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005488else
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005490fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005491rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492
Matthias Kloseb9621712010-04-24 17:59:49 +00005493fi
5494
5495if test $ac_cv_header_stdc = yes; then
5496 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5498/* end confdefs.h. */
5499#include <stdlib.h>
5500
5501_ACEOF
5502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5503 $EGREP "free" >/dev/null 2>&1; then :
5504
5505else
5506 ac_cv_header_stdc=no
5507fi
5508rm -f conftest*
5509
5510fi
5511
5512if test $ac_cv_header_stdc = yes; then
5513 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5514 if test "$cross_compiling" = yes; then :
5515 :
5516else
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <ctype.h>
5520#include <stdlib.h>
5521#if ((' ' & 0x0FF) == 0x020)
5522# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5523# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5524#else
5525# define ISLOWER(c) \
5526 (('a' <= (c) && (c) <= 'i') \
5527 || ('j' <= (c) && (c) <= 'r') \
5528 || ('s' <= (c) && (c) <= 'z'))
5529# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5530#endif
5531
5532#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5533int
5534main ()
5535{
5536 int i;
5537 for (i = 0; i < 256; i++)
5538 if (XOR (islower (i), ISLOWER (i))
5539 || toupper (i) != TOUPPER (i))
5540 return 2;
5541 return 0;
5542}
5543_ACEOF
5544if ac_fn_c_try_run "$LINENO"; then :
5545
5546else
5547 ac_cv_header_stdc=no
5548fi
5549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5550 conftest.$ac_objext conftest.beam conftest.$ac_ext
5551fi
5552
5553fi
5554fi
5555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5556$as_echo "$ac_cv_header_stdc" >&6; }
5557if test $ac_cv_header_stdc = yes; then
5558
5559$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5560
5561fi
5562
5563# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5564for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5565 inttypes.h stdint.h unistd.h
5566do :
5567 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5568ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5569"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005570if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 cat >>confdefs.h <<_ACEOF
5572#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5573_ACEOF
5574
5575fi
5576
5577done
5578
5579
5580
5581 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 +02005582if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005583 MINIX=yes
5584else
5585 MINIX=
5586fi
5587
5588
5589 if test "$MINIX" = yes; then
5590
5591$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5592
5593
5594$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5595
5596
5597$as_echo "#define _MINIX 1" >>confdefs.h
5598
5599 fi
5600
5601
5602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5603$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005604if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005605 $as_echo_n "(cached) " >&6
5606else
5607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5608/* end confdefs.h. */
5609
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005610# define __EXTENSIONS__ 1
5611 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005612int
5613main ()
5614{
5615
5616 ;
5617 return 0;
5618}
5619_ACEOF
5620if ac_fn_c_try_compile "$LINENO"; then :
5621 ac_cv_safe_to_define___extensions__=yes
5622else
5623 ac_cv_safe_to_define___extensions__=no
5624fi
5625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5626fi
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5628$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5629 test $ac_cv_safe_to_define___extensions__ = yes &&
5630 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5631
5632 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5633
5634 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5635
5636 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5637
5638 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5639
5640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
Xavier de Gaye95750b12016-07-09 11:05:42 +02005642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5643$as_echo_n "checking for the Android API level... " >&6; }
5644cat >> conftest.c <<EOF
5645#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005646android_api = __ANDROID_API__
5647arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005648#else
5649#error not Android
5650#endif
5651EOF
5652
5653if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005654 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5655 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5657$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005658 if test -z "$ANDROID_API_LEVEL"; then
5659 echo 'Fatal: you must define __ANDROID_API__'
5660 exit 1
5661 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005662
5663cat >>confdefs.h <<_ACEOF
5664#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5665_ACEOF
5666
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005667
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5669$as_echo_n "checking for the Android arm ABI... " >&6; }
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5671$as_echo "$_arm_arch" >&6; }
5672 if test "$_arm_arch" = 7; then
5673 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5674 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5675 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005676else
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5678$as_echo "not Android" >&6; }
5679fi
5680rm -f conftest.c conftest.out
5681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682# Check for unsupported systems
5683case $ac_sys_system/$ac_sys_release in
5684atheos*|Linux*/1*)
5685 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5686 echo See README for details.
5687 exit 1;;
5688esac
5689
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5692$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005695if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 withval=$with_suffix;
5697 case $withval in
5698 no) EXEEXT=;;
5699 yes) EXEEXT=.exe;;
5700 *) EXEEXT=$withval;;
5701 esac
5702fi
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5705$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707# Test whether we're running on a non-case-sensitive system, in which
5708# case we give a warning if no ext is given
5709
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5711$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712if test ! -d CaseSensitiveTestDir; then
5713mkdir CaseSensitiveTestDir
5714fi
5715
5716if test -d casesensitivetestdir
5717then
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5719$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=.exe
5721else
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 BUILDEXEEXT=$EXEEXT
5725fi
5726rmdir CaseSensitiveTestDir
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728case $ac_sys_system in
5729hp*|HP*)
5730 case $CC in
5731 cc|*/cc) CC="$CC -Ae";;
5732 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733esac
5734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735
Matthias Kloseb9621712010-04-24 17:59:49 +00005736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5737$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738if test -z "$LIBRARY"
5739then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005740 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5743$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745# LDLIBRARY is the name of the library to link against (as opposed to the
5746# name of the library into which to insert object files). BLDLIBRARY is also
5747# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5748# is blank as the main program is not linked directly against LDLIBRARY.
5749# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5750# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5751# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5752# DLLLIBRARY is the shared (i.e., DLL) library.
5753#
5754# RUNSHARED is used to run shared python without installed libraries
5755#
5756# INSTSONAME is the name of the shared library that will be use to install
5757# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005758#
5759# LDVERSION is the shared library version number, normally the Python version
5760# with the ABI build flags appended.
5761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
5763
5764
5765
5766
5767
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769LDLIBRARY="$LIBRARY"
5770BLDLIBRARY='$(LDLIBRARY)'
5771INSTSONAME='$(LDLIBRARY)'
5772DLLLIBRARY=''
5773LDLIBRARYDIR=''
5774RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005775LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776
5777# LINKCC is the command that links the python executable -- default is $(CC).
5778# If CXX is set, and if it is needed to link a main function that was
5779# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5780# python might then depend on the C++ runtime
5781# This is altered for AIX in order to build the export list before
5782# linking.
5783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5785$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786if test -z "$LINKCC"
5787then
5788 LINKCC='$(PURIFY) $(MAINCC)'
5789 case $ac_sys_system in
5790 AIX*)
5791 exp_extra="\"\""
5792 if test $ac_sys_release -ge 5 -o \
5793 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5794 exp_extra="."
5795 fi
5796 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 QNX*)
5798 # qcc must be used because the other compilers do not
5799 # support -N.
5800 LINKCC=qcc;;
5801 esac
5802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5804$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805
5806# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5807# make sure we default having it set to "no": this is used by
5808# distutils.unixccompiler to know if it should add --enable-new-dtags
5809# to linker command lines, and failing to detect GNU ld simply results
5810# in the same bahaviour as before.
5811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5813$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814ac_prog=ld
5815if test "$GCC" = yes; then
5816 ac_prog=`$CC -print-prog-name=ld`
5817fi
5818case `"$ac_prog" -V 2>&1 < /dev/null` in
5819 *GNU*)
5820 GNULD=yes;;
5821 *)
5822 GNULD=no;;
5823esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5825$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5828$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005830if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 enableval=$enable_shared;
5832fi
5833
5834
5835if test -z "$enable_shared"
5836then
5837 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005838 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 enable_shared="yes";;
5840 *)
5841 enable_shared="no";;
5842 esac
5843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5845$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
Matthias Kloseb9621712010-04-24 17:59:49 +00005847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5848$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005850if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851 enableval=$enable_profiling;
5852fi
5853
5854if test "x$enable_profiling" = xyes; then
5855 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005856 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858/* end confdefs.h. */
5859int main() { return 0; }
5860_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005861if ac_fn_c_try_link "$LINENO"; then :
5862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005864 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866rm -f core conftest.err conftest.$ac_objext \
5867 conftest$ac_exeext conftest.$ac_ext
5868 CC="$ac_save_cc"
5869else
5870 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5873$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
doko@ubuntu.comba015832012-06-30 16:52:05 +02005875if test "x$enable_profiling" = xyes; then
5876 BASECFLAGS="-pg $BASECFLAGS"
5877 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878fi
5879
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5881$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882
5883# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5884# library that we build, but we do not want to link against it (we
5885# will find it with a -framework option). For this reason there is an
5886# extra variable BLDLIBRARY against which Python and the extension
5887# modules are linked, BLDLIBRARY. This is normally the same as
5888# LDLIBRARY, but empty for MacOSX framework builds.
5889if test "$enable_framework"
5890then
5891 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005892 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 BLDLIBRARY=''
5894else
5895 BLDLIBRARY='$(LDLIBRARY)'
5896fi
5897
5898# Other platforms follow
5899if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005900 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901
Matthias Kloseb9621712010-04-24 17:59:49 +00005902$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
5904 case $ac_sys_system in
5905 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).dll.a'
5907 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
5909 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).so'
5911 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005914 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005915 then
5916 PY3LIBRARY=libpython3.so
5917 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005919 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).so'
5921 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005922 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005924 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005925 then
5926 PY3LIBRARY=libpython3.so
5927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 hp*|HP*)
5930 case `uname -m` in
5931 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
5934 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 ;;
5937 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005938 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005939 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).dylib'
5943 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005944 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005946 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005949 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
5951 esac
5952else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005953 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954 case $ac_sys_system in
5955 CYGWIN*)
5956 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 ;;
5959 esac
5960fi
5961
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005962if test "$cross_compiling" = yes; then
5963 RUNSHARED=
5964fi
5965
Matthias Kloseb9621712010-04-24 17:59:49 +00005966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5967$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005970if test -n "$ac_tool_prefix"; then
5971 for ac_prog in ar aal
5972 do
5973 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5974set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005977if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979else
5980 if test -n "$AR"; then
5981 ac_cv_prog_AR="$AR" # Let the user override the test.
5982else
5983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986 IFS=$as_save_IFS
5987 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 break 2
5993 fi
5994done
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996IFS=$as_save_IFS
5997
5998fi
5999fi
6000AR=$ac_cv_prog_AR
6001if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6003$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004else
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007fi
6008
6009
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006010 test -n "$AR" && break
6011 done
6012fi
6013if test -z "$AR"; then
6014 ac_ct_AR=$AR
6015 for ac_prog in ar aal
6016do
6017 # Extract the first word of "$ac_prog", so it can be a program name with args.
6018set dummy $ac_prog; ac_word=$2
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
6021if ${ac_cv_prog_ac_ct_AR+:} false; then :
6022 $as_echo_n "(cached) " >&6
6023else
6024 if test -n "$ac_ct_AR"; then
6025 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6026else
6027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030 IFS=$as_save_IFS
6031 test -z "$as_dir" && as_dir=.
6032 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006034 ac_cv_prog_ac_ct_AR="$ac_prog"
6035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6036 break 2
6037 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006039 done
6040IFS=$as_save_IFS
6041
6042fi
6043fi
6044ac_ct_AR=$ac_cv_prog_ac_ct_AR
6045if test -n "$ac_ct_AR"; then
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6047$as_echo "$ac_ct_AR" >&6; }
6048else
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
6051fi
6052
6053
6054 test -n "$ac_ct_AR" && break
6055done
6056
6057 if test "x$ac_ct_AR" = x; then
6058 AR="ar"
6059 else
6060 case $cross_compiling:$ac_tool_warned in
6061yes:)
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6064ac_tool_warned=yes ;;
6065esac
6066 AR=$ac_ct_AR
6067 fi
6068fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069
6070
6071# tweak ARFLAGS only if the user didn't set it on the command line
6072
6073if test -z "$ARFLAGS"
6074then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006075 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076fi
6077
doko@ubuntu.com58844492012-06-30 18:25:32 +02006078if test -n "$ac_tool_prefix"; then
6079 for ac_prog in readelf
6080 do
6081 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6082set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6084$as_echo_n "checking for $ac_word... " >&6; }
6085if ${ac_cv_prog_READELF+:} false; then :
6086 $as_echo_n "(cached) " >&6
6087else
6088 if test -n "$READELF"; then
6089 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6090else
6091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6092for as_dir in $PATH
6093do
6094 IFS=$as_save_IFS
6095 test -z "$as_dir" && as_dir=.
6096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006098 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6100 break 2
6101 fi
6102done
6103 done
6104IFS=$as_save_IFS
6105
6106fi
6107fi
6108READELF=$ac_cv_prog_READELF
6109if test -n "$READELF"; then
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6111$as_echo "$READELF" >&6; }
6112else
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6114$as_echo "no" >&6; }
6115fi
6116
6117
6118 test -n "$READELF" && break
6119 done
6120fi
6121if test -z "$READELF"; then
6122 ac_ct_READELF=$READELF
6123 for ac_prog in readelf
6124do
6125 # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6130 $as_echo_n "(cached) " >&6
6131else
6132 if test -n "$ac_ct_READELF"; then
6133 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6134else
6135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH
6137do
6138 IFS=$as_save_IFS
6139 test -z "$as_dir" && as_dir=.
6140 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006142 ac_cv_prog_ac_ct_READELF="$ac_prog"
6143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6144 break 2
6145 fi
6146done
6147 done
6148IFS=$as_save_IFS
6149
6150fi
6151fi
6152ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6153if test -n "$ac_ct_READELF"; then
6154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6155$as_echo "$ac_ct_READELF" >&6; }
6156else
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6158$as_echo "no" >&6; }
6159fi
6160
6161
6162 test -n "$ac_ct_READELF" && break
6163done
6164
6165 if test "x$ac_ct_READELF" = x; then
6166 READELF=":"
6167 else
6168 case $cross_compiling:$ac_tool_warned in
6169yes:)
6170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6172ac_tool_warned=yes ;;
6173esac
6174 READELF=$ac_ct_READELF
6175 fi
6176fi
6177
6178if test "$cross_compiling" = yes; then
6179 case "$READELF" in
6180 readelf|:)
6181 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6182 ;;
6183 esac
6184fi
6185
6186
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006189hp*|HP*)
6190 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 if test -z "$INSTALL"
6192 then
6193 INSTALL="${srcdir}/install-sh -c"
6194 fi
6195esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196# Find a good install program. We prefer a C program (faster),
6197# so one script is as good as another. But avoid the broken or
6198# incompatible versions:
6199# SysV /etc/install, /usr/sbin/install
6200# SunOS /usr/etc/install
6201# IRIX /sbin/install
6202# AIX /bin/install
6203# AmigaOS /C/install, which installs bootblocks on floppy discs
6204# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6205# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6206# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6207# OS/2's system install, which has a completely different semantic
6208# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006209# Reject install programs that cannot install multiple files.
6210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6211$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006213if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006214 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215else
6216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH
6218do
6219 IFS=$as_save_IFS
6220 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 # Account for people who put trailing slashes in PATH elements.
6222case $as_dir/ in #((
6223 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226 /usr/ucb/* ) ;;
6227 *)
6228 # OSF1 and SCO ODT 3.0 have their own names for install.
6229 # Don't use installbsd from OSF since it installs stuff as root
6230 # by default.
6231 for ac_prog in ginstall scoinst install; do
6232 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006233 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234 if test $ac_prog = install &&
6235 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6236 # AIX install. It has an incompatible calling convention.
6237 :
6238 elif test $ac_prog = install &&
6239 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6240 # program-specific install script used by HP pwplus--don't use.
6241 :
6242 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006243 rm -rf conftest.one conftest.two conftest.dir
6244 echo one > conftest.one
6245 echo two > conftest.two
6246 mkdir conftest.dir
6247 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6248 test -s conftest.one && test -s conftest.two &&
6249 test -s conftest.dir/conftest.one &&
6250 test -s conftest.dir/conftest.two
6251 then
6252 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6253 break 3
6254 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255 fi
6256 fi
6257 done
6258 done
6259 ;;
6260esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006261
6262 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263IFS=$as_save_IFS
6264
Matthias Kloseb9621712010-04-24 17:59:49 +00006265rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266
6267fi
6268 if test "${ac_cv_path_install+set}" = set; then
6269 INSTALL=$ac_cv_path_install
6270 else
6271 # As a last resort, use the slow shell script. Don't cache a
6272 # value for INSTALL within a source directory, because that will
6273 # break other packages using the cache if that directory is
6274 # removed, or if the value is a relative name.
6275 INSTALL=$ac_install_sh
6276 fi
6277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6279$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280
6281# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6282# It thinks the first close brace ends the variable substitution.
6283test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6284
6285test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6286
6287test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6288
Matthias Klose93a0ef12012-03-15 18:08:34 +01006289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6290$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6291if test -z "$MKDIR_P"; then
6292 if ${ac_cv_path_mkdir+:} false; then :
6293 $as_echo_n "(cached) " >&6
6294else
6295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6296for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6297do
6298 IFS=$as_save_IFS
6299 test -z "$as_dir" && as_dir=.
6300 for ac_prog in mkdir gmkdir; do
6301 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006302 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006303 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6304 'mkdir (GNU coreutils) '* | \
6305 'mkdir (coreutils) '* | \
6306 'mkdir (fileutils) '4.1*)
6307 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6308 break 3;;
6309 esac
6310 done
6311 done
6312 done
6313IFS=$as_save_IFS
6314
6315fi
6316
6317 test -d ./--version && rmdir ./--version
6318 if test "${ac_cv_path_mkdir+set}" = set; then
6319 MKDIR_P="$ac_cv_path_mkdir -p"
6320 else
6321 # As a last resort, use the slow shell script. Don't cache a
6322 # value for MKDIR_P within a source directory, because that will
6323 # break other packages using the cache if that directory is
6324 # removed, or if the value is a relative name.
6325 MKDIR_P="$ac_install_sh -d"
6326 fi
6327fi
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6329$as_echo "$MKDIR_P" >&6; }
6330
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
6332# Not every filesystem supports hard links
6333
6334if test -z "$LN" ; then
6335 case $ac_sys_system in
6336 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 *) LN=ln;;
6338 esac
6339fi
6340
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006341# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006342
6343ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6347$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348
6349# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006350if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351 withval=$with_pydebug;
6352if test "$withval" != no
6353then
6354
Matthias Kloseb9621712010-04-24 17:59:49 +00006355$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356
Matthias Kloseb9621712010-04-24 17:59:49 +00006357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6358$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006360 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006361else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363fi
6364else
Matthias Kloseb9621712010-04-24 17:59:49 +00006365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6366$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367fi
6368
6369
T. Woutersddbfa2c2017-05-23 01:30:49 +02006370# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6371# the ABI. This allows enabling assertions without changing the ABI.
6372assertions='false'
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6374$as_echo_n "checking for --with-assertions... " >&6; }
6375
6376# Check whether --with-assertions was given.
6377if test "${with_assertions+set}" = set; then :
6378 withval=$with_assertions;
6379if test "$withval" != no
6380then
6381 assertions='true'
6382fi
6383fi
6384
6385if test "$assertions" = 'true'; then
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6387$as_echo "yes" >&6; }
6388elif test "$Py_DEBUG" = 'true'; then
6389 assertions='true'
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6391$as_echo "implied by --with-pydebug" >&6; }
6392else
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
Brett Cannon63d98bc2016-09-06 17:12:40 -07006397# Enable optimization flags
6398
6399
6400Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6402$as_echo_n "checking for --enable-optimizations... " >&6; }
6403# Check whether --enable-optimizations was given.
6404if test "${enable_optimizations+set}" = set; then :
6405 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006406if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006407then
6408 Py_OPT='true'
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6410$as_echo "yes" >&6; };
6411else
6412 Py_OPT='false'
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; };
6415fi
6416else
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
6419fi
6420
6421if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006422 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6423 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006424 # 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 +00006425 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006426 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006427 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006428 DEF_MAKE_RULE="build_all"
6429else
6430 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006431 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006432 DEF_MAKE_RULE="all"
6433fi
6434
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006435# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6437$as_echo_n "checking for --with-lto... " >&6; }
6438
6439# Check whether --with-lto was given.
6440if test "${with_lto+set}" = set; then :
6441 withval=$with_lto;
6442if test "$withval" != no
6443then
6444 Py_LTO='true'
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6446$as_echo "yes" >&6; };
6447else
6448 Py_LTO='false'
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; };
6451fi
6452else
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454$as_echo "no" >&6; }
6455fi
6456
6457if test "$Py_LTO" = 'true' ; then
6458 case $CC in
6459 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006460 case $ac_sys_system in
6461 Darwin*)
6462 # Any changes made here should be reflected in the GCC+Darwin case below
6463 LTOFLAGS="-flto -Wl,-export_dynamic"
6464 ;;
6465 *)
6466 LTOFLAGS="-flto"
6467 ;;
6468 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006469 ;;
6470 *gcc*)
6471 case $ac_sys_system in
6472 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006473 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006474 ;;
6475 *)
6476 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6477 ;;
6478 esac
6479 ;;
6480 esac
Miss Islington (bot)1bb9dd32018-06-22 00:10:20 -07006481
6482 if test "$ac_cv_prog_cc_g" = "yes"
6483 then
6484 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6485 # to get debug symbols.
6486 LTOFLAGS="$LTOFLAGS -g"
6487 fi
6488
octaviansoldea4c814012017-09-08 12:14:33 -07006489 CFLAGS="$CFLAGS $LTOFLAGS"
6490 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006491fi
6492
Brett Cannon7188a3e2015-09-18 15:13:44 -07006493# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006494
6495
6496
6497
6498
Gregory P. Smith799520c2016-09-07 16:10:00 -07006499# Make this work on systems where llvm tools are not installed with their
6500# normal names in the default $PATH (ie: Ubuntu). They exist under the
6501# non-suffixed name in their versioned llvm directory.
6502llvm_bin_dir=''
6503llvm_path="${PATH}"
6504if test "${CC}" = "clang"
6505then
6506 clang_bin=`which clang`
6507 # Some systems install clang elsewhere as a symlink to the real path
6508 # which is where the related llvm tools are located.
6509 if test -L "${clang_bin}"
6510 then
6511 clang_dir=`dirname "${clang_bin}"`
6512 clang_bin=`readlink "${clang_bin}"`
6513 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6514 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6515 fi
6516fi
Zachary Ware5af85642015-12-21 12:09:17 -06006517
Gregory P. Smith799520c2016-09-07 16:10:00 -07006518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6519$as_echo_n "checking target system type... " >&6; }
6520if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006521 $as_echo_n "(cached) " >&6
6522else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006523 if test "x$target_alias" = x; then
6524 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006525else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006526 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6527 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6528fi
6529
6530fi
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6532$as_echo "$ac_cv_target" >&6; }
6533case $ac_cv_target in
6534*-*-*) ;;
6535*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6536esac
6537target=$ac_cv_target
6538ac_save_IFS=$IFS; IFS='-'
6539set x $ac_cv_target
6540shift
6541target_cpu=$1
6542target_vendor=$2
6543shift; shift
6544# Remember, the first character of IFS is used to create $*,
6545# except with old shells:
6546target_os=$*
6547IFS=$ac_save_IFS
6548case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6549
6550
6551# The aliases save the names the user supplied, while $host etc.
6552# will get canonicalized.
6553test -n "$target_alias" &&
6554 test "$program_prefix$program_suffix$program_transform_name" = \
6555 NONENONEs,x,x, &&
6556 program_prefix=${target_alias}-
6557# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6558set dummy $target_alias-llvm-profdata; ac_word=$2
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6560$as_echo_n "checking for $ac_word... " >&6; }
6561if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 case $LLVM_PROFDATA in
6565 [\\/]* | ?:[\\/]*)
6566 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6567 ;;
6568 *)
6569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6570for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006571do
6572 IFS=$as_save_IFS
6573 test -z "$as_dir" && as_dir=.
6574 for ac_exec_ext in '' $ac_executable_extensions; do
6575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006576 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6578 break 2
6579 fi
6580done
6581 done
6582IFS=$as_save_IFS
6583
Gregory P. Smith799520c2016-09-07 16:10:00 -07006584 ;;
6585esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006586fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006587LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6588if test -n "$LLVM_PROFDATA"; then
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6590$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006591else
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6593$as_echo "no" >&6; }
6594fi
6595
6596
Gregory P. Smith799520c2016-09-07 16:10:00 -07006597if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6598 if test "$build" = "$target"; then
6599 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6600 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6601set dummy llvm-profdata; ac_word=$2
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6603$as_echo_n "checking for $ac_word... " >&6; }
6604if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6605 $as_echo_n "(cached) " >&6
6606else
6607 case $ac_pt_LLVM_PROFDATA in
6608 [\\/]* | ?:[\\/]*)
6609 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6610 ;;
6611 *)
6612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6613for as_dir in ${llvm_path}
6614do
6615 IFS=$as_save_IFS
6616 test -z "$as_dir" && as_dir=.
6617 for ac_exec_ext in '' $ac_executable_extensions; do
6618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6619 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6620 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6621 break 2
6622 fi
6623done
6624 done
6625IFS=$as_save_IFS
6626
6627 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6628 ;;
6629esac
6630fi
6631ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6632if test -n "$ac_pt_LLVM_PROFDATA"; then
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6634$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6635else
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637$as_echo "no" >&6; }
6638fi
6639
6640 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6641 else
6642 LLVM_PROFDATA="''"
6643 fi
6644else
6645 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6646fi
6647
6648
6649if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6650then
6651 LLVM_PROF_FOUND="found"
6652else
6653 LLVM_PROF_FOUND="not-found"
6654fi
6655if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6656then
6657 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6658 if test -n "${found_llvm_profdata}"
6659 then
6660 # llvm-profdata isn't directly in $PATH in some cases.
6661 # https://apple.stackexchange.com/questions/197053/
6662 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6663 LLVM_PROF_FOUND=found
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6665$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6666 fi
6667fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006668LLVM_PROF_ERR=no
6669case $CC in
6670 *clang*)
6671 # Any changes made here should be reflected in the GCC+Darwin case below
6672 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6673 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006674 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6676 if test $LLVM_PROF_FOUND = not-found
6677 then
6678 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006679 if test "${REQUIRE_PGO}" = "yes"
6680 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006681 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 -07006682 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683 fi
6684 ;;
6685 *gcc*)
6686 case $ac_sys_system in
6687 Darwin*)
6688 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6689 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006690 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006691 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006692 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006693 then
6694 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006695 if test "${REQUIRE_PGO}" = "yes"
6696 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006697 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 -07006698 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006699 fi
6700 ;;
6701 *)
6702 PGO_PROF_GEN_FLAG="-fprofile-generate"
6703 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6704 LLVM_PROF_MERGER="true"
6705 LLVM_PROF_FILE=""
6706 ;;
6707 esac
6708 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006709 *icc*)
6710 PGO_PROF_GEN_FLAG="-prof-gen"
6711 PGO_PROF_USE_FLAG="-prof-use"
6712 LLVM_PROF_MERGER="true"
6713 LLVM_PROF_FILE=""
6714 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006715esac
6716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6718# merged with this chunk of code?
6719
6720# Optimizer/debugger flags
6721# ------------------------
6722# (The following bit of code is complicated enough - please keep things
6723# indented properly. Just pretend you're editing Python code. ;-)
6724
6725# There are two parallel sets of case statements below, one that checks to
6726# see if OPT was set and one that does BASECFLAGS setting based upon
6727# compiler and platform. BASECFLAGS tweaks need to be made even if the
6728# user set OPT.
6729
6730# tweak OPT based on compiler and platform, only if the user didn't set
6731# it on the command line
6732
Victor Stinner9ed34a82017-05-02 22:35:58 +02006733
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006734if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735then
6736 case $GCC in
6737 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6739 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6740 WRAP="-fwrapv"
6741 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006742
Stefan Krahaf04ff22011-12-08 22:20:31 +01006743 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006744 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006745 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006746 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006747 *)
6748 if $CC --version 2>&1 | grep -q clang
6749 then
6750 cc_is_clang=1
6751 else
6752 cc_is_clang=
6753 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006754 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006755
Victor Stinner35f3d242017-04-21 12:35:24 +02006756 if test -n "${cc_is_clang}"
6757 then
6758 # Clang also needs -fwrapv
6759 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006760 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6761 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006762 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006763 fi
6764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006765 case $ac_cv_prog_cc_g in
6766 yes)
6767 if test "$Py_DEBUG" = 'true' ; then
6768 # Optimization messes up debuggers, so turn it off for
6769 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006770 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006771 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006772 else
Victor Stinner28205b22017-04-21 11:24:34 +02006773 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006774 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775 else
Victor Stinner28205b22017-04-21 11:24:34 +02006776 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 fi
6778 ;;
6779 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006780 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781 ;;
6782 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784 case $ac_sys_system in
6785 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6786 ;;
6787 esac
6788 ;;
6789
6790 *)
6791 OPT="-O"
6792 ;;
6793 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794fi
6795
6796
6797
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799# The -arch flags for universal builds on OSX
6800UNIVERSAL_ARCH_FLAGS=
6801
6802
6803# tweak BASECFLAGS based on compiler and platform
6804case $GCC in
6805yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006806 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006807
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6809$as_echo_n "checking for -Wextra... " >&6; }
6810 ac_save_cc="$CC"
6811 CC="$CC -Wextra -Werror"
6812 if ${ac_cv_extra_warnings+:} false; then :
6813 $as_echo_n "(cached) " >&6
6814else
6815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6816/* end confdefs.h. */
6817
6818
6819int
6820main ()
6821{
6822
6823 ;
6824 return 0;
6825}
6826
6827_ACEOF
6828if ac_fn_c_try_compile "$LINENO"; then :
6829
6830 ac_cv_extra_warnings=yes
6831
6832else
6833
6834 ac_cv_extra_warnings=no
6835
6836fi
6837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6838fi
6839
6840 CC="$ac_save_cc"
6841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6842$as_echo "$ac_cv_extra_warnings" >&6; }
6843
6844 if test $ac_cv_extra_warnings = yes
6845 then
6846 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6847 fi
6848
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006849 # Python doesn't violate C99 aliasing rules, but older versions of
6850 # GCC produce warnings for legal Python code. Enable
6851 # -fno-strict-aliasing on versions of GCC that support but produce
6852 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6854$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855 ac_save_cc="$CC"
6856 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006857 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006858 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006863
Matthias Kloseb159a552010-04-25 21:00:44 +00006864
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006865int
6866main ()
6867{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006868
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006869 ;
6870 return 0;
6871}
Matthias Kloseb159a552010-04-25 21:00:44 +00006872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006874if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006875
6876 CC="$ac_save_cc -fstrict-aliasing"
6877 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006879/* end confdefs.h. */
6880
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006881 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006882int
6883main ()
6884{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006885double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006886 ;
6887 return 0;
6888}
Matthias Kloseb159a552010-04-25 21:00:44 +00006889
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006891if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006892
6893 ac_cv_no_strict_aliasing=no
6894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895else
Matthias Kloseb159a552010-04-25 21:00:44 +00006896
6897 ac_cv_no_strict_aliasing=yes
6898
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006899fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006901
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006902else
Matthias Kloseb159a552010-04-25 21:00:44 +00006903
6904 ac_cv_no_strict_aliasing=no
6905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006908fi
6909
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006910 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6913$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006914 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 then
6916 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6917 fi
6918
Zachary Ware5af85642015-12-21 12:09:17 -06006919 # ICC doesn't recognize the option, but only emits a warning
6920 ## XXX does it emit an unused result warning and can it be disabled?
6921 case "$CC" in
6922 *icc*)
6923 ac_cv_disable_unused_result_warning=no
6924 ;;
6925 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6927$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6928 ac_save_cc="$CC"
6929 CC="$CC -Wunused-result -Werror"
6930 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006931 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006932 $as_echo_n "(cached) " >&6
6933else
6934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6935/* end confdefs.h. */
6936
6937
6938int
6939main ()
6940{
6941
6942 ;
6943 return 0;
6944}
6945
6946_ACEOF
6947if ac_fn_c_try_compile "$LINENO"; then :
6948
6949 ac_cv_disable_unused_result_warning=yes
6950
6951else
6952
6953 ac_cv_disable_unused_result_warning=no
6954
6955fi
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6957fi
6958
6959 CFLAGS="$save_CFLAGS"
6960 CC="$ac_save_cc"
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6962$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006963 ;;
6964 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006965
6966 if test $ac_cv_disable_unused_result_warning = yes
6967 then
6968 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006969 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6970 fi
6971
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6973$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6974 ac_save_cc="$CC"
6975 CC="$CC -Wunused-parameter -Werror"
6976 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6977 $as_echo_n "(cached) " >&6
6978else
6979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6980/* end confdefs.h. */
6981
6982
6983int
6984main ()
6985{
6986
6987 ;
6988 return 0;
6989}
6990
6991_ACEOF
6992if ac_fn_c_try_compile "$LINENO"; then :
6993
6994 ac_cv_disable_unused_parameter_warning=yes
6995
6996else
6997
6998 ac_cv_disable_unused_parameter_warning=no
6999
7000fi
7001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7002fi
7003
7004 CC="$ac_save_cc"
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7006$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7007
7008 if test $ac_cv_disable_unused_parameter_warning = yes
7009 then
7010 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7011 fi
7012
7013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7014$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7015 ac_save_cc="$CC"
7016 CC="$CC -Wmissing-field-initializers -Werror"
7017 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7018 $as_echo_n "(cached) " >&6
7019else
7020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7021/* end confdefs.h. */
7022
7023
7024int
7025main ()
7026{
7027
7028 ;
7029 return 0;
7030}
7031
7032_ACEOF
7033if ac_fn_c_try_compile "$LINENO"; then :
7034
7035 ac_cv_disable_missing_field_initializers=yes
7036
7037else
7038
7039 ac_cv_disable_missing_field_initializers=no
7040
7041fi
7042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7043fi
7044
7045 CC="$ac_save_cc"
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7047$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7048
7049 if test $ac_cv_disable_missing_field_initializers = yes
7050 then
7051 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007052 fi
7053
Serhiy Storchakaef91dde2018-05-25 13:16:51 +03007054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
7055$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
7056 ac_save_cc="$CC"
7057 CC="$CC -Wcast-function-type -Werror"
7058 if ${ac_cv_disable_cast_function_type+:} false; then :
7059 $as_echo_n "(cached) " >&6
7060else
7061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062/* end confdefs.h. */
7063
7064
7065int
7066main ()
7067{
7068
7069 ;
7070 return 0;
7071}
7072
7073_ACEOF
7074if ac_fn_c_try_compile "$LINENO"; then :
7075
7076 ac_cv_disable_cast_function_type=yes
7077
7078else
7079
7080 ac_cv_disable_cast_function_type=no
7081
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084fi
7085
7086 CC="$ac_save_cc"
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
7088$as_echo "$ac_cv_disable_cast_function_type" >&6; }
7089
7090 if test $ac_cv_disable_cast_function_type = yes
7091 then
7092 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
7093 fi
7094
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7096$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7097 ac_save_cc="$CC"
7098 CC="$CC -Wsign-compare"
7099 save_CFLAGS="$CFLAGS"
7100 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7101 $as_echo_n "(cached) " >&6
7102else
7103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7104/* end confdefs.h. */
7105
7106
7107int
7108main ()
7109{
7110
7111 ;
7112 return 0;
7113}
7114
7115_ACEOF
7116if ac_fn_c_try_compile "$LINENO"; then :
7117
7118 ac_cv_enable_sign_compare_warning=yes
7119
7120else
7121
7122 ac_cv_enable_sign_compare_warning=no
7123
7124fi
7125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7126fi
7127
7128 CFLAGS="$save_CFLAGS"
7129 CC="$ac_save_cc"
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7131$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7132
7133 if test $ac_cv_enable_sign_compare_warning = yes
7134 then
7135 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7136 fi
7137
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7139$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7140 ac_save_cc="$CC"
7141 CC="$CC -Wunreachable-code"
7142 save_CFLAGS="$CFLAGS"
7143 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7144 $as_echo_n "(cached) " >&6
7145else
7146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7147/* end confdefs.h. */
7148
7149
7150int
7151main ()
7152{
7153
7154 ;
7155 return 0;
7156}
7157
7158_ACEOF
7159if ac_fn_c_try_compile "$LINENO"; then :
7160
7161 ac_cv_enable_unreachable_code_warning=yes
7162
7163else
7164
7165 ac_cv_enable_unreachable_code_warning=no
7166
7167fi
7168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7169fi
7170
7171 CFLAGS="$save_CFLAGS"
7172 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007173
7174 # Don't enable unreachable code warning in debug mode, since it usually
7175 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007176 # Issue #24324: Unfortunately, the unreachable code warning does not work
7177 # correctly on gcc and has been silently removed from the compiler.
7178 # It is supported on clang but on OS X systems gcc may be an alias
7179 # for clang. Try to determine if the compiler is not really gcc and,
7180 # if so, only then enable the warning.
7181 if test $ac_cv_enable_unreachable_code_warning = yes && \
7182 test "$Py_DEBUG" != "true" && \
7183 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007184 then
7185 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007186 else
7187 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007188 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7190$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007191
Miss Islington (bot)d6e789c2018-06-05 17:12:06 -07007192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7193$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7194 ac_save_cc="$CC"
7195 CC="$CC -Werror -Wstrict-prototypes"
7196 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7197 $as_echo_n "(cached) " >&6
7198else
7199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h. */
7201
7202
7203int
7204main ()
7205{
7206
7207 ;
7208 return 0;
7209}
7210
7211_ACEOF
7212if ac_fn_c_try_compile "$LINENO"; then :
7213
7214 ac_cv_enable_strict_prototypes_warning=yes
7215
7216else
7217
7218 ac_cv_enable_strict_prototypes_warning=no
7219
7220fi
7221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7222fi
7223
7224 CC="$ac_save_cc"
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7226$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7227
7228 if test $ac_cv_enable_strict_prototypes_warning = yes
7229 then
7230 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7231 fi
7232
Victor Stinner193ee0a2017-02-06 14:24:00 +01007233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7234$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7235 ac_save_cc="$CC"
7236 CC="$CC -Werror=implicit-function-declaration"
7237 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7238 $as_echo_n "(cached) " >&6
7239else
7240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7241/* end confdefs.h. */
7242
7243
7244int
7245main ()
7246{
7247
7248 ;
7249 return 0;
7250}
7251
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254
7255 ac_cv_enable_implicit_function_declaration_error=yes
7256
7257else
7258
7259 ac_cv_enable_implicit_function_declaration_error=no
7260
7261fi
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263fi
7264
7265 CC="$ac_save_cc"
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7267$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7268
7269 if test $ac_cv_enable_implicit_function_declaration_error = yes
7270 then
7271 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7272 fi
7273
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7275 # support. Without this, treatment of subnormals doesn't follow
7276 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007277 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278 alpha*)
7279 BASECFLAGS="$BASECFLAGS -mieee"
7280 ;;
7281 esac
7282
7283 case $ac_sys_system in
7284 SCO_SV*)
7285 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7286 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007287
7288 # is there any other compiler on Darwin besides gcc?
7289 Darwin*)
7290 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7291 # used to be here, but non-Apple gcc doesn't accept them.
7292 if test "${CC}" = gcc
7293 then
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007295$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007296 case "${UNIVERSALSDK}" in
7297 */MacOSX10.4u.sdk)
7298 # Build using 10.4 SDK, force usage of gcc when the
7299 # compiler is gcc, otherwise the user will get very
7300 # confusing error messages when building on OSX 10.6
7301 CC=gcc-4.0
7302 CPP=cpp-4.0
7303 ;;
7304 esac
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007306$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007307 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308
Ned Deily87adb6e2013-10-18 21:09:56 -07007309 if test "${enable_universalsdk}"
7310 then
7311 case "$UNIVERSAL_ARCHS" in
7312 32-bit)
7313 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7314 LIPO_32BIT_FLAGS=""
7315 ARCH_RUN_32BIT=""
7316 ;;
7317 64-bit)
7318 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7319 LIPO_32BIT_FLAGS=""
7320 ARCH_RUN_32BIT="true"
7321 ;;
7322 all)
7323 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7324 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7325 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7326 ;;
7327 intel)
7328 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7329 LIPO_32BIT_FLAGS="-extract i386"
7330 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7331 ;;
7332 intel-32)
7333 UNIVERSAL_ARCH_FLAGS="-arch i386"
7334 LIPO_32BIT_FLAGS=""
7335 ARCH_RUN_32BIT=""
7336 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007337 intel-64)
7338 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7339 LIPO_32BIT_FLAGS=""
7340 ARCH_RUN_32BIT="true"
7341 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007342 3-way)
7343 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7344 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7345 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7346 ;;
7347 *)
7348 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7349 ;;
7350 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351
Ned Deily87adb6e2013-10-18 21:09:56 -07007352 if test "${UNIVERSALSDK}" != "/"
7353 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007354 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7355 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007357 else
7358 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7359 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 fi
7361 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362
Ned Deily87adb6e2013-10-18 21:09:56 -07007363 # Calculate an appropriate deployment target for this build:
7364 # The deployment target value is used explicitly to enable certain
7365 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007366 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007367 # component of the string returned by distutils.get_platform().
7368 #
7369 # Use the value from:
7370 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7371 # 2. the operating system version of the build machine if >= 10.6
7372 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7373 # below to pick either 10.3, 10.4, or 10.5 as the target.
7374 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375
Ned Deily87adb6e2013-10-18 21:09:56 -07007376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7377$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007378 cur_target_major=`sw_vers -productVersion | \
7379 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7380 cur_target_minor=`sw_vers -productVersion | \
7381 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7382 cur_target="${cur_target_major}.${cur_target_minor}"
7383 if test ${cur_target_major} -eq 10 && \
7384 test ${cur_target_minor} -ge 3 && \
7385 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007386 then
Ned Deily36820b62014-06-25 13:44:22 -07007387 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007388 cur_target=10.3
7389 if test ${enable_universalsdk}
7390 then
7391 case "$UNIVERSAL_ARCHS" in
7392 all|3-way|intel|64-bit)
7393 # These configurations were first supported in 10.5
7394 cur_target='10.5'
7395 ;;
7396 esac
7397 else
7398 if test `/usr/bin/arch` = "i386"
7399 then
7400 # 10.4 was the first release to support Intel archs
7401 cur_target="10.4"
7402 fi
7403 fi
7404 fi
7405 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007406
Ned Deily87adb6e2013-10-18 21:09:56 -07007407 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7408 # environment with a value that is the same as what we'll use
7409 # in the Makefile to ensure that we'll get the same compiler
7410 # environment during configure and build time.
7411 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7412 export MACOSX_DEPLOYMENT_TARGET
7413 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7415$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007416
Ned Deily87adb6e2013-10-18 21:09:56 -07007417 # end of Darwin* tests
7418 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 esac
7420 ;;
7421
7422*)
7423 case $ac_sys_system in
7424 OpenUNIX*|UnixWare*)
7425 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7426 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427 SCO_SV*)
7428 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7429 ;;
7430 esac
7431 ;;
7432esac
7433
Zachary Ware5af85642015-12-21 12:09:17 -06007434# ICC needs -fp-model strict or floats behave badly
7435case "$CC" in
7436*icc*)
7437 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7438 ;;
7439esac
7440
T. Woutersddbfa2c2017-05-23 01:30:49 +02007441if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442 :
7443else
7444 OPT="-DNDEBUG $OPT"
7445fi
7446
7447if test "$ac_arch_flags"
7448then
7449 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7450fi
7451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452# On some compilers, pthreads are available without further options
7453# (e.g. MacOS X). On some of these systems, the compiler will not
7454# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7455# So we have to see first whether pthreads are available without
7456# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7458$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007459if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461else
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463 ac_cv_pthread_is_default=no
7464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466/* end confdefs.h. */
7467
Stefan Krah7dba5942012-11-22 22:49:11 +01007468#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469#include <pthread.h>
7470
7471void* routine(void* p){return NULL;}
7472
7473int main(){
7474 pthread_t p;
7475 if(pthread_create(&p,NULL,routine,NULL)!=0)
7476 return 1;
7477 (void)pthread_detach(p);
7478 return 0;
7479}
7480
7481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007482if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483
7484 ac_cv_pthread_is_default=yes
7485 ac_cv_kthread=no
7486 ac_cv_pthread=no
7487
7488else
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493fi
7494
7495
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496fi
7497
Matthias Kloseb9621712010-04-24 17:59:49 +00007498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7499$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500
7501
7502if test $ac_cv_pthread_is_default = yes
7503then
7504 ac_cv_kpthread=no
7505else
7506# -Kpthread, if available, provides the right #defines
7507# and linker options to make pthread_create available
7508# Some compilers won't report that they do not support -Kpthread,
7509# so we need to run a program to see whether it really made the
7510# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7512$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007513if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515else
7516 ac_save_cc="$CC"
7517CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007518if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519 ac_cv_kpthread=no
7520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522/* end confdefs.h. */
7523
Stefan Krah7dba5942012-11-22 22:49:11 +01007524#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525#include <pthread.h>
7526
7527void* routine(void* p){return NULL;}
7528
7529int main(){
7530 pthread_t p;
7531 if(pthread_create(&p,NULL,routine,NULL)!=0)
7532 return 1;
7533 (void)pthread_detach(p);
7534 return 0;
7535}
7536
7537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007538if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539 ac_cv_kpthread=yes
7540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7544 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545fi
7546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007547CC="$ac_save_cc"
7548fi
7549
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7551$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552fi
7553
7554if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7555then
7556# -Kthread, if available, provides the right #defines
7557# and linker options to make pthread_create available
7558# Some compilers won't report that they do not support -Kthread,
7559# so we need to run a program to see whether it really made the
7560# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7562$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007563if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565else
7566 ac_save_cc="$CC"
7567CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007568if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569 ac_cv_kthread=no
7570else
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572/* end confdefs.h. */
7573
Stefan Krah7dba5942012-11-22 22:49:11 +01007574#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575#include <pthread.h>
7576
7577void* routine(void* p){return NULL;}
7578
7579int main(){
7580 pthread_t p;
7581 if(pthread_create(&p,NULL,routine,NULL)!=0)
7582 return 1;
7583 (void)pthread_detach(p);
7584 return 0;
7585}
7586
7587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007588if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589 ac_cv_kthread=yes
7590else
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595fi
7596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597CC="$ac_save_cc"
7598fi
7599
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7601$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602fi
7603
7604if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7605then
7606# -pthread, if available, provides the right #defines
7607# and linker options to make pthread_create available
7608# Some compilers won't report that they do not support -pthread,
7609# so we need to run a program to see whether it really made the
7610# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7612$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007613if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615else
7616 ac_save_cc="$CC"
7617CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007618if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619 ac_cv_pthread=no
7620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622/* end confdefs.h. */
7623
Stefan Krah7dba5942012-11-22 22:49:11 +01007624#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625#include <pthread.h>
7626
7627void* routine(void* p){return NULL;}
7628
7629int main(){
7630 pthread_t p;
7631 if(pthread_create(&p,NULL,routine,NULL)!=0)
7632 return 1;
7633 (void)pthread_detach(p);
7634 return 0;
7635}
7636
7637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007638if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639 ac_cv_pthread=yes
7640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645fi
7646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007647CC="$ac_save_cc"
7648fi
7649
Matthias Kloseb9621712010-04-24 17:59:49 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7651$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
7653
7654# If we have set a CC compiler flag for thread support then
7655# check if it works for CXX, too.
7656ac_cv_cxx_thread=no
7657if test ! -z "$CXX"
7658then
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7660$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661ac_save_cxx="$CXX"
7662
7663if test "$ac_cv_kpthread" = "yes"
7664then
7665 CXX="$CXX -Kpthread"
7666 ac_cv_cxx_thread=yes
7667elif test "$ac_cv_kthread" = "yes"
7668then
7669 CXX="$CXX -Kthread"
7670 ac_cv_cxx_thread=yes
7671elif test "$ac_cv_pthread" = "yes"
7672then
7673 CXX="$CXX -pthread"
7674 ac_cv_cxx_thread=yes
7675fi
7676
7677if test $ac_cv_cxx_thread = yes
7678then
7679 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7680 $CXX -c conftest.$ac_ext 2>&5
7681 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7682 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7683 then
7684 ac_cv_cxx_thread=yes
7685 else
7686 ac_cv_cxx_thread=no
7687 fi
7688 rm -fr conftest*
7689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7691$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692fi
7693CXX="$ac_save_cxx"
7694
7695
7696# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7698$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007699if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701else
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703/* end confdefs.h. */
7704#include <stdlib.h>
7705#include <stdarg.h>
7706#include <string.h>
7707#include <float.h>
7708
7709int
7710main ()
7711{
7712
7713 ;
7714 return 0;
7715}
7716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007717if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718 ac_cv_header_stdc=yes
7719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7723
7724if test $ac_cv_header_stdc = yes; then
7725 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727/* end confdefs.h. */
7728#include <string.h>
7729
7730_ACEOF
7731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 $EGREP "memchr" >/dev/null 2>&1; then :
7733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734else
7735 ac_cv_header_stdc=no
7736fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007737rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738
7739fi
7740
7741if test $ac_cv_header_stdc = yes; then
7742 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744/* end confdefs.h. */
7745#include <stdlib.h>
7746
7747_ACEOF
7748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007749 $EGREP "free" >/dev/null 2>&1; then :
7750
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751else
7752 ac_cv_header_stdc=no
7753fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007754rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755
7756fi
7757
7758if test $ac_cv_header_stdc = yes; then
7759 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 :
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764/* end confdefs.h. */
7765#include <ctype.h>
7766#include <stdlib.h>
7767#if ((' ' & 0x0FF) == 0x020)
7768# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7769# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7770#else
7771# define ISLOWER(c) \
7772 (('a' <= (c) && (c) <= 'i') \
7773 || ('j' <= (c) && (c) <= 'r') \
7774 || ('s' <= (c) && (c) <= 'z'))
7775# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7776#endif
7777
7778#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7779int
7780main ()
7781{
7782 int i;
7783 for (i = 0; i < 256; i++)
7784 if (XOR (islower (i), ISLOWER (i))
7785 || toupper (i) != TOUPPER (i))
7786 return 2;
7787 return 0;
7788}
7789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007790if ac_fn_c_try_run "$LINENO"; then :
7791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797fi
7798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799fi
7800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7802$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803if test $ac_cv_header_stdc = yes; then
7804
Matthias Kloseb9621712010-04-24 17:59:49 +00007805$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007806
7807fi
7808
stratakise768c862018-01-23 16:11:24 +01007809for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007810fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007811ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007812sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007813unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007814poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007815sys/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 +01007816sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007817sys/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 +01007818sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007819sys/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 -07007820libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007821linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007822sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007823do :
7824 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7825ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007826if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007828#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007829_ACEOF
7830
7831fi
7832
Guido van Rossum627b2d71993-12-24 10:39:16 +00007833done
7834
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007835ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007836for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7839$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007840if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007842else
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007844/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845#include <sys/types.h>
7846#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007847
Martin v. Löwis11437992002-04-12 09:54:03 +00007848int
7849main ()
7850{
7851if ((DIR *) 0)
7852return 0;
7853 ;
7854 return 0;
7855}
7856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007859else
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007864eval ac_res=\$$as_ac_Header
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7866$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007867if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007869#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007870_ACEOF
7871
7872ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007874
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007875done
7876# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7877if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7879$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007880if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007882else
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887/* Override any GCC internal prototype to avoid an error.
7888 Use char because int might match the return type of a GCC
7889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890#ifdef __cplusplus
7891extern "C"
7892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007893char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007894int
7895main ()
7896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ;
7899 return 0;
7900}
7901_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902for ac_lib in '' dir; do
7903 if test -z "$ac_lib"; then
7904 ac_res="none required"
7905 else
7906 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007907 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007908 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912rm -f core conftest.err conftest.$ac_objext \
7913 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007914 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917done
Victor Stinnere0be4232011-10-25 13:06:09 +02007918if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920else
7921 ac_cv_search_opendir=no
7922fi
7923rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007924LIBS=$ac_func_search_save_LIBS
7925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7927$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007929if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007931
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007933
Michael W. Hudson54241132001-12-07 15:38:26 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7936$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007937if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007939else
7940 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944/* Override any GCC internal prototype to avoid an error.
7945 Use char because int might match the return type of a GCC
7946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007947#ifdef __cplusplus
7948extern "C"
7949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007950char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007951int
7952main ()
7953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ;
7956 return 0;
7957}
7958_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959for ac_lib in '' x; do
7960 if test -z "$ac_lib"; then
7961 ac_res="none required"
7962 else
7963 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007964 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969rm -f core conftest.err conftest.$ac_objext \
7970 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007971 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974done
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977else
7978 ac_cv_search_opendir=no
7979fi
7980rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007981LIBS=$ac_func_search_save_LIBS
7982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7984$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007985ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007989fi
7990
7991fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007992
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7994$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007995if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008000#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001int
8002main ()
8003{
8004return makedev(0, 0);
8005 ;
8006 return 0;
8007}
8008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008010 ac_cv_header_sys_types_h_makedev=yes
8011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008014rm -f core conftest.err conftest.$ac_objext \
8015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008016
8017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8019$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020
8021if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008022ac_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 +02008023if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008024
Matthias Kloseb9621712010-04-24 17:59:49 +00008025$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008026
8027fi
8028
8029
8030
8031 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 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 +02008033if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008036
8037fi
8038
8039
8040 fi
8041fi
8042
Michael W. Hudson54241132001-12-07 15:38:26 +00008043
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008044# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8045# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8046SAVE_CFLAGS=$CFLAGS
8047CFLAGS="-std=c99 $CFLAGS"
8048for ac_header in bluetooth/bluetooth.h
8049do :
8050 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8051if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8052 cat >>confdefs.h <<_ACEOF
8053#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8054_ACEOF
8055
8056fi
8057
8058done
8059
8060CFLAGS=$SAVE_CFLAGS
8061
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008062# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8063for ac_header in net/if.h
8064do :
8065 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8066#ifdef STDC_HEADERS
8067# include <stdlib.h>
8068# include <stddef.h>
8069#else
8070# ifdef HAVE_STDLIB_H
8071# include <stdlib.h>
8072# endif
8073#endif
8074#ifdef HAVE_SYS_SOCKET_H
8075# include <sys/socket.h>
8076#endif
8077
8078"
Victor Stinnere0be4232011-10-25 13:06:09 +02008079if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008080 cat >>confdefs.h <<_ACEOF
8081#define HAVE_NET_IF_H 1
8082_ACEOF
8083
8084fi
8085
8086done
8087
8088
Martin v. Löwis11017b12006-01-14 18:12:57 +00008089# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008090for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008091do :
8092 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 +00008093#ifdef HAVE_ASM_TYPES_H
8094#include <asm/types.h>
8095#endif
8096#ifdef HAVE_SYS_SOCKET_H
8097#include <sys/socket.h>
8098#endif
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100"
Victor Stinnere0be4232011-10-25 13:06:09 +02008101if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008103#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008104_ACEOF
8105
8106fi
8107
8108done
8109
8110
caaveryeffc12f2017-09-06 18:18:10 -04008111for ac_header in linux/vm_sockets.h
8112do :
8113 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8114#ifdef HAVE_SYS_SOCKET_H
8115#include <sys/socket.h>
8116#endif
8117
8118"
8119if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8120 cat >>confdefs.h <<_ACEOF
8121#define HAVE_LINUX_VM_SOCKETS_H 1
8122_ACEOF
8123
8124fi
8125
8126done
8127
8128
Charles-François Natali47413c12011-10-06 19:47:44 +02008129# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008130for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008131do :
8132 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8133ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8134#ifdef HAVE_SYS_SOCKET_H
8135#include <sys/socket.h>
8136#endif
8137
8138"
8139if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8140 cat >>confdefs.h <<_ACEOF
8141#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8142_ACEOF
8143
8144fi
8145
8146done
8147
8148
Guido van Rossum627b2d71993-12-24 10:39:16 +00008149# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008150was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8152$as_echo_n "checking for clock_t in time.h... " >&6; }
8153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008154/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008155#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008156
8157_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008160 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008161else
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008165
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008166
Guido van Rossum627b2d71993-12-24 10:39:16 +00008167fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008168rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008169
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8171$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8174$as_echo_n "checking for makedev... " >&6; }
8175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008177
Jesus Cea740f53a2010-04-28 11:35:30 +00008178#if defined(MAJOR_IN_MKDEV)
8179#include <sys/mkdev.h>
8180#elif defined(MAJOR_IN_SYSMACROS)
8181#include <sys/sysmacros.h>
8182#else
8183#include <sys/types.h>
8184#endif
8185
Neal Norwitz11690112002-07-30 01:08:28 +00008186int
8187main ()
8188{
Jesus Cea740f53a2010-04-28 11:35:30 +00008189
8190 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008191 ;
8192 return 0;
8193}
Matthias Kloseb159a552010-04-25 21:00:44 +00008194
Neal Norwitz11690112002-07-30 01:08:28 +00008195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008196if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008197 ac_cv_has_makedev=yes
8198else
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201rm -f core conftest.err conftest.$ac_objext \
8202 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8204$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008205if test "$ac_cv_has_makedev" = "yes"; then
8206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008208
8209fi
8210
Christian Heimes985ecdc2013-11-20 11:46:18 +01008211# byte swapping
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8213$as_echo_n "checking for le64toh... " >&6; }
8214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8215/* end confdefs.h. */
8216
8217#ifdef HAVE_ENDIAN_H
8218#include <endian.h>
8219#elif defined(HAVE_SYS_ENDIAN_H)
8220#include <sys/endian.h>
8221#endif
8222
8223int
8224main ()
8225{
8226
8227 le64toh(1)
8228 ;
8229 return 0;
8230}
8231
8232_ACEOF
8233if ac_fn_c_try_link "$LINENO"; then :
8234 ac_cv_has_le64toh=yes
8235else
8236 ac_cv_has_le64toh=no
8237fi
8238rm -f core conftest.err conftest.$ac_objext \
8239 conftest$ac_exeext conftest.$ac_ext
8240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8241$as_echo "$ac_cv_has_le64toh" >&6; }
8242if test "$ac_cv_has_le64toh" = "yes"; then
8243
8244$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8245
8246fi
8247
Martin v. Löwis399a6892002-10-04 10:22:02 +00008248use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008249# Don't use largefile support for GNU/Hurd
8250case $ac_sys_system in GNU*)
8251 use_lfs=no
8252esac
8253
Martin v. Löwis399a6892002-10-04 10:22:02 +00008254if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008255# Two defines needed to enable largefile support on various platforms
8256# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008257case $ac_sys_system/$ac_sys_release in
8258AIX*)
8259
8260$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8261
8262 ;;
8263esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008266
8267
Matthias Kloseb9621712010-04-24 17:59:49 +00008268$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008269
Martin v. Löwis399a6892002-10-04 10:22:02 +00008270fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008271
Guido van Rossum84e7b241996-08-19 21:59:00 +00008272# Add some code to confdefs.h so that the test for off_t works on SCO
8273cat >> confdefs.h <<\EOF
8274#if defined(SCO_DS)
8275#undef _OFF_T
8276#endif
8277EOF
8278
Guido van Rossumef2255b2000-03-10 22:30:29 +00008279# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008280ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008281if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008283else
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
8285cat >>confdefs.h <<_ACEOF
8286#define mode_t int
8287_ACEOF
8288
8289fi
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008294else
Martin v. Löwis11437992002-04-12 09:54:03 +00008295
8296cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008298_ACEOF
8299
8300fi
8301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008303if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008305else
Martin v. Löwis11437992002-04-12 09:54:03 +00008306
8307cat >>confdefs.h <<_ACEOF
8308#define pid_t int
8309_ACEOF
8310
8311fi
8312
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008315#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008316_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008319if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008321else
Martin v. Löwis11437992002-04-12 09:54:03 +00008322
8323cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008325_ACEOF
8326
8327fi
8328
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8330$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008331if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008333else
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008336#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008337
8338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341 ac_cv_type_uid_t=yes
8342else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008343 ac_cv_type_uid_t=no
8344fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008345rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8349$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008350if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008353
8354
Matthias Kloseb9621712010-04-24 17:59:49 +00008355$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008356
8357fi
8358
Mark Dickinson983bc162012-12-02 12:11:38 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008361if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008364
8365fi
8366
Stefan Krah1919b7e2012-03-21 18:25:23 +01008367ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8368if test "x$ac_cv_type___uint128_t" = xyes; then :
8369
8370$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8371
8372fi
8373
Jack Jansendd19cf82001-12-06 22:36:17 +00008374
Michael W. Hudson54241132001-12-07 15:38:26 +00008375# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008376# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377# The cast to long int works around a bug in the HP C Compiler
8378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8380# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8382$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008383if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 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 +00008387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388else
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 if test "$ac_cv_type_int" = yes; then
8390 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008392as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008393See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394 else
8395 ac_cv_sizeof_int=0
8396 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8401$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402
8403
8404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008406#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008408
8409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410# The cast to long int works around a bug in the HP C Compiler
8411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8415$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008416if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008418else
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 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 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 if test "$ac_cv_type_long" = yes; then
8423 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008426See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427 else
8428 ac_cv_sizeof_long=0
8429 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8434$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435
8436
8437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008439#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008440_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008441
8442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443# The cast to long int works around a bug in the HP C Compiler
8444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8448$as_echo_n "checking size of long long... " >&6; }
8449if ${ac_cv_sizeof_long_long+:} false; then :
8450 $as_echo_n "(cached) " >&6
8451else
8452 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8453
8454else
8455 if test "$ac_cv_type_long_long" = yes; then
8456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8458as_fn_error 77 "cannot compute sizeof (long long)
8459See \`config.log' for more details" "$LINENO" 5; }
8460 else
8461 ac_cv_sizeof_long_long=0
8462 fi
8463fi
8464
8465fi
8466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8467$as_echo "$ac_cv_sizeof_long_long" >&6; }
8468
8469
8470
8471cat >>confdefs.h <<_ACEOF
8472#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8473_ACEOF
8474
8475
8476# The cast to long int works around a bug in the HP C Compiler
8477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8479# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8481$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 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 +00008486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 if test "$ac_cv_type_void_p" = yes; then
8489 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008491as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008492See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493 else
8494 ac_cv_sizeof_void_p=0
8495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8500$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501
8502
8503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008505#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008506_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008507
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509# The cast to long int works around a bug in the HP C Compiler
8510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8512# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8514$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008515if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008516 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008517else
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 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 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 if test "$ac_cv_type_short" = yes; then
8522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008524as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008525See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526 else
8527 ac_cv_sizeof_short=0
8528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8533$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534
8535
8536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008539_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540
8541
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542# The cast to long int works around a bug in the HP C Compiler
8543# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8544# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8545# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8547$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 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 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 if test "$ac_cv_type_float" = yes; then
8555 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008557as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008558See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 else
8560 ac_cv_sizeof_float=0
8561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8566$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567
8568
8569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008571#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008573
8574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575# The cast to long int works around a bug in the HP C Compiler
8576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8578# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8580$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008581if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008583else
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 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 +00008585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 if test "$ac_cv_type_double" = yes; then
8588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008590as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008591See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592 else
8593 ac_cv_sizeof_double=0
8594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8599$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600
8601
8602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008604#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008605_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008606
8607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608# The cast to long int works around a bug in the HP C Compiler
8609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8613$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 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 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 if test "$ac_cv_type_fpos_t" = yes; then
8621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008623as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008624See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 else
8626 ac_cv_sizeof_fpos_t=0
8627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8632$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633
8634
8635
Martin v. Löwis11437992002-04-12 09:54:03 +00008636cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008637#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008638_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008639
Michael W. Hudson54241132001-12-07 15:38:26 +00008640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641# The cast to long int works around a bug in the HP C Compiler
8642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8646$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008647if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 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 +00008651
Martin v. Löwis18e16552006-02-15 17:27:45 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 if test "$ac_cv_type_size_t" = yes; then
8654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008656as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008657See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 else
8659 ac_cv_sizeof_size_t=0
8660 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662
Martin v. Löwis18e16552006-02-15 17:27:45 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8665$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666
8667
8668
Martin v. Löwis18e16552006-02-15 17:27:45 +00008669cat >>confdefs.h <<_ACEOF
8670#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8671_ACEOF
8672
8673
Christian Heimes400adb02008-02-01 08:12:03 +00008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8679$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008680if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 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 +00008684
Christian Heimes400adb02008-02-01 08:12:03 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type_pid_t" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008691 else
8692 ac_cv_sizeof_pid_t=0
8693 fi
8694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Christian Heimes400adb02008-02-01 08:12:03 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8698$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008699
8700
8701
8702cat >>confdefs.h <<_ACEOF
8703#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8704_ACEOF
8705
8706
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008707# The cast to long int works around a bug in the HP C Compiler
8708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8710# This bug is HP SR number 8606223364.
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8712$as_echo_n "checking size of uintptr_t... " >&6; }
8713if ${ac_cv_sizeof_uintptr_t+:} false; then :
8714 $as_echo_n "(cached) " >&6
8715else
8716 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8717
8718else
8719 if test "$ac_cv_type_uintptr_t" = yes; then
8720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8722as_fn_error 77 "cannot compute sizeof (uintptr_t)
8723See \`config.log' for more details" "$LINENO" 5; }
8724 else
8725 ac_cv_sizeof_uintptr_t=0
8726 fi
8727fi
8728
8729fi
8730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8731$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8732
8733
8734
8735cat >>confdefs.h <<_ACEOF
8736#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8737_ACEOF
8738
8739
Michael W. Hudson54241132001-12-07 15:38:26 +00008740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8742$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745/* end confdefs.h. */
8746
8747int
8748main ()
8749{
8750long double x; x = (long double)0;
8751 ;
8752 return 0;
8753}
8754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008755if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756
8757
Matthias Kloseb9621712010-04-24 17:59:49 +00008758$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759
8760 have_long_double=yes
8761
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008762fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8765$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008766if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767# The cast to long int works around a bug in the HP C Compiler
8768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8772$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008773if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 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 +00008777
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 if test "$ac_cv_type_long_double" = yes; then
8780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008782as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008783See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008784 else
8785 ac_cv_sizeof_long_double=0
8786 fi
8787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8791$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008792
8793
8794
8795cat >>confdefs.h <<_ACEOF
8796#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8797_ACEOF
8798
8799
8800fi
8801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802# The cast to long int works around a bug in the HP C Compiler
8803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8807$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008808if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 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 +00008812
Thomas Woutersb2137042007-02-01 18:02:27 +00008813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 if test "$ac_cv_type__Bool" = yes; then
8815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008817as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008818See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819 else
8820 ac_cv_sizeof__Bool=0
8821 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008823
Thomas Woutersb2137042007-02-01 18:02:27 +00008824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8826$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827
8828
8829
Thomas Woutersb2137042007-02-01 18:02:27 +00008830cat >>confdefs.h <<_ACEOF
8831#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8832_ACEOF
8833
8834
Thomas Woutersb2137042007-02-01 18:02:27 +00008835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836# The cast to long int works around a bug in the HP C Compiler
8837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8841$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008842if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008843 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846#ifdef HAVE_SYS_TYPES_H
8847#include <sys/types.h>
8848#endif
8849
Matthias Kloseb9621712010-04-24 17:59:49 +00008850"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 if test "$ac_cv_type_off_t" = yes; then
8854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008856as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008857See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858 else
8859 ac_cv_sizeof_off_t=0
8860 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8865$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008866
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008867
8868
Martin v. Löwis11437992002-04-12 09:54:03 +00008869cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008870#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008872
Michael W. Hudson54241132001-12-07 15:38:26 +00008873
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874
Matthias Kloseb9621712010-04-24 17:59:49 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8876$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008877if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008878 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008879
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008881
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8883$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8886$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008887fi
8888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889# The cast to long int works around a bug in the HP C Compiler
8890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8894$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008895if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008896 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897else
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008899#ifdef HAVE_SYS_TYPES_H
8900#include <sys/types.h>
8901#endif
8902#ifdef HAVE_TIME_H
8903#include <time.h>
8904#endif
8905
Matthias Kloseb9621712010-04-24 17:59:49 +00008906"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908else
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 if test "$ac_cv_type_time_t" = yes; then
8910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008912as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008913See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008914 else
8915 ac_cv_sizeof_time_t=0
8916 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8921$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008922
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923
8924
Martin v. Löwis11437992002-04-12 09:54:03 +00008925cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008926#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008927_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008928
Michael W. Hudson54241132001-12-07 15:38:26 +00008929
8930
Trent Mick635f6fb2000-08-23 21:33:05 +00008931# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008932ac_save_cc="$CC"
8933if test "$ac_cv_kpthread" = "yes"
8934then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008935elif test "$ac_cv_kthread" = "yes"
8936then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008937elif test "$ac_cv_pthread" = "yes"
8938then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008939fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008940
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8942$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008943have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008946
8947 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008948int
8949main ()
8950{
Guido van Rossum12580492000-09-24 16:47:19 +00008951pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ;
8953 return 0;
8954}
Matthias Kloseb159a552010-04-25 21:00:44 +00008955
Martin v. Löwis11437992002-04-12 09:54:03 +00008956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008957if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008958 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8962$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008963if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008964 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008965# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8966# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8967# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8969$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008970if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972else
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008974#ifdef HAVE_PTHREAD_H
8975#include <pthread.h>
8976#endif
8977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980else
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 if test "$ac_cv_type_pthread_t" = yes; then
8982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008984as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008985See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986 else
8987 ac_cv_sizeof_pthread_t=0
8988 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990
Trent Mick635f6fb2000-08-23 21:33:05 +00008991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8993$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995
8996
Martin v. Löwis11437992002-04-12 09:54:03 +00008997cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008998#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008999_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001
Trent Mick635f6fb2000-08-23 21:33:05 +00009002fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009003
9004# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9005# This checking will be unnecessary after removing deprecated TLS API.
9006# The cast to long int works around a bug in the HP C Compiler
9007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9009# This bug is HP SR number 8606223364.
9010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9011$as_echo_n "checking size of pthread_key_t... " >&6; }
9012if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9013 $as_echo_n "(cached) " >&6
9014else
9015 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9016"; then :
9017
9018else
9019 if test "$ac_cv_type_pthread_key_t" = yes; then
9020 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9022as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9023See \`config.log' for more details" "$LINENO" 5; }
9024 else
9025 ac_cv_sizeof_pthread_key_t=0
9026 fi
9027fi
9028
9029fi
9030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9031$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9032
9033
9034
9035cat >>confdefs.h <<_ACEOF
9036#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9037_ACEOF
9038
9039
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9041$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9042if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044/* end confdefs.h. */
9045#include <pthread.h>
9046int
9047main ()
9048{
9049pthread_key_t k; k * 1;
9050 ;
9051 return 0;
9052}
9053_ACEOF
9054if ac_fn_c_try_compile "$LINENO"; then :
9055 ac_pthread_key_t_is_arithmetic_type=yes
9056else
9057 ac_pthread_key_t_is_arithmetic_type=no
9058
9059fi
9060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9062$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9063 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9064
9065$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9066
9067 fi
9068else
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9070$as_echo "no" >&6; }
9071fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009072CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009073
Michael W. Hudson54241132001-12-07 15:38:26 +00009074
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009075case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009076 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009077 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9078 ;;
9079 Darwin/*)
9080 OTHER_LIBTOOL_OPT=""
9081 ;;
9082esac
9083
9084
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009085
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009086case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009087 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009088 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9089 if test "${enable_universalsdk}"; then
9090 :
9091 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009092 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009093 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009094 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009095 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009096 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009097 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009098 if test ${gcc_version} '<' 4.0
9099 then
9100 LIBTOOL_CRUFT="-lcc_dynamic"
9101 else
9102 LIBTOOL_CRUFT=""
9103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009105 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009106else
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009108/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009109
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009110 #include <unistd.h>
9111 int main(int argc, char*argv[])
9112 {
9113 if (sizeof(long) == 4) {
9114 return 0;
9115 } else {
9116 return 1;
9117 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009118 }
9119
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009121if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009122 ac_osx_32bit=yes
9123else
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9127 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009128fi
9129
9130
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009131 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009132 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009133 i386)
9134 MACOSX_DEFAULT_ARCH="i386"
9135 ;;
9136 ppc)
9137 MACOSX_DEFAULT_ARCH="ppc"
9138 ;;
9139 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009140 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009141 ;;
9142 esac
9143 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009144 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009145 i386)
9146 MACOSX_DEFAULT_ARCH="x86_64"
9147 ;;
9148 ppc)
9149 MACOSX_DEFAULT_ARCH="ppc64"
9150 ;;
9151 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009152 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009153 ;;
9154 esac
9155
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009156 fi
9157
9158 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009159 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009160 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009161esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9163$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009164if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009165then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009166 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009168 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9173$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009174 if test $enable_shared = "yes"
9175 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009176 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 +00009177 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009178else
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9180$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009181fi
9182
Matthias Kloseb9621712010-04-24 17:59:49 +00009183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9184$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009185case $ac_sys_system/$ac_sys_release in
9186 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009189
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9191$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009192 ;;
9193 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9195$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009196 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009197esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009198
Guido van Rossum0a516c91994-09-12 10:58:40 +00009199# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009200
Michael W. Hudson54241132001-12-07 15:38:26 +00009201
9202
9203
9204
Benjamin Peterson99f03762010-04-11 22:15:28 +00009205
Thomas Wouters477c8d52006-05-27 19:21:47 +00009206
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009207# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9208# -- usually .so, .sl on HP-UX, .dll on Cygwin
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9210$as_echo_n "checking the extension of shared libraries... " >&6; }
9211if test -z "$SHLIB_SUFFIX"; then
9212 case $ac_sys_system in
9213 hp*|HP*)
9214 case `uname -m` in
9215 ia64) SHLIB_SUFFIX=.so;;
9216 *) SHLIB_SUFFIX=.sl;;
9217 esac
9218 ;;
9219 CYGWIN*) SHLIB_SUFFIX=.dll;;
9220 *) SHLIB_SUFFIX=.so;;
9221 esac
9222fi
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9224$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009225
Guido van Rossum0a516c91994-09-12 10:58:40 +00009226# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009227# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009228# (Shared libraries in this instance are shared modules to be loaded into
9229# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9231$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009232if test -z "$LDSHARED"
9233then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009234 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009235 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009236 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009237 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009238 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009240 if test "$GCC" = "yes" ; then
9241 LDSHARED='$(CC) -shared'
9242 LDCXXSHARED='$(CXX) -shared'
9243 else
9244 LDSHARED='$(CC) -G'
9245 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009246 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009247 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009248 if test "$GCC" = "yes" ; then
9249 LDSHARED='$(CC) -shared'
9250 LDCXXSHARED='$(CXX) -shared'
9251 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009252 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009253 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009254 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009255 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009256 LDSHARED='$(CC) -bundle'
9257 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009258 if test "$enable_framework" ; then
9259 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009260 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9261 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009262 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009263 else
9264 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009265 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009266 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009267 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009268 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009269 LDSHARED='$(CC) -bundle'
9270 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009271 if test "$enable_framework" ; then
9272 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009273 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9274 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009275 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009276 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009277 # No framework, use the Python app as bundle-loader
9278 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009279 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009280 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009281 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009282 Darwin/*)
9283 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9284 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009285
Ned Deily36820b62014-06-25 13:44:22 -07009286 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9287 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9288 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9289 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9290 if test ${dep_target_major} -eq 10 && \
9291 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009292 then
Ned Deily36820b62014-06-25 13:44:22 -07009293 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009294 LDSHARED='$(CC) -bundle'
9295 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009296 if test "$enable_framework" ; then
9297 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009298 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9299 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009300 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009301 else
9302 # No framework, use the Python app as bundle-loader
9303 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9304 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009305 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009306 fi
Ned Deily36820b62014-06-25 13:44:22 -07009307 else
9308 # building for OS X 10.3 and later
9309 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9310 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9311 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009312 fi
9313 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009314 Linux*|GNU*|QNX*)
9315 LDSHARED='$(CC) -shared'
9316 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009317 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009318 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009319 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009320 LDSHARED='$(CC) -shared'
9321 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009322 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009323 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009324 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009325 OpenBSD*)
9326 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9327 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009328 LDSHARED='$(CC) -shared $(CCSHARED)'
9329 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009330 else
9331 case `uname -r` in
9332 [01].* | 2.[0-7] | 2.[0-7].*)
9333 LDSHARED="ld -Bshareable ${LDFLAGS}"
9334 ;;
9335 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009336 LDSHARED='$(CC) -shared $(CCSHARED)'
9337 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009338 ;;
9339 esac
9340 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009341 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009342 LDSHARED='$(CC) -shared'
9343 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009344 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009345 if test "$GCC" = "yes" ; then
9346 LDSHARED='$(CC) -shared'
9347 LDCXXSHARED='$(CXX) -shared'
9348 else
9349 LDSHARED='$(CC) -G'
9350 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009351 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009352 SCO_SV*)
9353 LDSHARED='$(CC) -Wl,-G,-Bexport'
9354 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9355 CYGWIN*)
9356 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9357 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358 *) LDSHARED="ld";;
9359 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9362$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009363LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009364BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009365# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9368$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009369if test -z "$CCSHARED"
9370then
Guido van Rossum07397971997-04-29 21:49:50 +00009371 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009372 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009373 then CCSHARED="-fPIC";
9374 elif test `uname -p` = sparc;
9375 then CCSHARED="-xcode=pic32";
9376 else CCSHARED="-Kpic";
9377 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009378 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009379 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009380 else CCSHARED="+z";
9381 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009382 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009383 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009384 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009385 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009386 if test "$GCC" = "yes"
9387 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009388 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009389 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009390 SCO_SV*)
9391 if test "$GCC" = "yes"
9392 then CCSHARED="-fPIC"
9393 else CCSHARED="-Kpic -belf"
9394 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009395 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9398$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009400# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9402$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403if test -z "$LINKFORSHARED"
9404then
Guido van Rossum07397971997-04-29 21:49:50 +00009405 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009406 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009407 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009408 LINKFORSHARED="-Wl,-E -Wl,+s";;
9409# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009410 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009411 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009412 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009414 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009415
9416 # Issue #18075: the default maximum stack size (8MBytes) is too
9417 # small for the default recursion limit. Increase the stack size
9418 # to ensure that tests don't crash
9419 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9420
Jack Jansene578a632001-08-15 01:27:14 +00009421 if test "$enable_framework"
9422 then
Jack Jansenda49e192005-01-07 13:08:22 +00009423 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009424 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009425 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009426 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009427 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009428 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009429 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009430 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9431 then
9432 LINKFORSHARED="-Wl,--export-dynamic"
9433 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009434 SunOS/5*) case $CC in
9435 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009436 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009437 then
9438 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009439 fi;;
9440 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009441 CYGWIN*)
9442 if test $enable_shared = "no"
9443 then
9444 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9445 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009446 QNX*)
9447 # -Wl,-E causes the symbols to be added to the dynamic
9448 # symbol table so that they can be found when a module
9449 # is loaded. -N 2048K causes the stack size to be set
9450 # to 2048 kilobytes so that the stack doesn't overflow
9451 # when running test_compile.py.
9452 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009453 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9456$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009457
Michael W. Hudson54241132001-12-07 15:38:26 +00009458
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9461$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009462if test ! "$LIBRARY" = "$LDLIBRARY"
9463then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009464 case $ac_sys_system in
9465 CYGWIN*)
9466 # Cygwin needs CCSHARED when building extension DLLs
9467 # but not when building the interpreter DLL.
9468 CFLAGSFORSHARED='';;
9469 *)
9470 CFLAGSFORSHARED='$(CCSHARED)'
9471 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9474$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009475
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009476# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9477# library (with --enable-shared).
9478# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009479# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9480# if it is not required, since it creates a dependency of the shared library
9481# to LIBS. This, in turn, means that applications linking the shared libpython
9482# don't need to link LIBS explicitly. The default should be only changed
9483# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009484
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9486$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009487case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009488 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009489 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009490esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9492$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009493
9494
Guido van Rossum627b2d71993-12-24 10:39:16 +00009495# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9497$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009499 $as_echo_n "(cached) " >&6
9500else
9501 ac_check_lib_save_LIBS=$LIBS
9502LIBS="-lsendfile $LIBS"
9503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9504/* end confdefs.h. */
9505
9506/* Override any GCC internal prototype to avoid an error.
9507 Use char because int might match the return type of a GCC
9508 builtin and then its argument prototype would still apply. */
9509#ifdef __cplusplus
9510extern "C"
9511#endif
9512char sendfile ();
9513int
9514main ()
9515{
9516return sendfile ();
9517 ;
9518 return 0;
9519}
9520_ACEOF
9521if ac_fn_c_try_link "$LINENO"; then :
9522 ac_cv_lib_sendfile_sendfile=yes
9523else
9524 ac_cv_lib_sendfile_sendfile=no
9525fi
9526rm -f core conftest.err conftest.$ac_objext \
9527 conftest$ac_exeext conftest.$ac_ext
9528LIBS=$ac_check_lib_save_LIBS
9529fi
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9531$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009532if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009533 cat >>confdefs.h <<_ACEOF
9534#define HAVE_LIBSENDFILE 1
9535_ACEOF
9536
9537 LIBS="-lsendfile $LIBS"
9538
9539fi
9540
Matthias Kloseb9621712010-04-24 17:59:49 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9542$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009543if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009545else
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009547LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551/* Override any GCC internal prototype to avoid an error.
9552 Use char because int might match the return type of a GCC
9553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009554#ifdef __cplusplus
9555extern "C"
9556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009557char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009558int
9559main ()
9560{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009562 ;
9563 return 0;
9564}
9565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009566if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009568else
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571rm -f core conftest.err conftest.$ac_objext \
9572 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009573LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9576$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009577if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 cat >>confdefs.h <<_ACEOF
9579#define HAVE_LIBDL 1
9580_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009581
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009582 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009584fi
9585 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9587$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009588if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009590else
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009592LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009596/* Override any GCC internal prototype to avoid an error.
9597 Use char because int might match the return type of a GCC
9598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009599#ifdef __cplusplus
9600extern "C"
9601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009602char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009603int
9604main ()
9605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 ;
9608 return 0;
9609}
9610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009613else
Matthias Kloseb9621712010-04-24 17:59:49 +00009614 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009616rm -f core conftest.err conftest.$ac_objext \
9617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9621$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009622if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 cat >>confdefs.h <<_ACEOF
9624#define HAVE_LIBDLD 1
9625_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009626
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629fi
9630 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009631
Michael Felt0d3ccb42017-12-30 22:39:20 +01009632# checks for uuid.h location
9633for ac_header in uuid/uuid.h uuid.h
9634do :
9635 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9636ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9637if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9638 cat >>confdefs.h <<_ACEOF
9639#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9640_ACEOF
9641
9642fi
9643
9644done
9645
9646
Berker Peksag9a10ff42017-11-08 23:09:16 +03009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9648$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9650/* end confdefs.h. */
9651#include <uuid/uuid.h>
9652int
9653main ()
9654{
9655
9656#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009657void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009658#endif
9659
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664if ac_fn_c_try_compile "$LINENO"; then :
9665
9666$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9667
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9669$as_echo "yes" >&6; }
9670else
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672$as_echo "no" >&6; }
9673
9674fi
9675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9676
Michael Felt0d3ccb42017-12-30 22:39:20 +01009677# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009678# FreeBSD and OpenBSD provides support as well
9679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9680$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9682/* end confdefs.h. */
9683#include <uuid.h>
9684int
9685main ()
9686{
9687
9688#ifndef uuid_create
9689void *x = uuid_create
9690#endif
9691
9692 ;
9693 return 0;
9694}
9695_ACEOF
9696if ac_fn_c_try_compile "$LINENO"; then :
9697
9698$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9699
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9701$as_echo "yes" >&6; }
9702else
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9704$as_echo "no" >&6; }
9705
9706fi
9707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9708
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009709# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9710# stream in big-endian byte-order
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9712$as_echo_n "checking for uuid_enc_be... " >&6; }
9713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714/* end confdefs.h. */
9715#include <uuid.h>
9716int
9717main ()
9718{
9719
9720#ifndef uuid_enc_be
Michael Felt20cd5c62018-06-09 15:59:02 -06009721void *x = uuid_enc_be
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009722#endif
9723
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728if ac_fn_c_try_compile "$LINENO"; then :
9729
9730$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9731
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9733$as_echo "yes" >&6; }
9734else
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9736$as_echo "no" >&6; }
9737
9738fi
9739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9740
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009741# 'Real Time' functions on Solaris
9742# posix4 on Solaris 2.6
9743# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009746if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009748else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009749 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753/* Override any GCC internal prototype to avoid an error.
9754 Use char because int might match the return type of a GCC
9755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756#ifdef __cplusplus
9757extern "C"
9758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009759char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009760int
9761main ()
9762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ;
9765 return 0;
9766}
9767_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768for ac_lib in '' pthread rt posix4; do
9769 if test -z "$ac_lib"; then
9770 ac_res="none required"
9771 else
9772 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009773 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009778rm -f core conftest.err conftest.$ac_objext \
9779 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009780 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783done
Victor Stinnere0be4232011-10-25 13:06:09 +02009784if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786else
9787 ac_cv_search_sem_init=no
9788fi
9789rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009790LIBS=$ac_func_search_save_LIBS
9791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9793$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009795if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009797
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009798fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009799
Martin v. Löwis519adae2003-09-20 10:47:47 +00009800
Martin v. Löwis19d17342003-06-14 21:03:05 +00009801# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9803$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009804if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009806else
9807 ac_check_lib_save_LIBS=$LIBS
9808LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812/* Override any GCC internal prototype to avoid an error.
9813 Use char because int might match the return type of a GCC
9814 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009815#ifdef __cplusplus
9816extern "C"
9817#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009818char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009819int
9820main ()
9821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009822return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009823 ;
9824 return 0;
9825}
9826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009828 ac_cv_lib_intl_textdomain=yes
9829else
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832rm -f core conftest.err conftest.$ac_objext \
9833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009834LIBS=$ac_check_lib_save_LIBS
9835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9837$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009838if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009839
Matthias Kloseb9621712010-04-24 17:59:49 +00009840$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009841
Brett Cannonc6d936e2009-06-07 20:09:53 +00009842 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009843fi
9844
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009845
9846# checks for system dependent C++ extensions support
9847case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9849$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009852
Georg Brandl59e87bd2011-02-15 19:48:59 +00009853 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009854int
9855main ()
9856{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009857loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ;
9859 return 0;
9860}
Matthias Kloseb159a552010-04-25 21:00:44 +00009861
Martin v. Löwis11437992002-04-12 09:54:03 +00009862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009863if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009864
Matthias Kloseb159a552010-04-25 21:00:44 +00009865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009867
Matthias Kloseb159a552010-04-25 21:00:44 +00009868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009869$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009870
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009871else
Matthias Kloseb159a552010-04-25 21:00:44 +00009872
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009874$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009875
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877rm -f core conftest.err conftest.$ac_objext \
9878 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009879 *) ;;
9880esac
9881
Christian Heimes985ecdc2013-11-20 11:46:18 +01009882# check for systems that require aligned memory access
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9884$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009885if ${ac_cv_aligned_required+:} false; then :
9886 $as_echo_n "(cached) " >&6
9887else
9888 if test "$cross_compiling" = yes; then :
9889 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009890else
9891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9892/* end confdefs.h. */
9893
9894int main()
9895{
9896 char s[16];
9897 int i, *p1, *p2;
9898 for (i=0; i < 16; i++)
9899 s[i] = i;
9900 p1 = (int*)(s+1);
9901 p2 = (int*)(s+2);
9902 if (*p1 == *p2)
9903 return 1;
9904 return 0;
9905}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009906_ACEOF
9907if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009908 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009909else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009910 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009911fi
9912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9913 conftest.$ac_objext conftest.beam conftest.$ac_ext
9914fi
9915
9916
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009917fi
9918
9919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9920$as_echo "$ac_cv_aligned_required" >&6; }
9921if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009922
9923$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9924
9925fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009926
9927# str, bytes and memoryview hash algorithm
9928
9929
9930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9931$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9932
9933# Check whether --with-hash_algorithm was given.
9934if test "${with_hash_algorithm+set}" = set; then :
9935 withval=$with_hash_algorithm;
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9937$as_echo "$withval" >&6; }
9938case "$withval" in
9939 siphash24)
9940 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9941
9942 ;;
9943 fnv)
9944 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9945
9946 ;;
9947 *)
9948 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9949 ;;
9950esac
9951
9952else
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9954$as_echo "default" >&6; }
9955fi
9956
9957
Charles-François Natalid30b0222014-05-08 23:08:51 +01009958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9959$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9960
9961# Check whether --with-address_sanitizer was given.
9962if test "${with_address_sanitizer+set}" = set; then :
9963 withval=$with_address_sanitizer;
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9965$as_echo "$withval" >&6; }
9966BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9967LDFLAGS="-fsanitize=address $LDFLAGS"
9968
9969else
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972fi
9973
9974
Guido van Rossum70c7f481998-03-26 18:44:10 +00009975# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9977$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009978if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009982LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986/* Override any GCC internal prototype to avoid an error.
9987 Use char because int might match the return type of a GCC
9988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989#ifdef __cplusplus
9990extern "C"
9991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009992char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009993int
9994main ()
9995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 ;
9998 return 0;
9999}
10000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010003else
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010006rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010008LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10011$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010012if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010013 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010014fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010015 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10017$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010018if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010020else
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010022LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010026/* Override any GCC internal prototype to avoid an error.
10027 Use char because int might match the return type of a GCC
10028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010029#ifdef __cplusplus
10030extern "C"
10031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010032char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010033int
10034main ()
10035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 ;
10038 return 0;
10039}
10040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010041if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010042 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010043else
Matthias Kloseb9621712010-04-24 17:59:49 +000010044 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010046rm -f core conftest.err conftest.$ac_objext \
10047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010048LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10051$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010052if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010053 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010054fi
10055 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10058$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10064$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010065LIBS="$withval $LIBS"
10066
10067else
Matthias Kloseb9621712010-04-24 17:59:49 +000010068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070fi
10071
Guido van Rossum7f43da71994-08-01 12:15:30 +000010072
Victor Stinner8291b5e2015-03-20 16:03:14 +010010073
10074
10075
10076
10077
10078
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010079
Victor Stinner8291b5e2015-03-20 16:03:14 +010010080if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10081 if test -n "$ac_tool_prefix"; then
10082 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10083set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_PKG_CONFIG+:} false; then :
10087 $as_echo_n "(cached) " >&6
10088else
10089 case $PKG_CONFIG in
10090 [\\/]* | ?:[\\/]*)
10091 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10092 ;;
10093 *)
10094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097 IFS=$as_save_IFS
10098 test -z "$as_dir" && as_dir=.
10099 for ac_exec_ext in '' $ac_executable_extensions; do
10100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103 break 2
10104 fi
10105done
10106 done
10107IFS=$as_save_IFS
10108
10109 ;;
10110esac
10111fi
10112PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10113if test -n "$PKG_CONFIG"; then
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10115$as_echo "$PKG_CONFIG" >&6; }
10116else
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122fi
10123if test -z "$ac_cv_path_PKG_CONFIG"; then
10124 ac_pt_PKG_CONFIG=$PKG_CONFIG
10125 # Extract the first word of "pkg-config", so it can be a program name with args.
10126set dummy pkg-config; ac_word=$2
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10128$as_echo_n "checking for $ac_word... " >&6; }
10129if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10130 $as_echo_n "(cached) " >&6
10131else
10132 case $ac_pt_PKG_CONFIG in
10133 [\\/]* | ?:[\\/]*)
10134 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10135 ;;
10136 *)
10137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10138for as_dir in $PATH
10139do
10140 IFS=$as_save_IFS
10141 test -z "$as_dir" && as_dir=.
10142 for ac_exec_ext in '' $ac_executable_extensions; do
10143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10144 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10146 break 2
10147 fi
10148done
10149 done
10150IFS=$as_save_IFS
10151
10152 ;;
10153esac
10154fi
10155ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10156if test -n "$ac_pt_PKG_CONFIG"; then
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10158$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10159else
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161$as_echo "no" >&6; }
10162fi
10163
10164 if test "x$ac_pt_PKG_CONFIG" = x; then
10165 PKG_CONFIG=""
10166 else
10167 case $cross_compiling:$ac_tool_warned in
10168yes:)
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10171ac_tool_warned=yes ;;
10172esac
10173 PKG_CONFIG=$ac_pt_PKG_CONFIG
10174 fi
10175else
10176 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10177fi
10178
10179fi
10180if test -n "$PKG_CONFIG"; then
10181 _pkg_min_version=0.9.0
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10183$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10184 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10186$as_echo "yes" >&6; }
10187 else
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189$as_echo "no" >&6; }
10190 PKG_CONFIG=""
10191 fi
10192fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010193
10194# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10196$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010197
10198# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010200 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010201else
10202 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010203fi
10204
10205
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10207$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010208
10209# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10211$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010212
10213# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010214if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010215 withval=$with_system_ffi;
10216fi
10217
10218
Zachary Waref40d4dd2016-09-17 01:25:24 -050010219if test "$ac_sys_system" = "Darwin"
10220then
10221 case "$with_system_ffi" in
10222 "")
10223 with_system_ffi="no"
10224 ;;
10225 yes|no)
10226 ;;
10227 *)
10228 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10229 ;;
10230 esac
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10232$as_echo "$with_system_ffi" >&6; }
10233else
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10235$as_echo "yes" >&6; }
10236 if test "$with_system_ffi" != ""
10237 then
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10239$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10240 fi
10241 with_system_ffi="yes"
10242fi
Zachary Ware935043d2016-09-09 17:01:21 -070010243
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010244if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010245 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10246else
10247 LIBFFI_INCLUDEDIR=""
10248fi
10249
10250
Stefan Krah60187b52012-03-23 19:06:27 +010010251# Check for use of the system libmpdec library
10252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10253$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10254
10255# Check whether --with-system_libmpdec was given.
10256if test "${with_system_libmpdec+set}" = set; then :
10257 withval=$with_system_libmpdec;
10258else
10259 with_system_libmpdec="no"
10260fi
10261
10262
10263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10264$as_echo "$with_system_libmpdec" >&6; }
10265
Benjamin Peterson076ed002010-10-31 17:11:02 +000010266# Check for support for loadable sqlite extensions
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10268$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10269# Check whether --enable-loadable-sqlite-extensions was given.
10270if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10271 enableval=$enable_loadable_sqlite_extensions;
10272else
10273 enable_loadable_sqlite_extensions="no"
10274fi
10275
10276
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10278$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10279
Ned Deilyd819b932013-09-06 01:07:05 -070010280# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10281
10282
10283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10284$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10285
10286# Check whether --with-tcltk-includes was given.
10287if test "${with_tcltk_includes+set}" = set; then :
10288 withval=$with_tcltk_includes;
10289else
10290 with_tcltk_includes="default"
10291fi
10292
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10294$as_echo "$with_tcltk_includes" >&6; }
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10296$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10297
10298# Check whether --with-tcltk-libs was given.
10299if test "${with_tcltk_libs+set}" = set; then :
10300 withval=$with_tcltk_libs;
10301else
10302 with_tcltk_libs="default"
10303fi
10304
10305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10306$as_echo "$with_tcltk_libs" >&6; }
10307if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10308then
10309 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10310 then
10311 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10312 fi
10313 TCLTK_INCLUDES=""
10314 TCLTK_LIBS=""
10315else
10316 TCLTK_INCLUDES="$with_tcltk_includes"
10317 TCLTK_LIBS="$with_tcltk_libs"
10318fi
10319
Matthias Klose55708cc2009-04-30 08:06:49 +000010320# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10322$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010323
10324# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010325if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010326 withval=$with_dbmliborder;
10327if test x$with_dbmliborder = xyes
10328then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010329as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010330else
10331 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10332 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10333 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010334 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010335 fi
10336 done
10337fi
10338fi
10339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10341$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343
Martin v. Löwis11437992002-04-12 09:54:03 +000010344
10345# Templates for things AC_DEFINEd more than once.
10346# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010347
10348
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010349if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010350then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010351 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010353
10354 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010355elif test "$ac_cv_kpthread" = "yes"
10356then
10357 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010358 if test "$ac_cv_cxx_thread" = "yes"; then
10359 CXX="$CXX -Kpthread"
10360 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010361 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010362elif test "$ac_cv_kthread" = "yes"
10363then
10364 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010365 if test "$ac_cv_cxx_thread" = "yes"; then
10366 CXX="$CXX -Kthread"
10367 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010368 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010369elif test "$ac_cv_pthread" = "yes"
10370then
10371 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010372 if test "$ac_cv_cxx_thread" = "yes"; then
10373 CXX="$CXX -pthread"
10374 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010375 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010376else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010377 if test ! -z "$withval" -a -d "$withval"
10378 then LDFLAGS="$LDFLAGS -L$withval"
10379 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010380
10381 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010382 # define _POSIX_THREADS in unistd.h. Some apparently don't
10383 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10385$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010388
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010389#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010390#ifdef _POSIX_THREADS
10391yes
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
10394_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010397 unistd_defines_pthreads=yes
10398else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010399 unistd_defines_pthreads=no
10400fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010401rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10404$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010407
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010408 # Just looking for pthread_create in libpthread is not enough:
10409 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10410 # So we really have to include pthread.h, and then link.
10411 _libs=$LIBS
10412 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10414$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010416/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010417
10418#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010419#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010420
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010421void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010422int
10423main ()
10424{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010425
10426pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 ;
10428 return 0;
10429}
10430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010432
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10434$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010435 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010436
Guido van Rossum02a1c402000-02-25 19:26:31 +000010437else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010439 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010440 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010441if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010443 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010444
Guido van Rossumad678af1998-10-02 14:42:15 +000010445else
Guido van Rossumad678af1998-10-02 14:42:15 +000010446
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10448$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010449if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010450 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010451else
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010453LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457/* Override any GCC internal prototype to avoid an error.
10458 Use char because int might match the return type of a GCC
10459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460#ifdef __cplusplus
10461extern "C"
10462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010463char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010464int
10465main ()
10466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010468 ;
10469 return 0;
10470}
10471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010473 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010474else
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010477rm -f core conftest.err conftest.$ac_objext \
10478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010479LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10482$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010483if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010485 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010486 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010487
Greg Steinadf63d62000-07-05 10:38:09 +000010488else
Greg Steinadf63d62000-07-05 10:38:09 +000010489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10491$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010492if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010494else
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010496LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500/* Override any GCC internal prototype to avoid an error.
10501 Use char because int might match the return type of a GCC
10502 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010503#ifdef __cplusplus
10504extern "C"
10505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010506char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010507int
10508main ()
10509{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ;
10512 return 0;
10513}
10514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010515if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010516 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010517else
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520rm -f core conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010522LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10525$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010526if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010528 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010529 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010530
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010531else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010532
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10534$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010535if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010537else
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010539LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543/* Override any GCC internal prototype to avoid an error.
10544 Use char because int might match the return type of a GCC
10545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010546#ifdef __cplusplus
10547extern "C"
10548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010549char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010550int
10551main ()
10552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 ;
10555 return 0;
10556}
10557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010560else
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010563rm -f core conftest.err conftest.$ac_objext \
10564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10568$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010569if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010570
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010571 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010572 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010573
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010574else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010575
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10577$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010578if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010580else
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010582LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586/* Override any GCC internal prototype to avoid an error.
10587 Use char because int might match the return type of a GCC
10588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010589#ifdef __cplusplus
10590extern "C"
10591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010592char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010593int
10594main ()
10595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 ;
10598 return 0;
10599}
10600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010601if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010603else
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010606rm -f core conftest.err conftest.$ac_objext \
10607 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010608LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10611$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010612if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010613
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010614 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010615 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010616
Guido van Rossumb93a8621998-05-07 13:27:32 +000010617else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010618
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010619 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10620
Guido van Rossum2d38f911996-06-26 19:47:01 +000010621fi
10622
Guido van Rossum627b2d71993-12-24 10:39:16 +000010623
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010624fi
10625
Guido van Rossum0be3e491997-05-22 20:33:33 +000010626fi
10627
Guido van Rossum49545951997-12-02 19:28:29 +000010628fi
10629
Guido van Rossumb93a8621998-05-07 13:27:32 +000010630fi
10631
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010633rm -f core conftest.err conftest.$ac_objext \
10634 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10637$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010638if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640else
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010642LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646/* Override any GCC internal prototype to avoid an error.
10647 Use char because int might match the return type of a GCC
10648 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010649#ifdef __cplusplus
10650extern "C"
10651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010652char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010653int
10654main ()
10655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ;
10658 return 0;
10659}
10660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666rm -f core conftest.err conftest.$ac_objext \
10667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010668LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10671$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010672if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010673
Martin v. Löwis130fb172001-07-19 11:00:41 +000010674 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010675
Guido van Rossum627b2d71993-12-24 10:39:16 +000010676fi
10677
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010678
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681if test "$posix_threads" = "yes"; then
10682 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685
10686 fi
10687
10688 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10689 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010690 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010691$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010693 ;;
10694 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010695$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010696
10697 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010698 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010700
10701 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010702 esac
10703
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10705$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010706 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708else
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010710 ac_cv_pthread_system_supported=no
10711else
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010713/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010714
10715 #include <stdio.h>
10716 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010717 void *foo(void *parm) {
10718 return NULL;
10719 }
10720 main() {
10721 pthread_attr_t attr;
10722 pthread_t id;
10723 if (pthread_attr_init(&attr)) exit(-1);
10724 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10725 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10726 exit(0);
10727 }
10728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010729if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010730 ac_cv_pthread_system_supported=yes
10731else
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10735 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010736fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
10740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10742$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010743 if test "$ac_cv_pthread_system_supported" = "yes"; then
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010746
10747 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 for ac_func in pthread_sigmask
10749do :
10750 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010751if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010752 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010753#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010754_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010755 case $ac_sys_system in
10756 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010759
10760 ;;
10761 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010762fi
10763done
10764
pdoxe14679c2017-10-05 00:01:56 -070010765 for ac_func in pthread_getcpuclockid
10766do :
10767 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10768if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10769 cat >>confdefs.h <<_ACEOF
10770#define HAVE_PTHREAD_GETCPUCLOCKID 1
10771_ACEOF
10772
10773fi
10774done
10775
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010776fi
10777
10778
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10782$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010784if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 ipv6=no
10790 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10792$as_echo "yes" >&6; }
10793 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794
10795 ipv6=yes
10796 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798else
Martin v. Löwis11437992002-04-12 09:54:03 +000010799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802 /* AF_INET6 available check */
10803#include <sys/types.h>
10804#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010805int
10806main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010808int domain = AF_INET6;
10809 ;
10810 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811}
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010813if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10816$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819else
Matthias Kloseb159a552010-04-25 21:00:44 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010827
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010828if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10830$as_echo_n "checking if RFC2553 API is available... " >&6; }
10831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010832/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010833
10834 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010835#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010836int
10837main ()
10838{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010839struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010840 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010841 ;
10842 return 0;
10843}
Matthias Kloseb159a552010-04-25 21:00:44 +000010844
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010847
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010849$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010850 ipv6=yes
10851
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010852else
Matthias Kloseb159a552010-04-25 21:00:44 +000010853
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010855$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010856 ipv6=no
10857
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010860fi
10861
10862if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010863 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010864
10865fi
10866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010867fi
10868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869
10870ipv6type=unknown
10871ipv6lib=none
10872ipv6trylibc=no
10873
10874if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10876$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010877 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10878 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879 case $i in
10880 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010882/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884#include <netinet/in.h>
10885#ifdef IPV6_INRIA_VERSION
10886yes
10887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010891 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010893rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894
10895 ;;
10896 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900#include <netinet/in.h>
10901#ifdef __KAME__
10902yes
10903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 ipv6type=$i;
10908 ipv6lib=inet6
10909 ipv6libdir=/usr/local/v6/lib
10910 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913
10914 ;;
10915 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919#include <features.h>
10920#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10921yes
10922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 ipv6type=$i;
10927 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930
10931 ;;
10932 linux-inet6)
10933 if test -d /usr/inet6; then
10934 ipv6type=$i
10935 ipv6lib=inet6
10936 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010937 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938 fi
10939 ;;
10940 solaris)
10941 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010942 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943 ipv6type=$i
10944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945 fi
10946 fi
10947 ;;
10948 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010950/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952#include <sys/param.h>
10953#ifdef _TOSHIBA_INET6
10954yes
10955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010956_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959 ipv6type=$i;
10960 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010961 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010963rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964
10965 ;;
10966 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010968/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970#include </usr/local/v6/include/sys/v6config.h>
10971#ifdef __V6D__
10972yes
10973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010974_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977 ipv6type=$i;
10978 ipv6lib=v6;
10979 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010980 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010982rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983
10984 ;;
10985 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010987/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010988
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989#include <sys/param.h>
10990#ifdef _ZETA_MINAMI_INET6
10991yes
10992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010993_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010994if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010996 ipv6type=$i;
10997 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010998 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001
11002 ;;
11003 esac
11004 if test "$ipv6type" != "unknown"; then
11005 break
11006 fi
11007 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11009$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011010fi
11011
11012if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11013 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11014 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11015 echo "using lib$ipv6lib"
11016 else
11017 if test $ipv6trylibc = "yes"; then
11018 echo "using libc"
11019 else
11020 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11021 echo "You need to fetch lib$ipv6lib.a from appropriate"
11022 echo 'ipv6 kit and compile beforehand.'
11023 exit 1
11024 fi
11025 fi
11026fi
11027
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11029$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11031/* end confdefs.h. */
11032 /* CAN_RAW_FD_FRAMES available check */
11033#include <linux/can/raw.h>
11034int
11035main ()
11036{
11037int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11038 ;
11039 return 0;
11040}
11041_ACEOF
11042if ac_fn_c_try_compile "$LINENO"; then :
11043
11044
11045$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11046
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11048$as_echo "yes" >&6; }
11049
11050else
11051
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053$as_echo "no" >&6; }
11054
11055fi
11056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11057
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011058# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11060$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011063if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064 withval=$with_doc_strings;
11065fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011066
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011067
11068if test -z "$with_doc_strings"
11069then with_doc_strings="yes"
11070fi
11071if test "$with_doc_strings" != "no"
11072then
11073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011075
11076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11078$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011079
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011080# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11082$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011085if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086 withval=$with_pymalloc;
11087fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011088
Neil Schemenauera35c6882001-02-27 04:45:05 +000011089
Neil Schemenauer16c22972002-03-22 15:34:49 +000011090if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011091then
11092 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011093fi
11094if test "$with_pymalloc" != "no"
11095then
Martin v. Löwis11437992002-04-12 09:54:03 +000011096
Matthias Kloseb9621712010-04-24 17:59:49 +000011097$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011098
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011099 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11102$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011103
Nick Coghlan6ea41862017-06-11 13:16:15 +100011104# Check for --with-c-locale-coercion
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11106$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11107
11108# Check whether --with-c-locale-coercion was given.
11109if test "${with_c_locale_coercion+set}" = set; then :
11110 withval=$with_c_locale_coercion;
11111fi
11112
11113
11114if test -z "$with_c_locale_coercion"
11115then
11116 with_c_locale_coercion="yes"
11117fi
11118if test "$with_c_locale_coercion" != "no"
11119then
11120
11121$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11122
11123fi
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11125$as_echo "$with_c_locale_coercion" >&6; }
11126
Benjamin Peterson05159c42009-12-03 03:01:27 +000011127# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11129$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011130
11131# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011132if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011133 withval=$with_valgrind;
11134else
11135 with_valgrind=no
11136fi
11137
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11139$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011140if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 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 +020011142if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011145
11146else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011147 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011148
11149fi
11150
11151
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011152 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011153fi
11154
Łukasz Langaa785c872016-09-09 17:37:37 -070011155# Check for DTrace support
11156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11157$as_echo_n "checking for --with-dtrace... " >&6; }
11158
11159# Check whether --with-dtrace was given.
11160if test "${with_dtrace+set}" = set; then :
11161 withval=$with_dtrace;
11162else
11163 with_dtrace=no
11164fi
11165
11166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11167$as_echo "$with_dtrace" >&6; }
11168
11169
11170
11171
11172
11173DTRACE=
11174DFLAGS=
11175DTRACE_HEADERS=
11176DTRACE_OBJS=
11177
11178if test "$with_dtrace" = "yes"
11179then
11180 # Extract the first word of "dtrace", so it can be a program name with args.
11181set dummy dtrace; ac_word=$2
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11183$as_echo_n "checking for $ac_word... " >&6; }
11184if ${ac_cv_path_DTRACE+:} false; then :
11185 $as_echo_n "(cached) " >&6
11186else
11187 case $DTRACE in
11188 [\\/]* | ?:[\\/]*)
11189 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11190 ;;
11191 *)
11192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11193for as_dir in $PATH
11194do
11195 IFS=$as_save_IFS
11196 test -z "$as_dir" && as_dir=.
11197 for ac_exec_ext in '' $ac_executable_extensions; do
11198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11199 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11201 break 2
11202 fi
11203done
11204 done
11205IFS=$as_save_IFS
11206
11207 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11208 ;;
11209esac
11210fi
11211DTRACE=$ac_cv_path_DTRACE
11212if test -n "$DTRACE"; then
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11214$as_echo "$DTRACE" >&6; }
11215else
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
11218fi
11219
11220
11221 if test "$DTRACE" = "not found"; then
11222 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11223 fi
11224
11225$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11226
11227 DTRACE_HEADERS="Include/pydtrace_probes.h"
11228
11229 # On OS X, DTrace providers do not need to be explicitly compiled and
11230 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11231 # generation flag '-G'. We check for presence of this flag, rather than
11232 # hardcoding support by OS, in the interest of robustness.
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11234$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11235if ${ac_cv_dtrace_link+:} false; then :
11236 $as_echo_n "(cached) " >&6
11237else
11238 ac_cv_dtrace_link=no
11239 echo 'BEGIN' > conftest.d
11240 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11241 ac_cv_dtrace_link=yes
11242
11243fi
11244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11245$as_echo "$ac_cv_dtrace_link" >&6; }
11246 if test "$ac_cv_dtrace_link" = "yes"; then
11247 DTRACE_OBJS="Python/pydtrace.o"
11248 fi
11249fi
11250
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011251# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011252
Guido van Rossum98935bf2001-09-05 19:13:16 +000011253DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011254
Guido van Rossume97ee181999-12-20 21:27:22 +000011255# the dlopen() function means we might want to use dynload_shlib.o. some
11256# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011257for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011258do :
11259 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011260if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011262#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011263_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011264
Guido van Rossume97ee181999-12-20 21:27:22 +000011265fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011266done
Guido van Rossume97ee181999-12-20 21:27:22 +000011267
Michael W. Hudson54241132001-12-07 15:38:26 +000011268
Guido van Rossume97ee181999-12-20 21:27:22 +000011269# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11270# loading of modules.
11271
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11273$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011274if test -z "$DYNLOADFILE"
11275then
11276 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011277 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11278 if test "$ac_cv_func_dlopen" = yes
11279 then DYNLOADFILE="dynload_shlib.o"
11280 else DYNLOADFILE="dynload_aix.o"
11281 fi
11282 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011283 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011284 *)
11285 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11286 # out any dynamic loading
11287 if test "$ac_cv_func_dlopen" = yes
11288 then DYNLOADFILE="dynload_shlib.o"
11289 else DYNLOADFILE="dynload_stub.o"
11290 fi
11291 ;;
11292 esac
11293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11295$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011296if test "$DYNLOADFILE" != "dynload_stub.o"
11297then
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011300
11301fi
11302
Neil Schemenauer4e425612001-06-19 15:44:15 +000011303# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11304
Michael W. Hudson54241132001-12-07 15:38:26 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11307$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011308if test -z "$MACHDEP_OBJS"
11309then
Jack Jansene578a632001-08-15 01:27:14 +000011310 MACHDEP_OBJS=$extra_machdep_objs
11311else
11312 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011313fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011314if test -z "$MACHDEP_OBJS"; then
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11316$as_echo "none" >&6; }
11317else
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11319$as_echo "$MACHDEP_OBJS" >&6; }
11320fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011321
Guido van Rossum627b2d71993-12-24 10:39:16 +000011322# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011323for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011324 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011325 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011326 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011327 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011328 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011329 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011330 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011331 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011332 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011333 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011334 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011335 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011336 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011337 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011338 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11339 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011340 sigaction sigaltstack siginterrupt sigpending sigrelse \
11341 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011342 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011343 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011344 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011345do :
11346 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11347ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011348if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011350#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011352
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011353fi
11354done
11355
Michael W. Hudson54241132001-12-07 15:38:26 +000011356
Miss Islington (bot)98344a42018-09-12 16:36:05 -070011357# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11358# links. Some libc implementations have a stub lchmod implementation that always
11359# returns an error.
11360if test "$MACHDEP" != linux; then
11361 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11362if test "x$ac_cv_func_lchmod" = xyes; then :
11363
11364fi
11365
11366fi
11367
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011368ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11369 #include <dirent.h>
11370"
11371if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11372
11373$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11374
11375fi
11376
11377
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011378# For some functions, having a definition is not sufficient, since
11379# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11381$as_echo_n "checking for chroot... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011384#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011385int
11386main ()
11387{
11388void *x=chroot
11389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011394
Matthias Kloseb9621712010-04-24 17:59:49 +000011395$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011399else
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11401$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011402
11403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11406$as_echo_n "checking for link... " >&6; }
11407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011409#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011410int
11411main ()
11412{
11413void *x=link
11414 ;
11415 return 0;
11416}
11417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011421
Matthias Kloseb159a552010-04-25 21:00:44 +000011422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11426$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011427
11428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11431$as_echo_n "checking for symlink... " >&6; }
11432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011434#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011435int
11436main ()
11437{
11438void *x=symlink
11439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011446
Matthias Kloseb159a552010-04-25 21:00:44 +000011447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011449else
Matthias Kloseb9621712010-04-24 17:59:49 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011452
11453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11456$as_echo_n "checking for fchdir... " >&6; }
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011459#include <unistd.h>
11460int
11461main ()
11462{
11463void *x=fchdir
11464 ;
11465 return 0;
11466}
11467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011468if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011471
Matthias Kloseb159a552010-04-25 21:00:44 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011473$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011474else
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011477
11478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11481$as_echo_n "checking for fsync... " >&6; }
11482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011483/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011484#include <unistd.h>
11485int
11486main ()
11487{
11488void *x=fsync
11489 ;
11490 return 0;
11491}
11492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011494
Matthias Kloseb9621712010-04-24 17:59:49 +000011495$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011496
Matthias Kloseb159a552010-04-25 21:00:44 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011498$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011499else
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011502
11503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11506$as_echo_n "checking for fdatasync... " >&6; }
11507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011508/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011509#include <unistd.h>
11510int
11511main ()
11512{
11513void *x=fdatasync
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öwisa64988c2003-09-20 15:30:20 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +000011527
11528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11531$as_echo_n "checking for epoll... " >&6; }
11532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011533/* end confdefs.h. */
11534#include <sys/epoll.h>
11535int
11536main ()
11537{
11538void *x=epoll_create
11539 ;
11540 return 0;
11541}
11542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011544
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011546
Matthias Kloseb159a552010-04-25 21:00:44 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011552
11553fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11556$as_echo_n "checking for epoll_create1... " >&6; }
11557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558/* end confdefs.h. */
11559#include <sys/epoll.h>
11560int
11561main ()
11562{
11563void *x=epoll_create1
11564 ;
11565 return 0;
11566}
11567_ACEOF
11568if ac_fn_c_try_compile "$LINENO"; then :
11569
11570$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11571
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11573$as_echo "yes" >&6; }
11574else
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
11577
11578fi
11579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11581$as_echo_n "checking for kqueue... " >&6; }
11582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011583/* end confdefs.h. */
11584
11585#include <sys/types.h>
11586#include <sys/event.h>
11587
11588int
11589main ()
11590{
11591int x=kqueue()
11592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011599
Matthias Kloseb159a552010-04-25 21:00:44 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011605
11606fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11609$as_echo_n "checking for prlimit... " >&6; }
11610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11611/* end confdefs.h. */
11612
11613#include <sys/time.h>
11614#include <sys/resource.h>
11615
11616int
11617main ()
11618{
11619void *x=prlimit
11620 ;
11621 return 0;
11622}
11623_ACEOF
11624if ac_fn_c_try_compile "$LINENO"; then :
11625
11626$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11627
11628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11629$as_echo "yes" >&6; }
11630else
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632$as_echo "no" >&6; }
11633
11634fi
11635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11636
Martin v. Löwisd5843682002-11-21 20:41:28 +000011637# On some systems (eg. FreeBSD 5), we would find a definition of the
11638# functions ctermid_r, setgroups in the library, but no prototype
11639# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11640# address to avoid compiler warnings and potential miscompilations
11641# because of the missing prototypes.
11642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11644$as_echo_n "checking for ctermid_r... " >&6; }
11645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011646/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011647
Martin v. Löwisd5843682002-11-21 20:41:28 +000011648#include <stdio.h>
11649
Martin v. Löwisd5843682002-11-21 20:41:28 +000011650int
11651main ()
11652{
11653void* p = ctermid_r
11654 ;
11655 return 0;
11656}
11657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011658if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011659
Matthias Kloseb9621712010-04-24 17:59:49 +000011660$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011661
Matthias Kloseb159a552010-04-25 21:00:44 +000011662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011663$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011664else
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11666$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011667
11668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11670
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11672$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011673if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011674 $as_echo_n "(cached) " >&6
11675else
11676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011677/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011678#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011679int
11680main ()
11681{
11682void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011683
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684 ;
11685 return 0;
11686}
11687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011688if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011689 ac_cv_flock_decl=yes
11690else
11691 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011692
11693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011695
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011696fi
11697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11698$as_echo "$ac_cv_flock_decl" >&6; }
11699if test "x${ac_cv_flock_decl}" = xyes; then
11700 for ac_func in flock
11701do :
11702 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011703if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011704 cat >>confdefs.h <<_ACEOF
11705#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011706_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011707
Antoine Pitroua3000072010-09-07 14:52:42 +000011708else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011710$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011711if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011712 $as_echo_n "(cached) " >&6
11713else
11714 ac_check_lib_save_LIBS=$LIBS
11715LIBS="-lbsd $LIBS"
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717/* end confdefs.h. */
11718
11719/* Override any GCC internal prototype to avoid an error.
11720 Use char because int might match the return type of a GCC
11721 builtin and then its argument prototype would still apply. */
11722#ifdef __cplusplus
11723extern "C"
11724#endif
11725char flock ();
11726int
11727main ()
11728{
11729return flock ();
11730 ;
11731 return 0;
11732}
11733_ACEOF
11734if ac_fn_c_try_link "$LINENO"; then :
11735 ac_cv_lib_bsd_flock=yes
11736else
11737 ac_cv_lib_bsd_flock=no
11738fi
11739rm -f core conftest.err conftest.$ac_objext \
11740 conftest$ac_exeext conftest.$ac_ext
11741LIBS=$ac_check_lib_save_LIBS
11742fi
11743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11744$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011745if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011746 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011747
11748
11749$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11750
11751
11752fi
11753
11754
11755fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011756done
11757
Antoine Pitroua3000072010-09-07 14:52:42 +000011758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11761$as_echo_n "checking for getpagesize... " >&6; }
11762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011763/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011764
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011765#include <unistd.h>
11766
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011767int
11768main ()
11769{
11770void* p = getpagesize
11771 ;
11772 return 0;
11773}
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011778
Matthias Kloseb159a552010-04-25 21:00:44 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011780$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11783$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011784
11785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011787
Victor Stinner984890f2011-11-24 13:53:38 +010011788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11789$as_echo_n "checking for broken unsetenv... " >&6; }
11790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11791/* end confdefs.h. */
11792
11793#include <stdlib.h>
11794
11795int
11796main ()
11797{
11798int res = unsetenv("DUMMY")
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803if ac_fn_c_try_compile "$LINENO"; then :
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806else
11807
11808$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11809
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11811$as_echo "yes" >&6; }
11812
11813fi
11814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11815
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011816for ac_prog in true
11817do
11818 # Extract the first word of "$ac_prog", so it can be a program name with args.
11819set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011824else
11825 if test -n "$TRUE"; then
11826 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11827else
11828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11829for as_dir in $PATH
11830do
11831 IFS=$as_save_IFS
11832 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011835 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 $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 +000011837 break 2
11838 fi
11839done
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011841IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011842
11843fi
11844fi
11845TRUE=$ac_cv_prog_TRUE
11846if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11848$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011852fi
11853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011855 test -n "$TRUE" && break
11856done
11857test -n "$TRUE" || TRUE="/bin/true"
11858
11859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11861$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011862if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011864else
11865 ac_check_lib_save_LIBS=$LIBS
11866LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011868/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011870/* Override any GCC internal prototype to avoid an error.
11871 Use char because int might match the return type of a GCC
11872 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011873#ifdef __cplusplus
11874extern "C"
11875#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011876char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011877int
11878main ()
11879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011881 ;
11882 return 0;
11883}
11884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011886 ac_cv_lib_c_inet_aton=yes
11887else
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011890rm -f core conftest.err conftest.$ac_objext \
11891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011892LIBS=$ac_check_lib_save_LIBS
11893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11895$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011896if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011897 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11900$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011901if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011903else
11904 ac_check_lib_save_LIBS=$LIBS
11905LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011907/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909/* Override any GCC internal prototype to avoid an error.
11910 Use char because int might match the return type of a GCC
11911 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011912#ifdef __cplusplus
11913extern "C"
11914#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011915char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011916int
11917main ()
11918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011919return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011925 ac_cv_lib_resolv_inet_aton=yes
11926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929rm -f core conftest.err conftest.$ac_objext \
11930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011931LIBS=$ac_check_lib_save_LIBS
11932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11934$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011935if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011936 cat >>confdefs.h <<_ACEOF
11937#define HAVE_LIBRESOLV 1
11938_ACEOF
11939
11940 LIBS="-lresolv $LIBS"
11941
11942fi
11943
11944
11945fi
11946
11947
Christian Heimesd0764e22007-12-04 15:00:33 +000011948# On Tru64, chflags seems to be present, but calling it will
11949# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11951$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011952if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011953 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011956 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011957else
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011959/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011960
Christian Heimesd0764e22007-12-04 15:00:33 +000011961#include <sys/stat.h>
11962#include <unistd.h>
11963int main(int argc, char*argv[])
11964{
11965 if(chflags(argv[0], 0) != 0)
11966 return 1;
11967 return 0;
11968}
Ned Deily3eb67d52011-06-28 00:00:28 -070011969
Christian Heimesd0764e22007-12-04 15:00:33 +000011970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011972 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011978fi
11979
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011980
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11983$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011984if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011986if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011987 ac_cv_have_chflags="yes"
11988else
11989 ac_cv_have_chflags="no"
11990fi
11991
11992fi
11993if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011996
11997fi
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12000$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012005 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012008/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012009
Christian Heimesd0764e22007-12-04 15:00:33 +000012010#include <sys/stat.h>
12011#include <unistd.h>
12012int main(int argc, char*argv[])
12013{
12014 if(lchflags(argv[0], 0) != 0)
12015 return 1;
12016 return 0;
12017}
Ned Deily3eb67d52011-06-28 00:00:28 -070012018
Christian Heimesd0764e22007-12-04 15:00:33 +000012019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012021 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012027fi
12028
12029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12032$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012033if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012035if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012036 ac_cv_have_lchflags="yes"
12037else
12038 ac_cv_have_lchflags="no"
12039fi
12040
12041fi
12042if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012045
12046fi
12047
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012048case $ac_sys_system/$ac_sys_release in
12049Darwin/*)
12050 _CUR_CFLAGS="${CFLAGS}"
12051 _CUR_LDFLAGS="${LDFLAGS}"
12052 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12053 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12054 ;;
12055esac
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12058$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012061else
12062 ac_check_lib_save_LIBS=$LIBS
12063LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012065/* end confdefs.h. */
12066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067/* Override any GCC internal prototype to avoid an error.
12068 Use char because int might match the return type of a GCC
12069 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012070#ifdef __cplusplus
12071extern "C"
12072#endif
12073char inflateCopy ();
12074int
12075main ()
12076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012083 ac_cv_lib_z_inflateCopy=yes
12084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012087rm -f core conftest.err conftest.$ac_objext \
12088 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012089LIBS=$ac_check_lib_save_LIBS
12090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12092$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012094
Matthias Kloseb9621712010-04-24 17:59:49 +000012095$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012096
12097fi
12098
12099
12100case $ac_sys_system/$ac_sys_release in
12101Darwin/*)
12102 CFLAGS="${_CUR_CFLAGS}"
12103 LDFLAGS="${_CUR_LDFLAGS}"
12104 ;;
12105esac
12106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12108$as_echo_n "checking for hstrerror... " >&6; }
12109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012110/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012111
Martin v. Löwise9416172003-05-03 10:12:45 +000012112#include <netdb.h>
12113
Martin v. Löwise9416172003-05-03 10:12:45 +000012114int
12115main ()
12116{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012117void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012118 ;
12119 return 0;
12120}
12121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012125
Matthias Kloseb159a552010-04-25 21:00:44 +000012126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012127$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012131
12132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012133rm -f core conftest.err conftest.$ac_objext \
12134 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12137$as_echo_n "checking for inet_aton... " >&6; }
12138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012139/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012140
Martin v. Löwis86d66262006-02-17 08:40:11 +000012141#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012142#include <sys/socket.h>
12143#include <netinet/in.h>
12144#include <arpa/inet.h>
12145
Martin v. Löwise9416172003-05-03 10:12:45 +000012146int
12147main ()
12148{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012149void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012150 ;
12151 return 0;
12152}
12153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012154if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012155
Matthias Kloseb9621712010-04-24 17:59:49 +000012156$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012157
Matthias Kloseb159a552010-04-25 21:00:44 +000012158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012159$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012160else
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12162$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012163
12164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012165rm -f core conftest.err conftest.$ac_objext \
12166 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12169$as_echo_n "checking for inet_pton... " >&6; }
12170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012171/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012172
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012173#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012174#include <sys/socket.h>
12175#include <netinet/in.h>
12176#include <arpa/inet.h>
12177
Martin v. Löwise9416172003-05-03 10:12:45 +000012178int
12179main ()
12180{
12181void* p = inet_pton
12182 ;
12183 return 0;
12184}
12185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012186if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012189
Matthias Kloseb159a552010-04-25 21:00:44 +000012190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012191$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012192else
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012195
12196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012198
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012199# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12201$as_echo_n "checking for setgroups... " >&6; }
12202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012204
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012205#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012206#ifdef HAVE_GRP_H
12207#include <grp.h>
12208#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012209
Martin v. Löwisd5843682002-11-21 20:41:28 +000012210int
12211main ()
12212{
12213void* p = setgroups
12214 ;
12215 return 0;
12216}
12217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012219
Matthias Kloseb9621712010-04-24 17:59:49 +000012220$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012221
Matthias Kloseb159a552010-04-25 21:00:44 +000012222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012223$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012224else
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12226$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012227
12228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012230
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012231# check for openpty and forkpty
12232
12233for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012234do :
12235 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012236if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012239_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012240
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012241else
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12243$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246else
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252/* Override any GCC internal prototype to avoid an error.
12253 Use char because int might match the return type of a GCC
12254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012255#ifdef __cplusplus
12256extern "C"
12257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012258char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012259int
12260main ()
12261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272rm -f core conftest.err conftest.$ac_objext \
12273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012274LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12277$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012280 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12283$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012284if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012286else
12287 ac_check_lib_save_LIBS=$LIBS
12288LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012290/* end confdefs.h. */
12291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292/* Override any GCC internal prototype to avoid an error.
12293 Use char because int might match the return type of a GCC
12294 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012295#ifdef __cplusplus
12296extern "C"
12297#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012298char openpty ();
12299int
12300main ()
12301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308 ac_cv_lib_bsd_openpty=yes
12309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012312rm -f core conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314LIBS=$ac_check_lib_save_LIBS
12315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12317$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012318if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320 LIBS="$LIBS -lbsd"
12321fi
12322
12323
12324fi
12325
Fred Drake8cef4cf2000-06-28 16:40:38 +000012326
12327fi
12328done
12329
12330for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012331do :
12332 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012333if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012336_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012337
Fred Drake8cef4cf2000-06-28 16:40:38 +000012338else
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12340$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012343else
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012345LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349/* Override any GCC internal prototype to avoid an error.
12350 Use char because int might match the return type of a GCC
12351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012352#ifdef __cplusplus
12353extern "C"
12354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012355char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012356int
12357main ()
12358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ;
12361 return 0;
12362}
12363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012366else
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012369rm -f core conftest.err conftest.$ac_objext \
12370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012371LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12374$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012375if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012377 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12380$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012383else
12384 ac_check_lib_save_LIBS=$LIBS
12385LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012387/* end confdefs.h. */
12388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389/* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012392#ifdef __cplusplus
12393extern "C"
12394#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012395char forkpty ();
12396int
12397main ()
12398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012405 ac_cv_lib_bsd_forkpty=yes
12406else
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012409rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012411LIBS=$ac_check_lib_save_LIBS
12412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12414$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012415if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012417 LIBS="$LIBS -lbsd"
12418fi
12419
12420
12421fi
12422
Fred Drake8cef4cf2000-06-28 16:40:38 +000012423
12424fi
12425done
12426
Jack Jansendd19cf82001-12-06 22:36:17 +000012427
Michael W. Hudson54241132001-12-07 15:38:26 +000012428# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012429for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012430do :
12431 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12432ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012433if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012436_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012439done
12440
Michael W. Hudson54241132001-12-07 15:38:26 +000012441
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012442ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012443if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012444 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012445
Martin v. Löwis1142de32002-03-29 16:28:31 +000012446else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012448 *" dup2.$ac_objext "* ) ;;
12449 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012451esac
12452
Martin v. Löwis1142de32002-03-29 16:28:31 +000012453fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012455ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012456if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012457 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12458
12459else
12460 case " $LIBOBJS " in
12461 *" strdup.$ac_objext "* ) ;;
12462 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12463 ;;
12464esac
12465
12466fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012467
12468
12469for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012470do :
12471 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012472if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012479int
12480main ()
12481{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012490
Guido van Rossum627b2d71993-12-24 10:39:16 +000012491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012493
Guido van Rossum627b2d71993-12-24 10:39:16 +000012494fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012495done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012496
Jack Jansen150753c2003-03-29 22:07:47 +000012497for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012498do :
12499 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012500if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012501 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012505/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012506#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012507int
12508main ()
12509{
12510setpgrp(0,0);
12511 ;
12512 return 0;
12513}
12514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012518
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012521
12522fi
12523done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012524
Thomas Wouters3a584202000-08-05 23:28:51 +000012525for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012526do :
12527 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012528if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012534#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012535int
12536main ()
12537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ;
12540 return 0;
12541}
12542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012543if ac_fn_c_try_compile "$LINENO"; then :
12544
Guido van Rossum627b2d71993-12-24 10:39:16 +000012545else
Skip Montanaro6dead952003-09-25 14:50:04 +000012546
Matthias Kloseb9621712010-04-24 17:59:49 +000012547$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549
Guido van Rossum627b2d71993-12-24 10:39:16 +000012550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012552
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012554done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012555
Michael W. Hudson54241132001-12-07 15:38:26 +000012556
Victor Stinnere0be4232011-10-25 13:06:09 +020012557for ac_func in clock_gettime
12558do :
12559 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12560if test "x$ac_cv_func_clock_gettime" = xyes; then :
12561 cat >>confdefs.h <<_ACEOF
12562#define HAVE_CLOCK_GETTIME 1
12563_ACEOF
12564
12565else
12566
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12568$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12569if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12570 $as_echo_n "(cached) " >&6
12571else
12572 ac_check_lib_save_LIBS=$LIBS
12573LIBS="-lrt $LIBS"
12574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12575/* end confdefs.h. */
12576
12577/* Override any GCC internal prototype to avoid an error.
12578 Use char because int might match the return type of a GCC
12579 builtin and then its argument prototype would still apply. */
12580#ifdef __cplusplus
12581extern "C"
12582#endif
12583char clock_gettime ();
12584int
12585main ()
12586{
12587return clock_gettime ();
12588 ;
12589 return 0;
12590}
12591_ACEOF
12592if ac_fn_c_try_link "$LINENO"; then :
12593 ac_cv_lib_rt_clock_gettime=yes
12594else
12595 ac_cv_lib_rt_clock_gettime=no
12596fi
12597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
12599LIBS=$ac_check_lib_save_LIBS
12600fi
12601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12602$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12603if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12604
Victor Stinner7efb8332014-08-29 15:41:08 +020012605 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012606 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12607
12608
12609$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12610
12611
12612fi
12613
12614
12615fi
12616done
12617
12618
12619for ac_func in clock_getres
12620do :
12621 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12622if test "x$ac_cv_func_clock_getres" = xyes; then :
12623 cat >>confdefs.h <<_ACEOF
12624#define HAVE_CLOCK_GETRES 1
12625_ACEOF
12626
12627else
12628
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12630$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12631if ${ac_cv_lib_rt_clock_getres+:} false; then :
12632 $as_echo_n "(cached) " >&6
12633else
12634 ac_check_lib_save_LIBS=$LIBS
12635LIBS="-lrt $LIBS"
12636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12637/* end confdefs.h. */
12638
12639/* Override any GCC internal prototype to avoid an error.
12640 Use char because int might match the return type of a GCC
12641 builtin and then its argument prototype would still apply. */
12642#ifdef __cplusplus
12643extern "C"
12644#endif
12645char clock_getres ();
12646int
12647main ()
12648{
12649return clock_getres ();
12650 ;
12651 return 0;
12652}
12653_ACEOF
12654if ac_fn_c_try_link "$LINENO"; then :
12655 ac_cv_lib_rt_clock_getres=yes
12656else
12657 ac_cv_lib_rt_clock_getres=no
12658fi
12659rm -f core conftest.err conftest.$ac_objext \
12660 conftest$ac_exeext conftest.$ac_ext
12661LIBS=$ac_check_lib_save_LIBS
12662fi
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12664$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12665if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12666
12667 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12668
12669
12670fi
12671
12672
12673fi
12674done
12675
12676
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012677for ac_func in clock_settime
12678do :
12679 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12680if test "x$ac_cv_func_clock_settime" = xyes; then :
12681 cat >>confdefs.h <<_ACEOF
12682#define HAVE_CLOCK_SETTIME 1
12683_ACEOF
12684
12685else
12686
12687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12688$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12689if ${ac_cv_lib_rt_clock_settime+:} false; then :
12690 $as_echo_n "(cached) " >&6
12691else
12692 ac_check_lib_save_LIBS=$LIBS
12693LIBS="-lrt $LIBS"
12694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12695/* end confdefs.h. */
12696
12697/* Override any GCC internal prototype to avoid an error.
12698 Use char because int might match the return type of a GCC
12699 builtin and then its argument prototype would still apply. */
12700#ifdef __cplusplus
12701extern "C"
12702#endif
12703char clock_settime ();
12704int
12705main ()
12706{
12707return clock_settime ();
12708 ;
12709 return 0;
12710}
12711_ACEOF
12712if ac_fn_c_try_link "$LINENO"; then :
12713 ac_cv_lib_rt_clock_settime=yes
12714else
12715 ac_cv_lib_rt_clock_settime=no
12716fi
12717rm -f core conftest.err conftest.$ac_objext \
12718 conftest$ac_exeext conftest.$ac_ext
12719LIBS=$ac_check_lib_save_LIBS
12720fi
12721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12722$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12723if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12724
12725 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12726
12727
12728fi
12729
12730
12731fi
12732done
12733
12734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12736$as_echo_n "checking for major... " >&6; }
12737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012739
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012740#if defined(MAJOR_IN_MKDEV)
12741#include <sys/mkdev.h>
12742#elif defined(MAJOR_IN_SYSMACROS)
12743#include <sys/sysmacros.h>
12744#else
12745#include <sys/types.h>
12746#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012747
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012748int
12749main ()
12750{
12751
12752 makedev(major(0),minor(0));
12753
12754 ;
12755 return 0;
12756}
12757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012759
12760
Matthias Kloseb9621712010-04-24 17:59:49 +000012761$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12764$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012765
12766else
Skip Montanaro6dead952003-09-25 14:50:04 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12769$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012770
12771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012772rm -f core conftest.err conftest.$ac_objext \
12773 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012774
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012775# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012776# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12778$as_echo_n "checking for getaddrinfo... " >&6; }
12779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012781
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012782#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012783#include <sys/socket.h>
12784#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012785#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787int
12788main ()
12789{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012790getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ;
12792 return 0;
12793}
12794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012795if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012796 have_getaddrinfo=yes
12797else
Matthias Kloseb9621712010-04-24 17:59:49 +000012798 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012800rm -f core conftest.err conftest.$ac_objext \
12801 conftest$ac_exeext conftest.$ac_ext
12802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12803$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012804if test $have_getaddrinfo = yes
12805then
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12807$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012808 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012812
12813if test "${enable_ipv6+set}" = set; then
12814 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12815else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012816 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012817fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012820/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012821
Stefan Krah19c21392012-11-22 23:47:32 +010012822#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823#include <sys/types.h>
12824#include <netdb.h>
12825#include <string.h>
12826#include <sys/socket.h>
12827#include <netinet/in.h>
12828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012829int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012830{
12831 int passive, gaierr, inet4 = 0, inet6 = 0;
12832 struct addrinfo hints, *ai, *aitop;
12833 char straddr[INET6_ADDRSTRLEN], strport[16];
12834
12835 for (passive = 0; passive <= 1; passive++) {
12836 memset(&hints, 0, sizeof(hints));
12837 hints.ai_family = AF_UNSPEC;
12838 hints.ai_flags = passive ? AI_PASSIVE : 0;
12839 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012840 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12842 (void)gai_strerror(gaierr);
12843 goto bad;
12844 }
12845 for (ai = aitop; ai; ai = ai->ai_next) {
12846 if (ai->ai_addr == NULL ||
12847 ai->ai_addrlen == 0 ||
12848 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12849 straddr, sizeof(straddr), strport, sizeof(strport),
12850 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12851 goto bad;
12852 }
12853 switch (ai->ai_family) {
12854 case AF_INET:
12855 if (strcmp(strport, "54321") != 0) {
12856 goto bad;
12857 }
12858 if (passive) {
12859 if (strcmp(straddr, "0.0.0.0") != 0) {
12860 goto bad;
12861 }
12862 } else {
12863 if (strcmp(straddr, "127.0.0.1") != 0) {
12864 goto bad;
12865 }
12866 }
12867 inet4++;
12868 break;
12869 case AF_INET6:
12870 if (strcmp(strport, "54321") != 0) {
12871 goto bad;
12872 }
12873 if (passive) {
12874 if (strcmp(straddr, "::") != 0) {
12875 goto bad;
12876 }
12877 } else {
12878 if (strcmp(straddr, "::1") != 0) {
12879 goto bad;
12880 }
12881 }
12882 inet6++;
12883 break;
12884 case AF_UNSPEC:
12885 goto bad;
12886 break;
12887 default:
12888 /* another family support? */
12889 break;
12890 }
12891 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012892 freeaddrinfo(aitop);
12893 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012894 }
12895
12896 if (!(inet4 == 0 || inet4 == 2))
12897 goto bad;
12898 if (!(inet6 == 0 || inet6 == 2))
12899 goto bad;
12900
12901 if (aitop)
12902 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012903 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012904
12905 bad:
12906 if (aitop)
12907 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012908 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909}
12910
Martin v. Löwis11437992002-04-12 09:54:03 +000012911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012913 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012921fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12926$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12927
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012928if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012929then
12930 if test $ipv6 = yes
12931 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932 echo 'Fatal: You must get working getaddrinfo() function.'
12933 echo ' or you can specify "--disable-ipv6"'.
12934 exit 1
12935 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012936else
Martin v. Löwis11437992002-04-12 09:54:03 +000012937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012939
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012940fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012941
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012942for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012943do :
12944 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012945if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012948_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012949
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012950fi
12951done
12952
Michael W. Hudson54241132001-12-07 15:38:26 +000012953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12956$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012957if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962#include <sys/types.h>
12963#include <sys/time.h>
12964#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Martin v. Löwis11437992002-04-12 09:54:03 +000012966int
12967main ()
12968{
12969if ((struct tm *) 0)
12970return 0;
12971 ;
12972 return 0;
12973}
12974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012975if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012976 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12983$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012984if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987
12988fi
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12991$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012992if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997#include <sys/types.h>
12998#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
Martin v. Löwis11437992002-04-12 09:54:03 +000013000int
13001main ()
13002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003struct tm tm;
13004 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ;
13007 return 0;
13008}
13009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013011 ac_cv_struct_tm=time.h
13012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13018$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013019if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013022
13023fi
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025ac_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 +000013026#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028"
Victor Stinnere0be4232011-10-25 13:06:09 +020013029if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013030
13031cat >>confdefs.h <<_ACEOF
13032#define HAVE_STRUCT_TM_TM_ZONE 1
13033_ACEOF
13034
13035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013037
Martin v. Löwis11437992002-04-12 09:54:03 +000013038if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013041
13042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13044"
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013047else
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049fi
13050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013052#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053_ACEOF
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13056$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013057if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013062#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063#if !HAVE_DECL_TZNAME
13064extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013066
Martin v. Löwis11437992002-04-12 09:54:03 +000013067int
13068main ()
13069{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076 ac_cv_var_tzname=yes
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013080rm -f core conftest.err conftest.$ac_objext \
13081 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13084$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013085 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Matthias Kloseb9621712010-04-24 17:59:49 +000013087$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089 fi
13090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092ac_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 +020013093if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013094
13095cat >>confdefs.h <<_ACEOF
13096#define HAVE_STRUCT_STAT_ST_RDEV 1
13097_ACEOF
13098
13099
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013100fi
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102ac_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 +020013103if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105cat >>confdefs.h <<_ACEOF
13106#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13107_ACEOF
13108
13109
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013110fi
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112ac_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 +020013113if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013114
13115cat >>confdefs.h <<_ACEOF
13116#define HAVE_STRUCT_STAT_ST_FLAGS 1
13117_ACEOF
13118
13119
13120fi
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122ac_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 +020013123if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013124
13125cat >>confdefs.h <<_ACEOF
13126#define HAVE_STRUCT_STAT_ST_GEN 1
13127_ACEOF
13128
13129
13130fi
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132ac_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 +020013133if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013134
13135cat >>confdefs.h <<_ACEOF
13136#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13137_ACEOF
13138
13139
13140fi
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142ac_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 +020013143if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013144
Martin v. Löwis11437992002-04-12 09:54:03 +000013145cat >>confdefs.h <<_ACEOF
13146#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13147_ACEOF
13148
13149
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013150fi
13151
Stefan Krah267b6392016-04-26 01:09:18 +020013152ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13153 #include <sys/types.h>
13154 #include <pwd.h>
13155
13156"
13157if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13158
13159cat >>confdefs.h <<_ACEOF
13160#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13161_ACEOF
13162
13163
13164fi
13165ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13166 #include <sys/types.h>
13167 #include <pwd.h>
13168
13169"
13170if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13171
13172cat >>confdefs.h <<_ACEOF
13173#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13174_ACEOF
13175
13176
13177fi
13178
Zachary Ware6a6967e2016-10-01 00:47:27 -050013179# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13180ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13181"
13182if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13183
13184cat >>confdefs.h <<_ACEOF
13185#define HAVE_SIGINFO_T_SI_BAND 1
13186_ACEOF
13187
13188
13189fi
13190
Michael W. Hudson54241132001-12-07 15:38:26 +000013191
Matthias Kloseb9621712010-04-24 17:59:49 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13193$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013194if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196else
Matthias Kloseb159a552010-04-25 21:00:44 +000013197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013199/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013200#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013201int
13202main ()
13203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013204return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 ;
13206 return 0;
13207}
13208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210 ac_cv_header_time_altzone=yes
13211else
Matthias Kloseb9621712010-04-24 17:59:49 +000013212 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216fi
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13219$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Matthias Kloseb9621712010-04-24 17:59:49 +000013222$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013223
13224fi
13225
Guido van Rossumda88dad1995-01-26 00:46:29 +000013226was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13228$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013230/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231
13232#include <sys/types.h>
13233#include <sys/select.h>
13234#include <sys/time.h>
13235
Martin v. Löwis11437992002-04-12 09:54:03 +000013236int
13237main ()
13238{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239;
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 ;
13241 return 0;
13242}
13243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013249 was_it_defined=yes
13250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13254$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13257$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013258if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013262/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013263#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 ;
13269 return 0;
13270}
13271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013273 ac_cv_struct_addrinfo=yes
13274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13278fi
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13281$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
13286fi
13287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13289$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013290if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013294/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013295
13296# include <sys/types.h>
13297# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ;
13303 return 0;
13304}
13305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013307 ac_cv_struct_sockaddr_storage=yes
13308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13315$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013316if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319
13320fi
13321
Christian Heimesdffa3942016-09-05 23:54:41 +020013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13323$as_echo_n "checking for sockaddr_alg... " >&6; }
13324if ${ac_cv_struct_sockaddr_alg+:} false; then :
13325 $as_echo_n "(cached) " >&6
13326else
13327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13328/* end confdefs.h. */
13329
13330# include <sys/types.h>
13331# include <sys/socket.h>
13332# include <linux/if_alg.h>
13333int
13334main ()
13335{
13336struct sockaddr_alg s
13337 ;
13338 return 0;
13339}
13340_ACEOF
13341if ac_fn_c_try_compile "$LINENO"; then :
13342 ac_cv_struct_sockaddr_alg=yes
13343else
13344 ac_cv_struct_sockaddr_alg=no
13345fi
13346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13347fi
13348
13349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13350$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13351if test $ac_cv_struct_sockaddr_alg = yes; then
13352
13353$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13354
13355fi
13356
Guido van Rossum627b2d71993-12-24 10:39:16 +000013357# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13360$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013361if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013366$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
13370static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013371test_array [0] = 0;
13372return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
13374 ;
13375 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013376}
Martin v. Löwis11437992002-04-12 09:54:03 +000013377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013379 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13386$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389
13390fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13393$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013394if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400int
13401main ()
13402{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013405 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013407 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409 char const *const *pcpcc;
13410 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 /* NEC SVR4.0.2 mips cc rejects this. */
13412 struct point {int x, y;};
13413 static struct point const zero = {0,0};
13414 /* AIX XL C 1.02.0.0 rejects this.
13415 It does not let you subtract one const X* pointer from another in
13416 an arm of an if-expression whose if-part is not a constant
13417 expression */
13418 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421 ++pcpcc;
13422 ppc = (char**) pcpcc;
13423 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013424 { /* SCO 3.2v4 cc rejects this sort of thing. */
13425 char tx;
13426 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 }
13432 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13433 int x[] = {25, 17};
13434 const int *foo = &x[0];
13435 ++foo;
13436 }
13437 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13438 typedef const int *iptr;
13439 iptr p = 0;
13440 ++p;
13441 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013442 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013444 struct s { int j; const int *ap[3]; } bx;
13445 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 }
13447 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13448 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013452#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013453
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ;
13455 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013456}
Martin v. Löwis11437992002-04-12 09:54:03 +000013457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459 ac_cv_c_const=yes
13460else
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13466$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470
13471fi
13472
Michael W. Hudson54241132001-12-07 15:38:26 +000013473
Guido van Rossumda88dad1995-01-26 00:46:29 +000013474works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13476$as_echo_n "checking for working signed char... " >&6; }
13477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013479
Martin v. Löwis11437992002-04-12 09:54:03 +000013480int
13481main ()
13482{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 ;
13485 return 0;
13486}
13487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013488if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013489 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013490else
Skip Montanaro6dead952003-09-25 14:50:04 +000013491
Matthias Kloseb9621712010-04-24 17:59:49 +000013492$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013493
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013494
Guido van Rossum7f43da71994-08-01 12:15:30 +000013495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13498$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013499
Guido van Rossumda88dad1995-01-26 00:46:29 +000013500have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13502$as_echo_n "checking for prototypes... " >&6; }
13503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013505int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013506int
13507main ()
13508{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Matthias Kloseb159a552010-04-25 21:00:44 +000013518 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13522$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013523
Guido van Rossumda88dad1995-01-26 00:46:29 +000013524works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13526$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013529
13530#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013531int foo(int x, ...) {
13532 va_list va;
13533 va_start(va, x);
13534 va_arg(va, int);
13535 va_arg(va, char *);
13536 va_arg(va, double);
13537 return 0;
13538}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540int
13541main ()
13542{
Guido van Rossum90eea071996-08-30 20:58:57 +000013543return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 ;
13545 return 0;
13546}
13547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013553 works=yes
13554
Guido van Rossum627b2d71993-12-24 10:39:16 +000013555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13558$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559
Martin v. Löwisd6320502004-08-12 13:45:08 +000013560# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13562$as_echo_n "checking for socketpair... " >&6; }
13563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013564/* end confdefs.h. */
13565
13566#include <sys/types.h>
13567#include <sys/socket.h>
13568
13569int
13570main ()
13571{
13572void *x=socketpair
13573 ;
13574 return 0;
13575}
13576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013580
Matthias Kloseb159a552010-04-25 21:00:44 +000013581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013583else
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013586
13587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013589
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013590# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13592$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013594/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595#include <sys/types.h>
13596#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013597int
13598main ()
13599{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600struct sockaddr x;
13601x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013606if ac_fn_c_try_compile "$LINENO"; then :
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13608$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611
13612else
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13614$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013615
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013620
13621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013623if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13628$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629 OLD_CFLAGS=$CFLAGS
13630 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013633
13634# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636int
13637main ()
13638{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013639
13640 char *name;
13641 struct hostent *he, *res;
13642 char buffer[2048];
13643 int buflen = 2048;
13644 int h_errnop;
13645
13646 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
13648 ;
13649 return 0;
13650}
13651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013655
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13660$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013662else
Skip Montanaro6dead952003-09-25 14:50:04 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13665$as_echo "no" >&6; }
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13667$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013669/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013671# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Martin v. Löwis11437992002-04-12 09:54:03 +000013673int
13674main ()
13675{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013676
13677 char *name;
13678 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013679 char buffer[2048];
13680 int buflen = 2048;
13681 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013682
Matthias Kloseb159a552010-04-25 21:00:44 +000013683 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013684
13685 ;
13686 return 0;
13687}
13688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
Matthias Kloseb159a552010-04-25 21:00:44 +000013694$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013695
Matthias Kloseb9621712010-04-24 17:59:49 +000013696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13697$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013699else
Skip Montanaro6dead952003-09-25 14:50:04 +000013700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13702$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13704$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13706/* end confdefs.h. */
13707
13708# include <netdb.h>
13709
13710int
13711main ()
13712{
13713
13714 char *name;
13715 struct hostent *he;
13716 struct hostent_data data;
13717
13718 (void) gethostbyname_r(name, he, &data);
13719
13720 ;
13721 return 0;
13722}
13723_ACEOF
13724if ac_fn_c_try_compile "$LINENO"; then :
13725
13726 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13727
13728
13729$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13730
13731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13732$as_echo "yes" >&6; }
13733
13734else
13735
13736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13737$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013747 CFLAGS=$OLD_CFLAGS
13748
13749else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013750
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 for ac_func in gethostbyname
13752do :
13753 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013754if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013756#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013757_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013760done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761
Michael W. Hudson54241132001-12-07 15:38:26 +000013762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013763fi
13764
Michael W. Hudson54241132001-12-07 15:38:26 +000013765
13766
13767
13768
13769
13770
Guido van Rossum627b2d71993-12-24 10:39:16 +000013771# checks for system services
13772# (none yet)
13773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013775ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013778else
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13780$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013781if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783else
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013785LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789/* Override any GCC internal prototype to avoid an error.
13790 Use char because int might match the return type of a GCC
13791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013792#ifdef __cplusplus
13793extern "C"
13794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013795char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013796int
13797main ()
13798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013809rm -f core conftest.err conftest.$ac_objext \
13810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013811LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13814$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013815if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 cat >>confdefs.h <<_ACEOF
13817#define HAVE_LIBIEEE 1
13818_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013820 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013821
Guido van Rossum627b2d71993-12-24 10:39:16 +000013822fi
13823
Michael W. Hudson54241132001-12-07 15:38:26 +000013824
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013825fi
13826
Michael W. Hudson54241132001-12-07 15:38:26 +000013827
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828# check for --with-libm=...
13829
Guido van Rossum563e7081996-09-10 18:20:48 +000013830case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013831Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013832*) LIBM=-lm
13833esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13835$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013840if test "$withval" = no
13841then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13843$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013844elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013845then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13847$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013848else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013849fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13852$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853fi
13854
Guido van Rossum7f43da71994-08-01 12:15:30 +000013855
13856# check for --with-libc=...
13857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13859$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013864if test "$withval" = no
13865then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13867$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013868elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013869then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13871$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013872else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013873fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13876$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877fi
13878
Guido van Rossum7f43da71994-08-01 12:15:30 +000013879
Stefan Krah1919b7e2012-03-21 18:25:23 +010013880# **************************************
13881# * Check for gcc x64 inline assembler *
13882# **************************************
13883
13884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13885$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887/* end confdefs.h. */
13888
13889int
13890main ()
13891{
13892
13893 __asm__ __volatile__ ("movq %rcx, %rax");
13894
13895 ;
13896 return 0;
13897}
13898_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013899if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013900 have_gcc_asm_for_x64=yes
13901else
13902 have_gcc_asm_for_x64=no
13903fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013904rm -f core conftest.err conftest.$ac_objext \
13905 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13907$as_echo "$have_gcc_asm_for_x64" >&6; }
13908if test "$have_gcc_asm_for_x64" = yes
13909then
13910
13911$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13912
13913fi
13914
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013915# **************************************************
13916# * Check for various properties of floating point *
13917# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013918
Matthias Kloseb9621712010-04-24 17:59:49 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13920$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013921if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013922 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013923else
13924
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013926 ac_cv_little_endian_double=no
13927else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013929/* end confdefs.h. */
13930
13931#include <string.h>
13932int main() {
13933 double x = 9006104071832581.0;
13934 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13935 return 0;
13936 else
13937 return 1;
13938}
13939
13940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942 ac_cv_little_endian_double=yes
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948fi
13949
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013950fi
13951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13953$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954if test "$ac_cv_little_endian_double" = yes
13955then
13956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013958
13959fi
13960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13962$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013963if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965else
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_big_endian_double=no
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971/* end confdefs.h. */
13972
13973#include <string.h>
13974int main() {
13975 double x = 9006104071832581.0;
13976 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13977 return 0;
13978 else
13979 return 1;
13980}
13981
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984 ac_cv_big_endian_double=yes
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13989 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990fi
13991
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992fi
13993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13995$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013996if test "$ac_cv_big_endian_double" = yes
13997then
13998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000
14001fi
14002
14003# Some ARM platforms use a mixed-endian representation for doubles.
14004# While Python doesn't currently have full support for these platforms
14005# (see e.g., issue 1762561), we can at least make sure that float <-> string
14006# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14008$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014009if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011else
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014014 ac_cv_mixed_endian_double=no
14015else
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014017/* end confdefs.h. */
14018
14019#include <string.h>
14020int main() {
14021 double x = 9006104071832581.0;
14022 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14023 return 0;
14024 else
14025 return 1;
14026}
14027
14028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030 ac_cv_mixed_endian_double=yes
14031else
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14035 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036fi
14037
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014038fi
14039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14041$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014042if test "$ac_cv_mixed_endian_double" = yes
14043then
14044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046
14047fi
14048
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014049# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014050# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014051# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014052# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014053# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014054# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014055
14056# This inline assembler syntax may also work for suncc and icc,
14057# so we try it on all platforms.
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14060$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062/* end confdefs.h. */
14063
14064int
14065main ()
14066{
14067
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014068 unsigned short cw;
14069 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14070 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014071
14072 ;
14073 return 0;
14074}
14075_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014076if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014077 have_gcc_asm_for_x87=yes
14078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014080fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014081rm -f core conftest.err conftest.$ac_objext \
14082 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14084$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014085if test "$have_gcc_asm_for_x87" = yes
14086then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014089
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014091
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14093$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14095/* end confdefs.h. */
14096
14097int
14098main ()
14099{
14100
14101 unsigned int fpcr;
14102 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14103 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14104
14105 ;
14106 return 0;
14107}
14108_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014109if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014110 have_gcc_asm_for_mc68881=yes
14111else
14112 have_gcc_asm_for_mc68881=no
14113fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014114rm -f core conftest.err conftest.$ac_objext \
14115 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14117$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14118if test "$have_gcc_asm_for_mc68881" = yes
14119then
14120
14121$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14122
14123fi
14124
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014125# Detect whether system arithmetic is subject to x87-style double
14126# rounding issues. The result of this test has little meaning on non
14127# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14128# mode is round-to-nearest and double rounding issues are present, and
14129# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14131$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014132# $BASECFLAGS may affect the result
14133ac_save_cc="$CC"
14134CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014135if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014136 ac_cv_x87_double_rounding=no
14137else
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014139/* end confdefs.h. */
14140
14141#include <stdlib.h>
14142#include <math.h>
14143int main() {
14144 volatile double x, y, z;
14145 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14146 x = 0.99999999999999989; /* 1-2**-53 */
14147 y = 1./x;
14148 if (y != 1.)
14149 exit(0);
14150 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14151 x = 1e16;
14152 y = 2.99999;
14153 z = x + y;
14154 if (z != 1e16+4.)
14155 exit(0);
14156 /* both tests show evidence of double rounding */
14157 exit(1);
14158}
14159
14160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014161if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162 ac_cv_x87_double_rounding=no
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014168fi
14169
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014170CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14172$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014173if test "$ac_cv_x87_double_rounding" = yes
14174then
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014177
14178fi
14179
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014180# ************************************
14181# * Check for mathematical functions *
14182# ************************************
14183
14184LIBS_SAVE=$LIBS
14185LIBS="$LIBS $LIBM"
14186
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014187for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14188do :
14189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14190ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014191if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014192 cat >>confdefs.h <<_ACEOF
14193#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14194_ACEOF
14195
14196fi
14197done
14198
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014199for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014200do :
14201 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14202ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014203if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014204 cat >>confdefs.h <<_ACEOF
14205#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14206_ACEOF
14207
14208fi
14209done
14210
14211ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14212"
Victor Stinnere0be4232011-10-25 13:06:09 +020014213if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014214 ac_have_decl=1
14215else
14216 ac_have_decl=0
14217fi
14218
14219cat >>confdefs.h <<_ACEOF
14220#define HAVE_DECL_ISINF $ac_have_decl
14221_ACEOF
14222ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14223"
Victor Stinnere0be4232011-10-25 13:06:09 +020014224if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014225 ac_have_decl=1
14226else
14227 ac_have_decl=0
14228fi
14229
14230cat >>confdefs.h <<_ACEOF
14231#define HAVE_DECL_ISNAN $ac_have_decl
14232_ACEOF
14233ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14234"
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014236 ac_have_decl=1
14237else
14238 ac_have_decl=0
14239fi
14240
14241cat >>confdefs.h <<_ACEOF
14242#define HAVE_DECL_ISFINITE $ac_have_decl
14243_ACEOF
14244
14245
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014246# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14247# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14249$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014250if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014252else
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014255 ac_cv_tanh_preserves_zero_sign=no
14256else
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014258/* end confdefs.h. */
14259
14260#include <math.h>
14261#include <stdlib.h>
14262int main() {
14263 /* return 0 if either negative zeros don't exist
14264 on this platform or if negative zeros exist
14265 and tanh(-0.) == -0. */
14266 if (atan2(0., -1.) == atan2(-0., -1.) ||
14267 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14268 else exit(1);
14269}
14270
14271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014272if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014273 ac_cv_tanh_preserves_zero_sign=yes
14274else
Matthias Kloseb9621712010-04-24 17:59:49 +000014275 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14278 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014279fi
14280
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014281fi
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14284$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014285if test "$ac_cv_tanh_preserves_zero_sign" = yes
14286then
14287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014289
14290fi
14291
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014292if test "$ac_cv_func_log1p" = yes
14293then
14294 # On some versions of AIX, log1p(-0.) returns 0. instead of
14295 # -0. See issue #9920.
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14297$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014298 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014299 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014300else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014301
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014302 if test "$cross_compiling" = yes; then :
14303 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014304else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14306/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014307
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014308 #include <math.h>
14309 #include <stdlib.h>
14310 int main() {
14311 /* Fail if the signs of log1p(-0.) and -0. can be
14312 distinguished. */
14313 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14314 return 0;
14315 else
14316 return 1;
14317 }
14318
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014319_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014320if ac_fn_c_try_run "$LINENO"; then :
14321 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014322else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014323 ac_cv_log1p_drops_zero_sign=yes
14324fi
14325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014327fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014328
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014329fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014330
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14332$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14333fi
14334if test "$ac_cv_log1p_drops_zero_sign" = yes
14335then
14336
14337$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14338
14339fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014340
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014341LIBS=$LIBS_SAVE
14342
Mark Dickinsona614f042009-11-28 12:48:43 +000014343# For multiprocessing module, check that sem_open
14344# actually works. For FreeBSD versions <= 7.2,
14345# the kernel module that provides POSIX semaphores
14346# isn't loaded by default, so an attempt to call
14347# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14349$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014350if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014352else
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014354 ac_cv_posix_semaphores_enabled=yes
14355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014357/* end confdefs.h. */
14358
14359#include <unistd.h>
14360#include <fcntl.h>
14361#include <stdio.h>
14362#include <semaphore.h>
14363#include <sys/stat.h>
14364
14365int main(void) {
14366 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14367 if (a == SEM_FAILED) {
14368 perror("sem_open");
14369 return 1;
14370 }
14371 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014372 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014373 return 0;
14374}
14375
14376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014377if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014378 ac_cv_posix_semaphores_enabled=yes
14379else
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14383 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014384fi
14385
14386
Mark Dickinsona614f042009-11-28 12:48:43 +000014387fi
14388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14390$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014391if test $ac_cv_posix_semaphores_enabled = no
14392then
14393
Matthias Kloseb9621712010-04-24 17:59:49 +000014394$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014395
14396fi
14397
Mark Dickinson10683072009-04-18 21:18:19 +000014398# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14400$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014401if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014403else
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014405 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014406else
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014408/* end confdefs.h. */
14409
14410#include <unistd.h>
14411#include <fcntl.h>
14412#include <stdio.h>
14413#include <semaphore.h>
14414#include <sys/stat.h>
14415
14416int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014417 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014418 int count;
14419 int res;
14420 if(a==SEM_FAILED){
14421 perror("sem_open");
14422 return 1;
14423
14424 }
14425 res = sem_getvalue(a, &count);
14426 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014427 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014428 return res==-1 ? 1 : 0;
14429}
14430
Mark Dickinson10683072009-04-18 21:18:19 +000014431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014432if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014433 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014434else
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14438 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014439fi
14440
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014441
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014442fi
14443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14445$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014446if test $ac_cv_broken_sem_getvalue = yes
14447then
14448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014450
14451fi
14452
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014453ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14454"
14455if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14456 ac_have_decl=1
14457else
14458 ac_have_decl=0
14459fi
14460
14461cat >>confdefs.h <<_ACEOF
14462#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14463_ACEOF
14464ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14465"
14466if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14467 ac_have_decl=1
14468else
14469 ac_have_decl=0
14470fi
14471
14472cat >>confdefs.h <<_ACEOF
14473#define HAVE_DECL_RTLD_NOW $ac_have_decl
14474_ACEOF
14475ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14476"
14477if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14478 ac_have_decl=1
14479else
14480 ac_have_decl=0
14481fi
14482
14483cat >>confdefs.h <<_ACEOF
14484#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14485_ACEOF
14486ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14487"
14488if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14489 ac_have_decl=1
14490else
14491 ac_have_decl=0
14492fi
14493
14494cat >>confdefs.h <<_ACEOF
14495#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14496_ACEOF
14497ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14498"
14499if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14500 ac_have_decl=1
14501else
14502 ac_have_decl=0
14503fi
14504
14505cat >>confdefs.h <<_ACEOF
14506#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14507_ACEOF
14508ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14509"
14510if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14511 ac_have_decl=1
14512else
14513 ac_have_decl=0
14514fi
14515
14516cat >>confdefs.h <<_ACEOF
14517#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14518_ACEOF
14519ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14520"
14521if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14522 ac_have_decl=1
14523else
14524 ac_have_decl=0
14525fi
14526
14527cat >>confdefs.h <<_ACEOF
14528#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14529_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014530ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14531"
14532if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14533 ac_have_decl=1
14534else
14535 ac_have_decl=0
14536fi
14537
14538cat >>confdefs.h <<_ACEOF
14539#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14540_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014541
14542
Mark Dickinsonbd792642009-03-18 20:06:12 +000014543# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14545$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014546# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014547if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014548 enableval=$enable_big_digits; case $enable_big_digits in
14549yes)
14550 enable_big_digits=30 ;;
14551no)
14552 enable_big_digits=15 ;;
1455315|30)
14554 ;;
14555*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014556 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 +000014557esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14559$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014560
14561cat >>confdefs.h <<_ACEOF
14562#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14563_ACEOF
14564
14565
14566else
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14568$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014569fi
14570
14571
Guido van Rossumef2255b2000-03-10 22:30:29 +000014572# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014573ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014574if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
14576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014579 wchar_h="yes"
14580
Guido van Rossumef2255b2000-03-10 22:30:29 +000014581else
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014583
14584fi
14585
Michael W. Hudson54241132001-12-07 15:38:26 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014588# determine wchar_t size
14589if test "$wchar_h" = yes
14590then
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14594# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14596$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014597if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014598 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14601"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 if test "$ac_cv_type_wchar_t" = yes; then
14605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014607as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014608See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609 else
14610 ac_cv_sizeof_wchar_t=0
14611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14616$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617
14618
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014621#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014622_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014623
Michael W. Hudson54241132001-12-07 15:38:26 +000014624
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014625fi
14626
Matthias Kloseb9621712010-04-24 17:59:49 +000014627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14628$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014629have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014631/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014632
14633#include <tcl.h>
14634#if TCL_UTF_MAX != 6
14635# error "NOT UCS4_TCL"
14636#endif
14637int
14638main ()
14639{
14640
14641 ;
14642 return 0;
14643}
14644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014646
14647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014649
14650 have_ucs4_tcl=yes
14651
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14655$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014656
Skip Montanaro6dead952003-09-25 14:50:04 +000014657# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014658if test "$wchar_h" = yes
14659then
14660 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14662$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014663 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014664 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014665else
14666
Matthias Kloseb9621712010-04-24 17:59:49 +000014667 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014668 ac_cv_wchar_t_signed=yes
14669else
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014671/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014672
14673 #include <wchar.h>
14674 int main()
14675 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014676 /* Success: exit code 0 */
14677 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014678 }
14679
14680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014681if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014682 ac_cv_wchar_t_signed=yes
14683else
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014688fi
14689
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014690fi
14691
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14693$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694fi
14695
Miss Islington (bot)4973f762018-08-24 12:36:30 -040014696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14697$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014698# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014699if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014700 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014701then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014704
Miss Islington (bot)4973f762018-08-24 12:36:30 -040014705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14706$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014707else
Miss Islington (bot)4973f762018-08-24 12:36:30 -040014708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14709$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014710fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711
14712# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14714$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014715if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_cv_c_bigendian=unknown
14719 # See if we're dealing with a universal compiler.
14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721/* end confdefs.h. */
14722#ifndef __APPLE_CC__
14723 not a universal capable compiler
14724 #endif
14725 typedef int dummy;
14726
Skip Montanaro6dead952003-09-25 14:50:04 +000014727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728if ac_fn_c_try_compile "$LINENO"; then :
14729
14730 # Check for potential -arch flags. It is not universal unless
14731 # there are at least two -arch flags with different values.
14732 ac_arch=
14733 ac_prev=
14734 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14735 if test -n "$ac_prev"; then
14736 case $ac_word in
14737 i?86 | x86_64 | ppc | ppc64)
14738 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14739 ac_arch=$ac_word
14740 else
14741 ac_cv_c_bigendian=universal
14742 break
14743 fi
14744 ;;
14745 esac
14746 ac_prev=
14747 elif test "x$ac_word" = "x-arch"; then
14748 ac_prev=arch
14749 fi
14750 done
14751fi
14752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14753 if test $ac_cv_c_bigendian = unknown; then
14754 # See if sys/param.h defines the BYTE_ORDER macro.
14755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014756/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014757#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760int
14761main ()
14762{
Matthias Kloseb9621712010-04-24 17:59:49 +000014763#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14764 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14765 && LITTLE_ENDIAN)
14766 bogus endian macros
14767 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014768
14769 ;
14770 return 0;
14771}
14772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014774 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014776/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014777#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014779
Martin v. Löwis11437992002-04-12 09:54:03 +000014780int
14781main ()
14782{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014783#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 not big endian
14785 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
14787 ;
14788 return 0;
14789}
14790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014791if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014792 ac_cv_c_bigendian=yes
14793else
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014797fi
14798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14799 fi
14800 if test $ac_cv_c_bigendian = unknown; then
14801 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014803/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014804#include <limits.h>
14805
Martin v. Löwis11437992002-04-12 09:54:03 +000014806int
14807main ()
14808{
Matthias Kloseb9621712010-04-24 17:59:49 +000014809#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14810 bogus endian macros
14811 #endif
14812
Martin v. Löwis11437992002-04-12 09:54:03 +000014813 ;
14814 return 0;
14815}
14816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if ac_fn_c_try_compile "$LINENO"; then :
14818 # It does; now see whether it defined to _BIG_ENDIAN or not.
14819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14820/* end confdefs.h. */
14821#include <limits.h>
14822
14823int
14824main ()
14825{
14826#ifndef _BIG_ENDIAN
14827 not big endian
14828 #endif
14829
14830 ;
14831 return 0;
14832}
14833_ACEOF
14834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014836else
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14840fi
14841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14842 fi
14843 if test $ac_cv_c_bigendian = unknown; then
14844 # Compile a test program.
14845 if test "$cross_compiling" = yes; then :
14846 # Try to guess by grepping values from an object file.
14847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14848/* end confdefs.h. */
14849short int ascii_mm[] =
14850 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14851 short int ascii_ii[] =
14852 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14853 int use_ascii (int i) {
14854 return ascii_mm[i] + ascii_ii[i];
14855 }
14856 short int ebcdic_ii[] =
14857 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14858 short int ebcdic_mm[] =
14859 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14860 int use_ebcdic (int i) {
14861 return ebcdic_mm[i] + ebcdic_ii[i];
14862 }
14863 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865int
14866main ()
14867{
14868return use_ascii (foo) == use_ebcdic (foo);
14869 ;
14870 return 0;
14871}
14872_ACEOF
14873if ac_fn_c_try_compile "$LINENO"; then :
14874 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14875 ac_cv_c_bigendian=yes
14876 fi
14877 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14878 if test "$ac_cv_c_bigendian" = unknown; then
14879 ac_cv_c_bigendian=no
14880 else
14881 # finding both strings is unlikely to happen, but who knows?
14882 ac_cv_c_bigendian=unknown
14883 fi
14884 fi
14885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014887else
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014889/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014891int
14892main ()
14893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 /* Are we little or big endian? From Harbison&Steele. */
14896 union
14897 {
14898 long int l;
14899 char c[sizeof (long int)];
14900 } u;
14901 u.l = 1;
14902 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903
14904 ;
14905 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014906}
Martin v. Löwis11437992002-04-12 09:54:03 +000014907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014908if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014909 ac_cv_c_bigendian=no
14910else
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14920$as_echo "$ac_cv_c_bigendian" >&6; }
14921 case $ac_cv_c_bigendian in #(
14922 yes)
14923 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14924;; #(
14925 no)
14926 ;; #(
14927 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 ;; #(
14932 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014933 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014934 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014936
Michael W. Hudson54241132001-12-07 15:38:26 +000014937
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014938# ABI version string for Python extension modules. This appears between the
14939# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14940# from the following attributes which affect the ABI of this Python build (in
14941# this order):
14942#
14943# * The Python implementation (always 'cpython-' for us)
14944# * The major and minor version numbers
14945# * --with-pydebug (adds a 'd')
14946# * --with-pymalloc (adds a 'm')
14947# * --with-wide-unicode (adds a 'u')
14948#
14949# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014950# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14951# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014952
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14954$as_echo_n "checking ABIFLAGS... " >&6; }
14955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14956$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14958$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014959SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14961$as_echo "$SOABI" >&6; }
14962
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014963
14964case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014965 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014966 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14967 *)
14968 EXT_SUFFIX=${SHLIB_SUFFIX};;
14969esac
14970
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14972$as_echo_n "checking LDVERSION... " >&6; }
14973LDVERSION='$(VERSION)$(ABIFLAGS)'
14974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14975$as_echo "$LDVERSION" >&6; }
14976
doko@python.org87421192013-01-26 11:39:31 +010014977
doko@ubuntu.com55532312016-06-14 08:55:19 +020014978if test x$PLATFORM_TRIPLET = x; then
14979 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14980else
14981 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14982fi
doko@python.org87421192013-01-26 11:39:31 +010014983
14984
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014985# Check whether right shifting a negative integer extends the sign bit
14986# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14988$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014989if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014991else
Martin v. Löwis11437992002-04-12 09:54:03 +000014992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014994 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014995else
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014998
14999int main()
15000{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015001 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015002}
15003
Martin v. Löwis11437992002-04-12 09:54:03 +000015004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015005if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015006 ac_cv_rshift_extends_sign=yes
15007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015012fi
15013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014fi
15015
Matthias Kloseb9621712010-04-24 17:59:49 +000015016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15017$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015018if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015019then
Martin v. Löwis11437992002-04-12 09:54:03 +000015020
Matthias Kloseb9621712010-04-24 17:59:49 +000015021$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015022
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015023fi
15024
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015025# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15027$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015028if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015030else
Martin v. Löwis11437992002-04-12 09:54:03 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015034#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015035int
15036main ()
15037{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015038
15039 FILE *f = fopen("/dev/null", "r");
15040 flockfile(f);
15041 getc_unlocked(f);
15042 funlockfile(f);
15043
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 ;
15045 return 0;
15046}
15047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015048if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015049 ac_cv_have_getc_unlocked=yes
15050else
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 ac_cv_have_getc_unlocked=no
15052fi
15053rm -f core conftest.err conftest.$ac_objext \
15054 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15058$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015059if test "$ac_cv_have_getc_unlocked" = yes
15060then
Martin v. Löwis11437992002-04-12 09:54:03 +000015061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015063
15064fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015065
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015066# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015067# save the value of LIBS so we don't actually link Python with readline
15068LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015069
Gregory P. Smith18820942008-09-07 06:24:49 +000015070# On some systems we need to link readline to a termcap compatible
15071# library. NOTE: Keep the precedence of listed libraries synchronised
15072# with setup.py.
15073py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15075$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015076for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015077 if test -z "$py_libtermcap"; then
15078 READLINE_LIBS="-lreadline"
15079 else
15080 READLINE_LIBS="-lreadline -l$py_libtermcap"
15081 fi
15082 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015084/* end confdefs.h. */
15085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086/* Override any GCC internal prototype to avoid an error.
15087 Use char because int might match the return type of a GCC
15088 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015089#ifdef __cplusplus
15090extern "C"
15091#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015092char readline ();
15093int
15094main ()
15095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015097 ;
15098 return 0;
15099}
15100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015101if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015102 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015104rm -f core conftest.err conftest.$ac_objext \
15105 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015106 if test $py_cv_lib_readline = yes; then
15107 break
15108 fi
15109done
15110# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15111#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015112if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15114$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015115else
Matthias Kloseb9621712010-04-24 17:59:49 +000015116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15117$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015118
Matthias Kloseb9621712010-04-24 17:59:49 +000015119$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015120
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015121fi
15122
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015123# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015125/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015126#include <readline/readline.h>
15127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015128if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015129 have_readline=yes
15130else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015131 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015132
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015133fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015134rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015135if test $have_readline = yes
15136then
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015139#include <readline/readline.h>
15140
15141_ACEOF
15142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015146
15147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015148rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015151/* end confdefs.h. */
15152#include <readline/readline.h>
15153
15154_ACEOF
15155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015156 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015157
Matthias Kloseb9621712010-04-24 17:59:49 +000015158$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015159
15160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015161rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015162
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015163fi
15164
Martin v. Löwis0daad592001-09-30 21:09:59 +000015165# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15167$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015168if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015170else
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015172LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176/* Override any GCC internal prototype to avoid an error.
15177 Use char because int might match the return type of a GCC
15178 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015179#ifdef __cplusplus
15180extern "C"
15181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015182char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015183int
15184main ()
15185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 ;
15188 return 0;
15189}
15190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015193else
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015196rm -f core conftest.err conftest.$ac_objext \
15197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015198LIBS=$ac_check_lib_save_LIBS
15199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15201$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015202if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015205
Martin v. Löwis0daad592001-09-30 21:09:59 +000015206fi
15207
Michael W. Hudson54241132001-12-07 15:38:26 +000015208
Thomas Wouters89d996e2007-09-08 17:39:28 +000015209# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15211$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015212if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015214else
15215 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015216LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015218/* end confdefs.h. */
15219
15220/* Override any GCC internal prototype to avoid an error.
15221 Use char because int might match the return type of a GCC
15222 builtin and then its argument prototype would still apply. */
15223#ifdef __cplusplus
15224extern "C"
15225#endif
15226char rl_completion_display_matches_hook ();
15227int
15228main ()
15229{
15230return rl_completion_display_matches_hook ();
15231 ;
15232 return 0;
15233}
15234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015235if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015236 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15237else
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015240rm -f core conftest.err conftest.$ac_objext \
15241 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015242LIBS=$ac_check_lib_save_LIBS
15243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15245$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015246if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015247
Matthias Kloseb9621712010-04-24 17:59:49 +000015248$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015249
15250fi
15251
15252
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015253# also in 4.0, but not in editline
15254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15255$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15256if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15257 $as_echo_n "(cached) " >&6
15258else
15259 ac_check_lib_save_LIBS=$LIBS
15260LIBS="-lreadline $READLINE_LIBS $LIBS"
15261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15262/* end confdefs.h. */
15263
15264/* Override any GCC internal prototype to avoid an error.
15265 Use char because int might match the return type of a GCC
15266 builtin and then its argument prototype would still apply. */
15267#ifdef __cplusplus
15268extern "C"
15269#endif
15270char rl_resize_terminal ();
15271int
15272main ()
15273{
15274return rl_resize_terminal ();
15275 ;
15276 return 0;
15277}
15278_ACEOF
15279if ac_fn_c_try_link "$LINENO"; then :
15280 ac_cv_lib_readline_rl_resize_terminal=yes
15281else
15282 ac_cv_lib_readline_rl_resize_terminal=no
15283fi
15284rm -f core conftest.err conftest.$ac_objext \
15285 conftest$ac_exeext conftest.$ac_ext
15286LIBS=$ac_check_lib_save_LIBS
15287fi
15288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15289$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15290if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15291
15292$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15293
15294fi
15295
15296
Martin v. Löwis0daad592001-09-30 21:09:59 +000015297# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15299$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015300if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015302else
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015304LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308/* Override any GCC internal prototype to avoid an error.
15309 Use char because int might match the return type of a GCC
15310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015311#ifdef __cplusplus
15312extern "C"
15313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015314char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015315int
15316main ()
15317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015318return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ;
15320 return 0;
15321}
15322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015325else
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015328rm -f core conftest.err conftest.$ac_objext \
15329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015330LIBS=$ac_check_lib_save_LIBS
15331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15333$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015334if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015337
Guido van Rossum353ae582001-07-10 16:45:32 +000015338fi
15339
Jack Jansendd19cf82001-12-06 22:36:17 +000015340
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015341# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015343/* end confdefs.h. */
15344#include <readline/readline.h>
15345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015346if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015347 have_readline=yes
15348else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015349 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015350
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015351fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015352rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015353if test $have_readline = yes
15354then
Matthias Kloseb9621712010-04-24 17:59:49 +000015355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015356/* end confdefs.h. */
15357#include <readline/readline.h>
15358
15359_ACEOF
15360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015362
Matthias Kloseb9621712010-04-24 17:59:49 +000015363$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015364
15365fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015366rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015367
15368fi
15369
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15371$as_echo_n "checking for append_history in -lreadline... " >&6; }
15372if ${ac_cv_lib_readline_append_history+:} false; then :
15373 $as_echo_n "(cached) " >&6
15374else
15375 ac_check_lib_save_LIBS=$LIBS
15376LIBS="-lreadline $READLINE_LIBS $LIBS"
15377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15378/* end confdefs.h. */
15379
15380/* Override any GCC internal prototype to avoid an error.
15381 Use char because int might match the return type of a GCC
15382 builtin and then its argument prototype would still apply. */
15383#ifdef __cplusplus
15384extern "C"
15385#endif
15386char append_history ();
15387int
15388main ()
15389{
15390return append_history ();
15391 ;
15392 return 0;
15393}
15394_ACEOF
15395if ac_fn_c_try_link "$LINENO"; then :
15396 ac_cv_lib_readline_append_history=yes
15397else
15398 ac_cv_lib_readline_append_history=no
15399fi
15400rm -f core conftest.err conftest.$ac_objext \
15401 conftest$ac_exeext conftest.$ac_ext
15402LIBS=$ac_check_lib_save_LIBS
15403fi
15404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15405$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15406if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15407
15408$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15409
15410fi
15411
15412
Martin v. Löwis82bca632006-02-10 20:49:30 +000015413# End of readline checks: restore LIBS
15414LIBS=$LIBS_no_readline
15415
Matthias Kloseb9621712010-04-24 17:59:49 +000015416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15417$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015418if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015420else
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
Matthias Kloseb9621712010-04-24 17:59:49 +000015422if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015423 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015424else
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015426/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015427
15428int main()
15429{
15430 int val1 = nice(1);
15431 if (val1 != -1 && val1 == nice(2))
15432 exit(0);
15433 exit(1);
15434}
15435
Martin v. Löwis11437992002-04-12 09:54:03 +000015436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015437if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015438 ac_cv_broken_nice=yes
15439else
Matthias Kloseb9621712010-04-24 17:59:49 +000015440 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015444fi
15445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446fi
15447
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15449$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015450if test "$ac_cv_broken_nice" = yes
15451then
Martin v. Löwis11437992002-04-12 09:54:03 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015454
15455fi
15456
Matthias Kloseb9621712010-04-24 17:59:49 +000015457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15458$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015459if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015461else
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015463 ac_cv_broken_poll=no
15464else
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015466/* end confdefs.h. */
15467
15468#include <poll.h>
15469
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015470int main()
15471{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015472 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015473 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015474
15475 close (42);
15476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015477 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015478 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015479 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015480 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015481 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015482 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015483 return 1;
15484}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015485
15486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015487if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015488 ac_cv_broken_poll=yes
15489else
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015496fi
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15499$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015500if test "$ac_cv_broken_poll" = yes
15501then
15502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015504
15505fi
15506
Brett Cannon43802422005-02-10 20:48:03 +000015507# 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 +000015508# (which is not required by ISO C or UNIX spec) and/or if we support
15509# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015510ac_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 +000015511#include <$ac_cv_struct_tm>
15512
Matthias Kloseb9621712010-04-24 17:59:49 +000015513"
Victor Stinnere0be4232011-10-25 13:06:09 +020015514if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015515
15516cat >>confdefs.h <<_ACEOF
15517#define HAVE_STRUCT_TM_TM_ZONE 1
15518_ACEOF
15519
15520
15521fi
15522
15523if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015526
15527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15529"
Victor Stinnere0be4232011-10-25 13:06:09 +020015530if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015532else
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015534fi
15535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015537#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538_ACEOF
15539
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15541$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015542if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015544else
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015546/* end confdefs.h. */
15547#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548#if !HAVE_DECL_TZNAME
15549extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015550#endif
15551
15552int
15553main ()
15554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015556 ;
15557 return 0;
15558}
15559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015560if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015561 ac_cv_var_tzname=yes
15562else
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015565rm -f core conftest.err conftest.$ac_objext \
15566 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15569$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015570 if test $ac_cv_var_tzname = yes; then
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015573
15574 fi
15575fi
15576
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015577
Martin v. Löwis1d459062005-03-14 21:23:33 +000015578# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15580$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015581if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015583else
15584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015586 ac_cv_working_tzset=no
15587else
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015590
15591#include <stdlib.h>
15592#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015593#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015594
15595#if HAVE_TZNAME
15596extern char *tzname[];
15597#endif
15598
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015599int main()
15600{
Brett Cannon18367812003-09-19 00:59:16 +000015601 /* Note that we need to ensure that not only does tzset(3)
15602 do 'something' with localtime, but it works as documented
15603 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015604 This includes making sure that tzname is set properly if
15605 tm->tm_zone does not exist since it is the alternative way
15606 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015607
15608 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015609 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015610 */
15611
Martin v. Löwis1d459062005-03-14 21:23:33 +000015612 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015613 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15614
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015615 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015616 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015617 if (localtime(&groundhogday)->tm_hour != 0)
15618 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015619#if HAVE_TZNAME
15620 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15621 if (strcmp(tzname[0], "UTC") ||
15622 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15623 exit(1);
15624#endif
Brett Cannon18367812003-09-19 00:59:16 +000015625
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015626 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015627 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015628 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015629 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015630#if HAVE_TZNAME
15631 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15632 exit(1);
15633#endif
Brett Cannon18367812003-09-19 00:59:16 +000015634
15635 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15636 tzset();
15637 if (localtime(&groundhogday)->tm_hour != 11)
15638 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015639#if HAVE_TZNAME
15640 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15641 exit(1);
15642#endif
15643
15644#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015645 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15646 exit(1);
15647 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15648 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015649#endif
Brett Cannon18367812003-09-19 00:59:16 +000015650
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015651 exit(0);
15652}
15653
15654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015655if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015656 ac_cv_working_tzset=yes
15657else
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015662fi
15663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664fi
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15667$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015668if test "$ac_cv_working_tzset" = yes
15669then
15670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015672
15673fi
15674
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015675# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15677$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015678if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015679 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015680else
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015682/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015683#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015684int
15685main ()
15686{
15687
15688struct stat st;
15689st.st_mtim.tv_nsec = 1;
15690
15691 ;
15692 return 0;
15693}
15694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015696 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015697else
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15701fi
15702
Matthias Kloseb9621712010-04-24 17:59:49 +000015703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15704$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015705if test "$ac_cv_stat_tv_nsec" = yes
15706then
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015709
15710fi
15711
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015712# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15714$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015715if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015717else
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015719/* end confdefs.h. */
15720#include <sys/stat.h>
15721int
15722main ()
15723{
15724
15725struct stat st;
15726st.st_mtimespec.tv_nsec = 1;
15727
15728 ;
15729 return 0;
15730}
15731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015733 ac_cv_stat_tv_nsec2=yes
15734else
Matthias Kloseb9621712010-04-24 17:59:49 +000015735 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15738fi
15739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15741$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015742if test "$ac_cv_stat_tv_nsec2" = yes
15743then
15744
Matthias Kloseb9621712010-04-24 17:59:49 +000015745$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015746
15747fi
15748
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015749# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015750ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015751if test "$cross_compiling" = no; then
15752 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15753fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015754
15755for ac_header in curses.h ncurses.h
15756do :
15757 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15758ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15759if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15760 cat >>confdefs.h <<_ACEOF
15761#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15762_ACEOF
15763
15764fi
15765
15766done
15767
15768
15769# On Solaris, term.h requires curses.h
15770for ac_header in term.h
15771do :
15772 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15773#ifdef HAVE_CURSES_H
15774#include <curses.h>
15775#endif
15776
15777"
15778if test "x$ac_cv_header_term_h" = xyes; then :
15779 cat >>confdefs.h <<_ACEOF
15780#define HAVE_TERM_H 1
15781_ACEOF
15782
15783fi
15784
15785done
15786
15787
Jack Jansen666b1e72001-10-31 12:11:48 +000015788# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15790$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015791if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015793else
Matthias Kloseb9621712010-04-24 17:59:49 +000015794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015795/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015796#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015797int
15798main ()
15799{
Jack Jansen666b1e72001-10-31 12:11:48 +000015800
15801 int rtn;
15802 rtn = mvwdelch(0,0,0);
15803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 ;
15805 return 0;
15806}
15807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015808if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015809 ac_cv_mvwdelch_is_expression=yes
15810else
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15814fi
15815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15817$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015818
15819if test "$ac_cv_mvwdelch_is_expression" = yes
15820then
Martin v. Löwis11437992002-04-12 09:54:03 +000015821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015823
15824fi
15825
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015826# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15827# structs since version 5.7. If the macro is defined as zero before including
15828# [n]curses.h, ncurses will expose fields of the structs regardless of the
15829# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15831$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015832if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015834else
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015836/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015837
15838 #define NCURSES_OPAQUE 0
15839 #include <curses.h>
15840
Martin v. Löwis11437992002-04-12 09:54:03 +000015841int
15842main ()
15843{
Jack Jansen666b1e72001-10-31 12:11:48 +000015844
15845 WINDOW *w;
15846 w->_flags = 0;
15847
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 ;
15849 return 0;
15850}
15851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015852if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015853 ac_cv_window_has_flags=yes
15854else
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15858fi
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15861$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015862
Jack Jansen666b1e72001-10-31 12:11:48 +000015863
15864if test "$ac_cv_window_has_flags" = yes
15865then
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
Matthias Kloseb9621712010-04-24 17:59:49 +000015867$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015868
15869fi
15870
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15872$as_echo_n "checking for is_pad... " >&6; }
15873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15874/* end confdefs.h. */
15875#include <curses.h>
15876int
15877main ()
15878{
15879
15880#ifndef is_pad
15881void *x=is_pad
15882#endif
15883
15884 ;
15885 return 0;
15886}
15887_ACEOF
15888if ac_fn_c_try_compile "$LINENO"; then :
15889
15890$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15891
15892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15893$as_echo "yes" >&6; }
15894else
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15896$as_echo "no" >&6; }
15897
15898fi
15899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15902$as_echo_n "checking for is_term_resized... " >&6; }
15903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015904/* end confdefs.h. */
15905#include <curses.h>
15906int
15907main ()
15908{
15909void *x=is_term_resized
15910 ;
15911 return 0;
15912}
15913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015914if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015917
Matthias Kloseb159a552010-04-25 21:00:44 +000015918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015919$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015920else
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15922$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015923
15924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15926
Matthias Kloseb9621712010-04-24 17:59:49 +000015927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15928$as_echo_n "checking for resize_term... " >&6; }
15929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015930/* end confdefs.h. */
15931#include <curses.h>
15932int
15933main ()
15934{
15935void *x=resize_term
15936 ;
15937 return 0;
15938}
15939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015940if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015943
Matthias Kloseb159a552010-04-25 21:00:44 +000015944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015945$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015946else
Matthias Kloseb9621712010-04-24 17:59:49 +000015947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15948$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015949
15950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15952
Matthias Kloseb9621712010-04-24 17:59:49 +000015953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15954$as_echo_n "checking for resizeterm... " >&6; }
15955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015956/* end confdefs.h. */
15957#include <curses.h>
15958int
15959main ()
15960{
15961void *x=resizeterm
15962 ;
15963 return 0;
15964}
15965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015966if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015967
Matthias Kloseb9621712010-04-24 17:59:49 +000015968$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015969
Matthias Kloseb159a552010-04-25 21:00:44 +000015970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015971$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015972else
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15974$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015975
15976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015978
15979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15980$as_echo_n "checking for immedok... " >&6; }
15981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983#include <curses.h>
15984int
15985main ()
15986{
15987
15988#ifndef immedok
15989void *x=immedok
15990#endif
15991
15992 ;
15993 return 0;
15994}
15995_ACEOF
15996if ac_fn_c_try_compile "$LINENO"; then :
15997
15998$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15999
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16001$as_echo "yes" >&6; }
16002else
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16004$as_echo "no" >&6; }
16005
16006fi
16007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16008
16009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16010$as_echo_n "checking for syncok... " >&6; }
16011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16012/* end confdefs.h. */
16013#include <curses.h>
16014int
16015main ()
16016{
16017
16018#ifndef syncok
16019void *x=syncok
16020#endif
16021
16022 ;
16023 return 0;
16024}
16025_ACEOF
16026if ac_fn_c_try_compile "$LINENO"; then :
16027
16028$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16029
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16031$as_echo "yes" >&6; }
16032else
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16034$as_echo "no" >&6; }
16035
16036fi
16037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16038
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16040$as_echo_n "checking for wchgat... " >&6; }
16041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042/* end confdefs.h. */
16043#include <curses.h>
16044int
16045main ()
16046{
16047
16048#ifndef wchgat
16049void *x=wchgat
16050#endif
16051
16052 ;
16053 return 0;
16054}
16055_ACEOF
16056if ac_fn_c_try_compile "$LINENO"; then :
16057
16058$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16059
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16061$as_echo "yes" >&6; }
16062else
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16064$as_echo "no" >&6; }
16065
16066fi
16067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16068
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16070$as_echo_n "checking for filter... " >&6; }
16071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16072/* end confdefs.h. */
16073#include <curses.h>
16074int
16075main ()
16076{
16077
16078#ifndef filter
16079void *x=filter
16080#endif
16081
16082 ;
16083 return 0;
16084}
16085_ACEOF
16086if ac_fn_c_try_compile "$LINENO"; then :
16087
16088$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16089
16090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16091$as_echo "yes" >&6; }
16092else
16093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16094$as_echo "no" >&6; }
16095
16096fi
16097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16098
16099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16100$as_echo_n "checking for has_key... " >&6; }
16101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102/* end confdefs.h. */
16103#include <curses.h>
16104int
16105main ()
16106{
16107
16108#ifndef has_key
16109void *x=has_key
16110#endif
16111
16112 ;
16113 return 0;
16114}
16115_ACEOF
16116if ac_fn_c_try_compile "$LINENO"; then :
16117
16118$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16119
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16121$as_echo "yes" >&6; }
16122else
16123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16124$as_echo "no" >&6; }
16125
16126fi
16127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16128
16129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16130$as_echo_n "checking for typeahead... " >&6; }
16131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16132/* end confdefs.h. */
16133#include <curses.h>
16134int
16135main ()
16136{
16137
16138#ifndef typeahead
16139void *x=typeahead
16140#endif
16141
16142 ;
16143 return 0;
16144}
16145_ACEOF
16146if ac_fn_c_try_compile "$LINENO"; then :
16147
16148$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16149
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16151$as_echo "yes" >&6; }
16152else
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16154$as_echo "no" >&6; }
16155
16156fi
16157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16158
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16160$as_echo_n "checking for use_env... " >&6; }
16161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162/* end confdefs.h. */
16163#include <curses.h>
16164int
16165main ()
16166{
16167
16168#ifndef use_env
16169void *x=use_env
16170#endif
16171
16172 ;
16173 return 0;
16174}
16175_ACEOF
16176if ac_fn_c_try_compile "$LINENO"; then :
16177
16178$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16179
16180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16181$as_echo "yes" >&6; }
16182else
16183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16184$as_echo "no" >&6; }
16185
16186fi
16187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016188# last curses configure check
16189CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16192$as_echo "$as_me: checking for device files" >&6;}
16193
16194if test "x$cross_compiling" = xyes; then
16195 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16197$as_echo_n "checking for /dev/ptmx... " >&6; }
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16199$as_echo "not set" >&6; }
16200 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16201 fi
16202 if test "${ac_cv_file__dev_ptc+set}" != set; then
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16204$as_echo_n "checking for /dev/ptc... " >&6; }
16205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16206$as_echo "not set" >&6; }
16207 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16208 fi
16209fi
16210
Matthias Kloseb9621712010-04-24 17:59:49 +000016211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16212$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016213if ${ac_cv_file__dev_ptmx+:} false; then :
16214 $as_echo_n "(cached) " >&6
16215else
16216 test "$cross_compiling" = yes &&
16217 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16218if test -r "/dev/ptmx"; then
16219 ac_cv_file__dev_ptmx=yes
16220else
16221 ac_cv_file__dev_ptmx=no
16222fi
16223fi
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16225$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16226if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016227
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016228fi
16229
16230if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016231
Matthias Kloseb9621712010-04-24 17:59:49 +000016232$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016233
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16236$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016237if ${ac_cv_file__dev_ptc+:} false; then :
16238 $as_echo_n "(cached) " >&6
16239else
16240 test "$cross_compiling" = yes &&
16241 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16242if test -r "/dev/ptc"; then
16243 ac_cv_file__dev_ptc=yes
16244else
16245 ac_cv_file__dev_ptc=no
16246fi
16247fi
16248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16249$as_echo "$ac_cv_file__dev_ptc" >&6; }
16250if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016251
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016252fi
16253
16254if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016257
Neal Norwitz865400f2003-03-21 01:42:58 +000016258fi
16259
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016260if test $ac_sys_system = Darwin
16261then
16262 LIBS="$LIBS -framework CoreFoundation"
16263fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016264
Matthias Kloseb9621712010-04-24 17:59:49 +000016265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16266$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016267if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016269else
Matthias Kloseb9621712010-04-24 17:59:49 +000016270 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016271 ac_cv_have_size_t_format="cross -- assuming yes"
16272
Thomas Wouters477c8d52006-05-27 19:21:47 +000016273else
Matthias Kloseb9621712010-04-24 17:59:49 +000016274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016275/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016276
Thomas Wouters477c8d52006-05-27 19:21:47 +000016277#include <stdio.h>
16278#include <stddef.h>
16279#include <string.h>
16280
Christian Heimes2c181612007-12-17 20:04:13 +000016281#ifdef HAVE_SYS_TYPES_H
16282#include <sys/types.h>
16283#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016284
16285#ifdef HAVE_SSIZE_T
16286typedef ssize_t Py_ssize_t;
16287#elif SIZEOF_VOID_P == SIZEOF_LONG
16288typedef long Py_ssize_t;
16289#else
16290typedef int Py_ssize_t;
16291#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016292
Christian Heimes2c181612007-12-17 20:04:13 +000016293int main()
16294{
16295 char buffer[256];
16296
Thomas Wouters477c8d52006-05-27 19:21:47 +000016297 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16298 return 1;
16299
Thomas Wouters89f507f2006-12-13 04:49:30 +000016300 if (strcmp(buffer, "123"))
16301 return 1;
16302
16303 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16304 return 1;
16305
16306 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016307 return 1;
16308
16309 return 0;
16310}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016311
Thomas Wouters477c8d52006-05-27 19:21:47 +000016312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016313if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016314 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016315else
Matthias Kloseb9621712010-04-24 17:59:49 +000016316 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16319 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016320fi
16321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16324$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016325if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016326
Matthias Kloseb9621712010-04-24 17:59:49 +000016327$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016328
16329fi
16330
Matthias Kloseb9621712010-04-24 17:59:49 +000016331ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016332#ifdef HAVE_SYS_TYPES_H
16333#include <sys/types.h>
16334#endif
16335#ifdef HAVE_SYS_SOCKET_H
16336#include <sys/socket.h>
16337#endif
16338
Matthias Kloseb9621712010-04-24 17:59:49 +000016339"
Victor Stinnere0be4232011-10-25 13:06:09 +020016340if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016341
Martin v. Löwis11437992002-04-12 09:54:03 +000016342else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016343
Matthias Kloseb9621712010-04-24 17:59:49 +000016344$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016345
16346fi
16347
Michael W. Hudson54241132001-12-07 15:38:26 +000016348
Matthias Kloseb9621712010-04-24 17:59:49 +000016349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16350$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016351if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016352 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016353else
Matthias Kloseb9621712010-04-24 17:59:49 +000016354 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016355 ac_cv_broken_mbstowcs=no
16356else
Matthias Kloseb9621712010-04-24 17:59:49 +000016357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016358/* end confdefs.h. */
16359
Stefan Krah19c21392012-11-22 23:47:32 +010016360#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016361#include<stdlib.h>
16362int main() {
16363 size_t len = -1;
16364 const char *str = "text";
16365 len = mbstowcs(NULL, str, 0);
16366 return (len != 4);
16367}
16368
16369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016370if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016371 ac_cv_broken_mbstowcs=no
16372else
Matthias Kloseb9621712010-04-24 17:59:49 +000016373 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16376 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016377fi
16378
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016379fi
16380
Matthias Kloseb9621712010-04-24 17:59:49 +000016381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16382$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016383if test "$ac_cv_broken_mbstowcs" = yes
16384then
16385
Matthias Kloseb9621712010-04-24 17:59:49 +000016386$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016387
16388fi
16389
Antoine Pitroub52ec782009-01-25 16:34:23 +000016390# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16392$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016393
16394# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016395if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016396 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016397if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016398then
16399
Matthias Kloseb9621712010-04-24 17:59:49 +000016400$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16403$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016404fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016405if test "$withval" = no
16406then
16407
16408$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16411$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016412fi
16413
Antoine Pitrou042b1282010-08-13 21:15:58 +000016414else
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16416$as_echo "no value specified" >&6; }
16417fi
16418
Antoine Pitroub52ec782009-01-25 16:34:23 +000016419
Matthias Kloseb17289e2012-03-15 19:51:34 +010016420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16421$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16422if ${ac_cv_computed_gotos+:} false; then :
16423 $as_echo_n "(cached) " >&6
16424else
16425 if test "$cross_compiling" = yes; then :
16426 if test "${with_computed_gotos+set}" = set; then
16427 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16428 else
16429 ac_cv_computed_gotos=no
16430 fi
16431else
16432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16433/* end confdefs.h. */
16434
16435int main(int argc, char **argv)
16436{
16437 static void *targets[1] = { &&LABEL1 };
16438 goto LABEL2;
16439LABEL1:
16440 return 0;
16441LABEL2:
16442 goto *targets[0];
16443 return 1;
16444}
16445
16446_ACEOF
16447if ac_fn_c_try_run "$LINENO"; then :
16448 ac_cv_computed_gotos=yes
16449else
16450 ac_cv_computed_gotos=no
16451fi
16452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16453 conftest.$ac_objext conftest.beam conftest.$ac_ext
16454fi
16455
16456fi
16457
16458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16459$as_echo "$ac_cv_computed_gotos" >&6; }
16460case "$ac_cv_computed_gotos" in yes*)
16461
16462$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16463
16464esac
16465
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016466case $ac_sys_system in
16467AIX*)
16468
16469$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16470 ;;
16471esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016472
Michael W. Hudson54241132001-12-07 15:38:26 +000016473
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016474
16475
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016476for h in `(cd $srcdir;echo Python/thread_*.h)`
16477do
16478 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16479done
16480
Michael W. Hudson54241132001-12-07 15:38:26 +000016481
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016482SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16484$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016485for dir in $SRCDIRS; do
16486 if test ! -d $dir; then
16487 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016488 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016489done
Matthias Kloseb9621712010-04-24 17:59:49 +000016490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16491$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016492
Stefan Krah1919b7e2012-03-21 18:25:23 +010016493# Availability of -O2:
16494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16495$as_echo_n "checking for -O2... " >&6; }
16496saved_cflags="$CFLAGS"
16497CFLAGS="-O2"
16498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499/* end confdefs.h. */
16500
16501int
16502main ()
16503{
16504
16505
16506 ;
16507 return 0;
16508}
16509_ACEOF
16510if ac_fn_c_try_compile "$LINENO"; then :
16511 have_O2=yes
16512else
16513 have_O2=no
16514fi
16515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16517$as_echo "$have_O2" >&6; }
16518CFLAGS="$saved_cflags"
16519
16520# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16521# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16523$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16524saved_cflags="$CFLAGS"
16525CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16526if test "$have_O2" = no; then
16527 CFLAGS=""
16528fi
16529if test "$cross_compiling" = yes; then :
16530 have_glibc_memmove_bug=undefined
16531else
16532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16533/* end confdefs.h. */
16534
16535#include <stdio.h>
16536#include <stdlib.h>
16537#include <string.h>
16538void foo(void *p, void *q) { memmove(p, q, 19); }
16539int main() {
16540 char a[32] = "123456789000000000";
16541 foo(&a[9], a);
16542 if (strcmp(a, "123456789123456789000000000") != 0)
16543 return 1;
16544 foo(a, &a[9]);
16545 if (strcmp(a, "123456789000000000") != 0)
16546 return 1;
16547 return 0;
16548}
16549
16550_ACEOF
16551if ac_fn_c_try_run "$LINENO"; then :
16552 have_glibc_memmove_bug=no
16553else
16554 have_glibc_memmove_bug=yes
16555fi
16556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16557 conftest.$ac_objext conftest.beam conftest.$ac_ext
16558fi
16559
16560CFLAGS="$saved_cflags"
16561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16562$as_echo "$have_glibc_memmove_bug" >&6; }
16563if test "$have_glibc_memmove_bug" = yes; then
16564
16565$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16566
16567fi
16568
16569if test "$have_gcc_asm_for_x87" = yes; then
16570 # Some versions of gcc miscompile inline asm:
16571 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16572 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16573 case $CC in
16574 *gcc*)
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16576$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16577 saved_cflags="$CFLAGS"
16578 CFLAGS="-O2"
16579 if test "$cross_compiling" = yes; then :
16580 have_ipa_pure_const_bug=undefined
16581else
16582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h. */
16584
16585 __attribute__((noinline)) int
16586 foo(int *p) {
16587 int r;
16588 asm ( "movl \$6, (%1)\n\t"
16589 "xorl %0, %0\n\t"
16590 : "=r" (r) : "r" (p) : "memory"
16591 );
16592 return r;
16593 }
16594 int main() {
16595 int p = 8;
16596 if ((foo(&p) ? : p) != 6)
16597 return 1;
16598 return 0;
16599 }
16600
16601_ACEOF
16602if ac_fn_c_try_run "$LINENO"; then :
16603 have_ipa_pure_const_bug=no
16604else
16605 have_ipa_pure_const_bug=yes
16606fi
16607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16608 conftest.$ac_objext conftest.beam conftest.$ac_ext
16609fi
16610
16611 CFLAGS="$saved_cflags"
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16613$as_echo "$have_ipa_pure_const_bug" >&6; }
16614 if test "$have_ipa_pure_const_bug" = yes; then
16615
16616$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16617
16618 fi
16619 ;;
16620 esac
16621fi
16622
Victor Stinner4f5366e2015-01-09 02:13:19 +010016623# Check for stdatomic.h
16624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16625$as_echo_n "checking for stdatomic.h... " >&6; }
16626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h. */
16628
16629
16630 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016631 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016632 int main() {
16633 int loaded_value = atomic_load(&value);
16634 return 0;
16635 }
16636
16637
16638_ACEOF
16639if ac_fn_c_try_link "$LINENO"; then :
16640 have_stdatomic_h=yes
16641else
16642 have_stdatomic_h=no
16643fi
16644rm -f core conftest.err conftest.$ac_objext \
16645 conftest$ac_exeext conftest.$ac_ext
16646
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16648$as_echo "$have_stdatomic_h" >&6; }
16649
16650if test "$have_stdatomic_h" = yes; then
16651
16652$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16653
16654fi
16655
16656# Check for GCC >= 4.7 __atomic builtins
16657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16658$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16660/* end confdefs.h. */
16661
16662
16663 volatile int val = 1;
16664 int main() {
16665 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16666 return 0;
16667 }
16668
16669
16670_ACEOF
16671if ac_fn_c_try_link "$LINENO"; then :
16672 have_builtin_atomic=yes
16673else
16674 have_builtin_atomic=no
16675fi
16676rm -f core conftest.err conftest.$ac_objext \
16677 conftest$ac_exeext conftest.$ac_ext
16678
16679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16680$as_echo "$have_builtin_atomic" >&6; }
16681
16682if test "$have_builtin_atomic" = yes; then
16683
16684$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16685
16686fi
16687
Ned Deily322f5ba2013-11-21 23:01:59 -080016688# ensurepip option
16689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16690$as_echo_n "checking for ensurepip... " >&6; }
16691
16692# Check whether --with-ensurepip was given.
16693if test "${with_ensurepip+set}" = set; then :
16694 withval=$with_ensurepip;
16695else
16696 with_ensurepip=upgrade
16697fi
16698
16699case $with_ensurepip in #(
16700 yes|upgrade) :
16701 ENSUREPIP=upgrade ;; #(
16702 install) :
16703 ENSUREPIP=install ;; #(
16704 no) :
16705 ENSUREPIP=no ;; #(
16706 *) :
16707 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16708esac
16709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16710$as_echo "$ENSUREPIP" >&6; }
16711
16712
Victor Stinner35a97c02015-03-08 02:59:09 +010016713# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16715$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16717/* end confdefs.h. */
16718
16719
16720 #include <dirent.h>
16721
16722 int main() {
16723 struct dirent entry;
16724 return entry.d_type == DT_UNKNOWN;
16725 }
16726
16727
16728_ACEOF
16729if ac_fn_c_try_link "$LINENO"; then :
16730 have_dirent_d_type=yes
16731else
16732 have_dirent_d_type=no
16733fi
16734rm -f core conftest.err conftest.$ac_objext \
16735 conftest$ac_exeext conftest.$ac_ext
16736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16737$as_echo "$have_dirent_d_type" >&6; }
16738
16739if test "$have_dirent_d_type" = yes; then
16740
16741$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16742
16743fi
16744
Victor Stinner9eb57c52015-03-19 22:21:49 +010016745# check if the Linux getrandom() syscall is available
16746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16747$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16749/* end confdefs.h. */
16750
16751
Victor Stinner1b80b242016-04-12 22:34:58 +020016752 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016753 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016754 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016755
16756 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016757 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016758 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016759 const int flags = GRND_NONBLOCK;
16760 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016761 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016762 return 0;
16763 }
16764
16765
16766_ACEOF
16767if ac_fn_c_try_link "$LINENO"; then :
16768 have_getrandom_syscall=yes
16769else
16770 have_getrandom_syscall=no
16771fi
16772rm -f core conftest.err conftest.$ac_objext \
16773 conftest$ac_exeext conftest.$ac_ext
16774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16775$as_echo "$have_getrandom_syscall" >&6; }
16776
16777if test "$have_getrandom_syscall" = yes; then
16778
16779$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16780
16781fi
16782
Victor Stinner3abf44e2015-09-18 15:38:37 +020016783# check if the getrandom() function is available
16784# the test was written for the Solaris function of <sys/random.h>
16785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16786$as_echo_n "checking for the getrandom() function... " >&6; }
16787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16788/* end confdefs.h. */
16789
16790
16791 #include <sys/random.h>
16792
16793 int main() {
16794 char buffer[1];
16795 const size_t buflen = sizeof(buffer);
16796 const int flags = 0;
16797 /* ignore the result, Python checks for ENOSYS at runtime */
16798 (void)getrandom(buffer, buflen, flags);
16799 return 0;
16800 }
16801
16802
16803_ACEOF
16804if ac_fn_c_try_link "$LINENO"; then :
16805 have_getrandom=yes
16806else
16807 have_getrandom=no
16808fi
16809rm -f core conftest.err conftest.$ac_objext \
16810 conftest$ac_exeext conftest.$ac_ext
16811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16812$as_echo "$have_getrandom" >&6; }
16813
16814if test "$have_getrandom" = yes; then
16815
16816$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16817
16818fi
16819
Christian Heimesff5be6e2018-01-20 13:19:21 +010016820# Check for usable OpenSSL
16821
16822 found=false
16823
16824# Check whether --with-openssl was given.
16825if test "${with_openssl+set}" = set; then :
16826 withval=$with_openssl;
16827 case "$withval" in
16828 "" | y | ye | yes | n | no)
16829 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16830 ;;
16831 *) ssldirs="$withval"
16832 ;;
16833 esac
16834
16835else
16836
16837 # if pkg-config is installed and openssl has installed a .pc file,
16838 # then use that information and don't search ssldirs
16839 if test -n "$ac_tool_prefix"; then
16840 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16841set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16843$as_echo_n "checking for $ac_word... " >&6; }
16844if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16845 $as_echo_n "(cached) " >&6
16846else
16847 if test -n "$PKG_CONFIG"; then
16848 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16849else
16850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16851for as_dir in $PATH
16852do
16853 IFS=$as_save_IFS
16854 test -z "$as_dir" && as_dir=.
16855 for ac_exec_ext in '' $ac_executable_extensions; do
16856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16857 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16859 break 2
16860 fi
16861done
16862 done
16863IFS=$as_save_IFS
16864
16865fi
16866fi
16867PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16868if test -n "$PKG_CONFIG"; then
16869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16870$as_echo "$PKG_CONFIG" >&6; }
16871else
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16873$as_echo "no" >&6; }
16874fi
16875
16876
16877fi
16878if test -z "$ac_cv_prog_PKG_CONFIG"; then
16879 ac_ct_PKG_CONFIG=$PKG_CONFIG
16880 # Extract the first word of "pkg-config", so it can be a program name with args.
16881set dummy pkg-config; ac_word=$2
16882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16883$as_echo_n "checking for $ac_word... " >&6; }
16884if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16885 $as_echo_n "(cached) " >&6
16886else
16887 if test -n "$ac_ct_PKG_CONFIG"; then
16888 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16889else
16890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16891for as_dir in $PATH
16892do
16893 IFS=$as_save_IFS
16894 test -z "$as_dir" && as_dir=.
16895 for ac_exec_ext in '' $ac_executable_extensions; do
16896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16897 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16899 break 2
16900 fi
16901done
16902 done
16903IFS=$as_save_IFS
16904
16905fi
16906fi
16907ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16908if test -n "$ac_ct_PKG_CONFIG"; then
16909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16910$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16911else
16912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16913$as_echo "no" >&6; }
16914fi
16915
16916 if test "x$ac_ct_PKG_CONFIG" = x; then
16917 PKG_CONFIG=""
16918 else
16919 case $cross_compiling:$ac_tool_warned in
16920yes:)
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16922$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16923ac_tool_warned=yes ;;
16924esac
16925 PKG_CONFIG=$ac_ct_PKG_CONFIG
16926 fi
16927else
16928 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16929fi
16930
16931 if test x"$PKG_CONFIG" != x""; then
16932 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16933 if test $? = 0; then
16934 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16935 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16936 found=true
16937 fi
16938 fi
16939
16940 # no such luck; use some default ssldirs
16941 if ! $found; then
16942 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16943 fi
16944
16945
16946fi
16947
16948
16949
16950 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16951 # an 'openssl' subdirectory
16952
16953 if ! $found; then
16954 OPENSSL_INCLUDES=
16955 for ssldir in $ssldirs; do
16956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16957$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16958 if test -f "$ssldir/include/openssl/ssl.h"; then
16959 OPENSSL_INCLUDES="-I$ssldir/include"
16960 OPENSSL_LDFLAGS="-L$ssldir/lib"
16961 OPENSSL_LIBS="-lssl -lcrypto"
16962 found=true
16963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16964$as_echo "yes" >&6; }
16965 break
16966 else
16967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16968$as_echo "no" >&6; }
16969 fi
16970 done
16971
16972 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16973 # it will just work!
16974 fi
16975
16976 # try the preprocessor and linker with our new flags,
16977 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16978
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16980$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16981 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16982 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16983
16984 save_LIBS="$LIBS"
16985 save_LDFLAGS="$LDFLAGS"
16986 save_CPPFLAGS="$CPPFLAGS"
16987 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16988 LIBS="$OPENSSL_LIBS $LIBS"
16989 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16991/* end confdefs.h. */
16992#include <openssl/ssl.h>
16993int
16994main ()
16995{
16996SSL_new(NULL)
16997 ;
16998 return 0;
16999}
17000_ACEOF
17001if ac_fn_c_try_link "$LINENO"; then :
17002
17003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17004$as_echo "yes" >&6; }
17005 have_openssl=yes
17006
17007else
17008
17009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17010$as_echo "no" >&6; }
17011 have_openssl=no
17012
17013fi
17014rm -f core conftest.err conftest.$ac_objext \
17015 conftest$ac_exeext conftest.$ac_ext
17016 CPPFLAGS="$save_CPPFLAGS"
17017 LDFLAGS="$save_LDFLAGS"
17018 LIBS="$save_LIBS"
17019
17020
17021
17022
17023
17024
17025if test "$have_openssl" = yes; then
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17027$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17028
17029 save_LIBS="$LIBS"
17030 save_LDFLAGS="$LDFLAGS"
17031 save_CPPFLAGS="$CPPFLAGS"
17032 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17033 LIBS="$OPENSSL_LIBS $LIBS"
17034 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17035
17036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17037/* end confdefs.h. */
17038
17039 #include <openssl/x509_vfy.h>
17040
17041int
17042main ()
17043{
17044
17045 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17046 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17047 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17048 X509_VERIFY_PARAM_set_hostflags(p, 0);
17049
17050 ;
17051 return 0;
17052}
17053
17054_ACEOF
17055if ac_fn_c_try_link "$LINENO"; then :
17056
17057 ac_cv_has_x509_verify_param_set1_host=yes
17058
17059else
17060
17061 ac_cv_has_x509_verify_param_set1_host=no
17062
17063fi
17064rm -f core conftest.err conftest.$ac_objext \
17065 conftest$ac_exeext conftest.$ac_ext
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17067$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17068 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17069
17070$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17071
17072 fi
17073
17074 CPPFLAGS="$save_CPPFLAGS"
17075 LDFLAGS="$save_LDFLAGS"
17076 LIBS="$save_LIBS"
17077fi
17078
Christian Heimes892d66e2018-01-29 14:10:18 +010017079# ssl module default cipher suite string
17080
17081
17082
17083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17084$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17085
17086# Check whether --with-ssl-default-suites was given.
17087if test "${with_ssl_default_suites+set}" = set; then :
17088 withval=$with_ssl_default_suites;
17089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17090$as_echo "$withval" >&6; }
17091case "$withval" in
17092 python)
17093 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17094
17095 ;;
17096 openssl)
17097 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17098
17099 ;;
17100 *)
17101 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17102
17103 cat >>confdefs.h <<_ACEOF
17104#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17105_ACEOF
17106
17107 ;;
17108esac
17109
17110else
17111
17112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17113$as_echo "python" >&6; }
17114$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17115
17116
17117fi
17118
17119
17120
Guido van Rossum627b2d71993-12-24 10:39:16 +000017121# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017122ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017123
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017124ac_config_files="$ac_config_files Modules/ld_so_aix"
17125
Martin v. Löwis11437992002-04-12 09:54:03 +000017126cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017127# This file is a shell script that caches the results of configure
17128# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017129# scripts and configure runs, see configure's option --config-cache.
17130# It is not useful on other systems. If it contains results you don't
17131# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017132#
Martin v. Löwis11437992002-04-12 09:54:03 +000017133# config.status only pays attention to the cache file if you give it
17134# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017135#
Skip Montanaro6dead952003-09-25 14:50:04 +000017136# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017137# loading this file, other *unset* `ac_cv_foo' will be assigned the
17138# following values.
17139
17140_ACEOF
17141
Guido van Rossumf78abae1997-01-21 22:02:36 +000017142# The following way of writing the cache mishandles newlines in values,
17143# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017145# Ultrix sh set writes to stderr and can't be redirected directly,
17146# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147(
17148 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17149 eval ac_val=\$$ac_var
17150 case $ac_val in #(
17151 *${as_nl}*)
17152 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017153 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17154$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155 esac
17156 case $ac_var in #(
17157 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017158 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17159 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160 esac ;;
17161 esac
17162 done
17163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17166 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017167 # `set' does not quote correctly, so add quotes: double-quote
17168 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017170 "s/'/'\\\\''/g;
17171 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017172 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 *)
17174 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017176 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177 esac |
17178 sort
17179) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017180 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17185 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17187 :end' >>confcache
17188if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17189 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017190 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017191 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17192$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017193 if test ! -f "$cache_file" || test -h "$cache_file"; then
17194 cat confcache >"$cache_file"
17195 else
17196 case $cache_file in #(
17197 */* | ?:*)
17198 mv -f confcache "$cache_file"$$ &&
17199 mv -f "$cache_file"$$ "$cache_file" ;; #(
17200 *)
17201 mv -f confcache "$cache_file" ;;
17202 esac
17203 fi
17204 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017205 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17207$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017208 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017209fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017210rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017211
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017212test "x$prefix" = xNONE && prefix=$ac_default_prefix
17213# Let make expand exec_prefix.
17214test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017216DEFS=-DHAVE_CONFIG_H
17217
Skip Montanaro6dead952003-09-25 14:50:04 +000017218ac_libobjs=
17219ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017220U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017221for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17222 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017223 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017224 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17226 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017227 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17228 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017229done
17230LIBOBJS=$ac_libobjs
17231
17232LTLIBOBJS=$ac_ltlibobjs
17233
17234
Martin v. Löwis11437992002-04-12 09:54:03 +000017235
Matthias Kloseb9621712010-04-24 17:59:49 +000017236
Victor Stinnere0be4232011-10-25 13:06:09 +020017237: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017238ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017239ac_clean_files_save=$ac_clean_files
17240ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017241{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17242$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17243as_write_fail=0
17244cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017245#! $SHELL
17246# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017247# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017248# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017249# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017250
Martin v. Löwis11437992002-04-12 09:54:03 +000017251debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017252ac_cs_recheck=false
17253ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017254
Matthias Kloseb9621712010-04-24 17:59:49 +000017255SHELL=\${CONFIG_SHELL-$SHELL}
17256export SHELL
17257_ASEOF
17258cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17259## -------------------- ##
17260## M4sh Initialization. ##
17261## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263# Be more Bourne compatible
17264DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017265if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 emulate sh
17267 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017269 # is contrary to our usage. Disable this feature.
17270 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017271 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017272else
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 case `(set -o) 2>/dev/null` in #(
17274 *posix*) :
17275 set -o posix ;; #(
17276 *) :
17277 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017279fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017280
17281
Matthias Kloseb9621712010-04-24 17:59:49 +000017282as_nl='
17283'
17284export as_nl
17285# Printing a long string crashes Solaris 7 /usr/bin/printf.
17286as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17287as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17288as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17289# Prefer a ksh shell builtin over an external printf program on Solaris,
17290# but without wasting forks for bash or zsh.
17291if test -z "$BASH_VERSION$ZSH_VERSION" \
17292 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17293 as_echo='print -r --'
17294 as_echo_n='print -rn --'
17295elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17296 as_echo='printf %s\n'
17297 as_echo_n='printf %s'
17298else
17299 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17300 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17301 as_echo_n='/usr/ucb/echo -n'
17302 else
17303 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17304 as_echo_n_body='eval
17305 arg=$1;
17306 case $arg in #(
17307 *"$as_nl"*)
17308 expr "X$arg" : "X\\(.*\\)$as_nl";
17309 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17310 esac;
17311 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17312 '
17313 export as_echo_n_body
17314 as_echo_n='sh -c $as_echo_n_body as_echo'
17315 fi
17316 export as_echo_body
17317 as_echo='sh -c $as_echo_body as_echo'
17318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017319
17320# The user is always right.
17321if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 PATH_SEPARATOR=:
17323 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17324 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17325 PATH_SEPARATOR=';'
17326 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329
17330# IFS
17331# We need space, tab and new line, in precisely that order. Quoting is
17332# there to prevent editors from complaining about space-tab.
17333# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17334# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335IFS=" "" $as_nl"
17336
17337# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017338as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017339case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340 *[\\/]* ) as_myself=$0 ;;
17341 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017342for as_dir in $PATH
17343do
17344 IFS=$as_save_IFS
17345 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017346 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17347 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 ;;
17351esac
17352# We did not find ourselves, most probably we were run as `sh COMMAND'
17353# in which case we are not to be found in the path.
17354if test "x$as_myself" = x; then
17355 as_myself=$0
17356fi
17357if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17359 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360fi
17361
Matthias Kloseb9621712010-04-24 17:59:49 +000017362# Unset variables that we do not need and which cause bugs (e.g. in
17363# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17364# suppresses any "Segmentation fault" message there. '((' could
17365# trigger a bug in pdksh 5.2.14.
17366for as_var in BASH_ENV ENV MAIL MAILPATH
17367do eval test x\${$as_var+set} = xset \
17368 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369done
17370PS1='$ '
17371PS2='> '
17372PS4='+ '
17373
17374# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017375LC_ALL=C
17376export LC_ALL
17377LANGUAGE=C
17378export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379
Matthias Kloseb9621712010-04-24 17:59:49 +000017380# CDPATH.
17381(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17382
17383
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017384# as_fn_error STATUS ERROR [LINENO LOG_FD]
17385# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017386# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17387# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017388# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017389as_fn_error ()
17390{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017391 as_status=$1; test $as_status -eq 0 && as_status=1
17392 if test "$4"; then
17393 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17394 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017395 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017396 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017397 as_fn_exit $as_status
17398} # as_fn_error
17399
17400
17401# as_fn_set_status STATUS
17402# -----------------------
17403# Set $? to STATUS, without forking.
17404as_fn_set_status ()
17405{
17406 return $1
17407} # as_fn_set_status
17408
17409# as_fn_exit STATUS
17410# -----------------
17411# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17412as_fn_exit ()
17413{
17414 set +e
17415 as_fn_set_status $1
17416 exit $1
17417} # as_fn_exit
17418
17419# as_fn_unset VAR
17420# ---------------
17421# Portably unset VAR.
17422as_fn_unset ()
17423{
17424 { eval $1=; unset $1;}
17425}
17426as_unset=as_fn_unset
17427# as_fn_append VAR VALUE
17428# ----------------------
17429# Append the text in VALUE to the end of the definition contained in VAR. Take
17430# advantage of any shell optimizations that allow amortized linear growth over
17431# repeated appends, instead of the typical quadratic growth present in naive
17432# implementations.
17433if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17434 eval 'as_fn_append ()
17435 {
17436 eval $1+=\$2
17437 }'
17438else
17439 as_fn_append ()
17440 {
17441 eval $1=\$$1\$2
17442 }
17443fi # as_fn_append
17444
17445# as_fn_arith ARG...
17446# ------------------
17447# Perform arithmetic evaluation on the ARGs, and store the result in the
17448# global $as_val. Take advantage of shells that can avoid forks. The arguments
17449# must be portable across $(()) and expr.
17450if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17451 eval 'as_fn_arith ()
17452 {
17453 as_val=$(( $* ))
17454 }'
17455else
17456 as_fn_arith ()
17457 {
17458 as_val=`expr "$@" || test $? -eq 1`
17459 }
17460fi # as_fn_arith
17461
17462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463if expr a : '\(a\)' >/dev/null 2>&1 &&
17464 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17465 as_expr=expr
17466else
17467 as_expr=false
17468fi
17469
17470if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17471 as_basename=basename
17472else
17473 as_basename=false
17474fi
17475
Matthias Kloseb9621712010-04-24 17:59:49 +000017476if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17477 as_dirname=dirname
17478else
17479 as_dirname=false
17480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482as_me=`$as_basename -- "$0" ||
17483$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17484 X"$0" : 'X\(//\)$' \| \
17485 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017486$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487 sed '/^.*\/\([^/][^/]*\)\/*$/{
17488 s//\1/
17489 q
17490 }
17491 /^X\/\(\/\/\)$/{
17492 s//\1/
17493 q
17494 }
17495 /^X\/\(\/\).*/{
17496 s//\1/
17497 q
17498 }
17499 s/.*/./; q'`
17500
Matthias Kloseb9621712010-04-24 17:59:49 +000017501# Avoid depending upon Character Ranges.
17502as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17503as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17504as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17505as_cr_digits='0123456789'
17506as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507
17508ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017509case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017513 xy) ECHO_C='\c';;
17514 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17515 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516 esac;;
17517*)
17518 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017520
Martin v. Löwis11437992002-04-12 09:54:03 +000017521rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522if test -d conf$$.dir; then
17523 rm -f conf$$.dir/conf$$.file
17524else
17525 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017526 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017528if (echo >conf$$.file) 2>/dev/null; then
17529 if ln -s conf$$.file conf$$ 2>/dev/null; then
17530 as_ln_s='ln -s'
17531 # ... but there are two gotchas:
17532 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17533 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017534 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017535 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017536 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017537 elif ln conf$$.file conf$$ 2>/dev/null; then
17538 as_ln_s=ln
17539 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017540 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017542else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017543 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17546rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017547
Matthias Kloseb9621712010-04-24 17:59:49 +000017548
17549# as_fn_mkdir_p
17550# -------------
17551# Create "$as_dir" as a directory, including parents if necessary.
17552as_fn_mkdir_p ()
17553{
17554
17555 case $as_dir in #(
17556 -*) as_dir=./$as_dir;;
17557 esac
17558 test -d "$as_dir" || eval $as_mkdir_p || {
17559 as_dirs=
17560 while :; do
17561 case $as_dir in #(
17562 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17563 *) as_qdir=$as_dir;;
17564 esac
17565 as_dirs="'$as_qdir' $as_dirs"
17566 as_dir=`$as_dirname -- "$as_dir" ||
17567$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17568 X"$as_dir" : 'X\(//\)[^/]' \| \
17569 X"$as_dir" : 'X\(//\)$' \| \
17570 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17571$as_echo X"$as_dir" |
17572 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17573 s//\1/
17574 q
17575 }
17576 /^X\(\/\/\)[^/].*/{
17577 s//\1/
17578 q
17579 }
17580 /^X\(\/\/\)$/{
17581 s//\1/
17582 q
17583 }
17584 /^X\(\/\).*/{
17585 s//\1/
17586 q
17587 }
17588 s/.*/./; q'`
17589 test -d "$as_dir" && break
17590 done
17591 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017592 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017593
17594
17595} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017596if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017597 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017598else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017599 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017600 as_mkdir_p=false
17601fi
17602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017603
17604# as_fn_executable_p FILE
17605# -----------------------
17606# Test if FILE is an executable regular file.
17607as_fn_executable_p ()
17608{
17609 test -f "$1" && test -x "$1"
17610} # as_fn_executable_p
17611as_test_x='test -x'
17612as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017613
17614# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017615as_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 +000017616
17617# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017618as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017619
17620
Martin v. Löwis11437992002-04-12 09:54:03 +000017621exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017622## ----------------------------------- ##
17623## Main body of $CONFIG_STATUS script. ##
17624## ----------------------------------- ##
17625_ASEOF
17626test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
Matthias Kloseb9621712010-04-24 17:59:49 +000017628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17629# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017630# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631# values after options handling.
17632ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017633This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017634generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017635
17636 CONFIG_FILES = $CONFIG_FILES
17637 CONFIG_HEADERS = $CONFIG_HEADERS
17638 CONFIG_LINKS = $CONFIG_LINKS
17639 CONFIG_COMMANDS = $CONFIG_COMMANDS
17640 $ $0 $@
17641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642on `(hostname || uname -n) 2>/dev/null | sed 1q`
17643"
17644
Martin v. Löwis11437992002-04-12 09:54:03 +000017645_ACEOF
17646
Matthias Kloseb9621712010-04-24 17:59:49 +000017647case $ac_config_files in *"
17648"*) set x $ac_config_files; shift; ac_config_files=$*;;
17649esac
17650
17651case $ac_config_headers in *"
17652"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17653esac
17654
17655
17656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017657# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017658config_files="$ac_config_files"
17659config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017662
Matthias Kloseb9621712010-04-24 17:59:49 +000017663cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017664ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017665\`$as_me' instantiates files and other configuration actions
17666from templates according to the current configuration. Unless the files
17667and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017668
Matthias Kloseb9621712010-04-24 17:59:49 +000017669Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017670
17671 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017673 --config print configuration, then exit
17674 -q, --quiet, --silent
17675 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 -d, --debug don't remove temporary files
17677 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017678 --file=FILE[:TEMPLATE]
17679 instantiate the configuration file FILE
17680 --header=FILE[:TEMPLATE]
17681 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017682
17683Configuration files:
17684$config_files
17685
17686Configuration headers:
17687$config_headers
17688
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017689Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017692cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17693ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017694ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017695python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017696configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017697 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017698
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017699Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017700This config.status script is free software; the Free Software Foundation
17701gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702
17703ac_pwd='$ac_pwd'
17704srcdir='$srcdir'
17705INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017706MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017707test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017708_ACEOF
17709
Matthias Kloseb9621712010-04-24 17:59:49 +000017710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17711# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017712ac_need_defaults=:
17713while test $# != 0
17714do
17715 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017716 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17718 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017719 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017721 --*=)
17722 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17723 ac_optarg=
17724 ac_shift=:
17725 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017727 ac_option=$1
17728 ac_optarg=$2
17729 ac_shift=shift
17730 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 esac
17732
Skip Montanaro6dead952003-09-25 14:50:04 +000017733 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017734 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017735 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17736 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 $as_echo "$ac_cs_version"; exit ;;
17739 --config | --confi | --conf | --con | --co | --c )
17740 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 debug=: ;;
17743 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017744 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017745 case $ac_optarg in
17746 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017747 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017748 esac
17749 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 ac_need_defaults=false;;
17751 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017752 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 case $ac_optarg in
17754 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17755 esac
17756 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 --he | --h)
17759 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017760 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017761Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017764 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17765 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17766 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017767
17768 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017769 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017770Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017771
Matthias Kloseb9621712010-04-24 17:59:49 +000017772 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017774
17775 esac
17776 shift
17777done
17778
Skip Montanaro6dead952003-09-25 14:50:04 +000017779ac_configure_extra_args=
17780
17781if $ac_cs_silent; then
17782 exec 6>/dev/null
17783 ac_configure_extra_args="$ac_configure_extra_args --silent"
17784fi
17785
17786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017787cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017788if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017789 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017790 shift
17791 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17792 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017794 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017795fi
17796
Martin v. Löwis11437992002-04-12 09:54:03 +000017797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017798cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799exec 5>>config.log
17800{
17801 echo
17802 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17803## Running $as_me. ##
17804_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017805 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017809cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017811
Matthias Kloseb9621712010-04-24 17:59:49 +000017812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813
17814# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017815for ac_config_target in $ac_config_targets
17816do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017817 case $ac_config_target in
17818 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17819 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17820 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017821 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17822 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017824 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017825 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017826 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827
Victor Stinnere0be4232011-10-25 13:06:09 +020017828 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 esac
17830done
17831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832
Martin v. Löwis11437992002-04-12 09:54:03 +000017833# If the user did not use the arguments to specify the items to instantiate,
17834# then the envvar interface is used. Set only those that are not.
17835# We use the long form for the default assignment because of an extremely
17836# bizarre bug on SunOS 4.1.3.
17837if $ac_need_defaults; then
17838 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17839 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17840fi
17841
Skip Montanaro6dead952003-09-25 14:50:04 +000017842# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017844# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017845# Hook for its removal unless debugging.
17846# Note that there is a small window in which the directory will not be cleaned:
17847# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017848$debug ||
17849{
Victor Stinnere0be4232011-10-25 13:06:09 +020017850 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017852 : "${ac_tmp:=$tmp}"
17853 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017855 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017856}
Martin v. Löwis11437992002-04-12 09:54:03 +000017857# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017858
Martin v. Löwis11437992002-04-12 09:54:03 +000017859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017861 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017862} ||
17863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864 tmp=./conf$$-$RANDOM
17865 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017866} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017867ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
Matthias Kloseb9621712010-04-24 17:59:49 +000017869# Set up the scripts for CONFIG_FILES section.
17870# No need to generate them if there are no CONFIG_FILES.
17871# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017873
Matthias Kloseb9621712010-04-24 17:59:49 +000017874
17875ac_cr=`echo X | tr X '\015'`
17876# On cygwin, bash can eat \r inside `` if the user requested igncr.
17877# But we know of no other shell where ac_cr would be empty at this
17878# point, so we can use a bashism as a fallback.
17879if test "x$ac_cr" = x; then
17880 eval ac_cr=\$\'\\r\'
17881fi
17882ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17883if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017884 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017885else
17886 ac_cs_awk_cr=$ac_cr
17887fi
17888
Victor Stinnere0be4232011-10-25 13:06:09 +020017889echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017890_ACEOF
17891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017892
Matthias Kloseb9621712010-04-24 17:59:49 +000017893{
17894 echo "cat >conf$$subs.awk <<_ACEOF" &&
17895 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17896 echo "_ACEOF"
17897} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017898 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17899ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017900ac_delim='%!_!# '
17901for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017902 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017903 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17906 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907 break
17908 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017909 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 else
17911 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913done
Matthias Kloseb9621712010-04-24 17:59:49 +000017914rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915
Matthias Kloseb9621712010-04-24 17:59:49 +000017916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017917cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017919sed -n '
17920h
17921s/^/S["/; s/!.*/"]=/
17922p
17923g
17924s/^[^!]*!//
17925:repl
17926t repl
17927s/'"$ac_delim"'$//
17928t delim
17929:nl
17930h
17931s/\(.\{148\}\)..*/\1/
17932t more1
17933s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17934p
17935n
17936b repl
17937:more1
17938s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17939p
17940g
17941s/.\{148\}//
17942t nl
17943:delim
17944h
17945s/\(.\{148\}\)..*/\1/
17946t more2
17947s/["\\]/\\&/g; s/^/"/; s/$/"/
17948p
17949b
17950:more2
17951s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17952p
17953g
17954s/.\{148\}//
17955t delim
17956' <conf$$subs.awk | sed '
17957/^[^""]/{
17958 N
17959 s/\n//
17960}
17961' >>$CONFIG_STATUS || ac_write_fail=1
17962rm -f conf$$subs.awk
17963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17964_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017965cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017966 for (key in S) S_is_set[key] = 1
17967 FS = ""
17968
17969}
17970{
17971 line = $ 0
17972 nfields = split(line, field, "@")
17973 substed = 0
17974 len = length(field[1])
17975 for (i = 2; i < nfields; i++) {
17976 key = field[i]
17977 keylen = length(key)
17978 if (S_is_set[key]) {
17979 value = S[key]
17980 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17981 len += length(value) + length(field[++i])
17982 substed = 1
17983 } else
17984 len += 1 + keylen
17985 }
17986
17987 print line
17988}
17989
17990_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17993if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17994 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17995else
17996 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017997fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017998 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017999_ACEOF
18000
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018001# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18002# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003# trailing colons and then remove the whole line if VPATH becomes empty
18004# (actually we leave an empty line to preserve line numbers).
18005if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018006 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18007h
18008s///
18009s/^/:/
18010s/[ ]*$/:/
18011s/:\$(srcdir):/:/g
18012s/:\${srcdir}:/:/g
18013s/:@srcdir@:/:/g
18014s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018016x
18017s/\(=[ ]*\).*/\1/
18018G
18019s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020s/^[^=]*=[ ]*$//
18021}'
18022fi
18023
Matthias Kloseb9621712010-04-24 17:59:49 +000018024cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018025fi # test -n "$CONFIG_FILES"
18026
Matthias Kloseb9621712010-04-24 17:59:49 +000018027# Set up the scripts for CONFIG_HEADERS section.
18028# No need to generate them if there are no CONFIG_HEADERS.
18029# This happens for instance with `./config.status Makefile'.
18030if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018031cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018032BEGIN {
18033_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034
Matthias Kloseb9621712010-04-24 17:59:49 +000018035# Transform confdefs.h into an awk script `defines.awk', embedded as
18036# here-document in config.status, that substitutes the proper values into
18037# config.h.in to produce config.h.
18038
18039# Create a delimiter string that does not exist in confdefs.h, to ease
18040# handling of long lines.
18041ac_delim='%!_!# '
18042for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018043 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18044 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018045 break
18046 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018047 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018048 else
18049 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18050 fi
18051done
18052
18053# For the awk script, D is an array of macro values keyed by name,
18054# likewise P contains macro parameters if any. Preserve backslash
18055# newline sequences.
18056
18057ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18058sed -n '
18059s/.\{148\}/&'"$ac_delim"'/g
18060t rset
18061:rset
18062s/^[ ]*#[ ]*define[ ][ ]*/ /
18063t def
18064d
18065:def
18066s/\\$//
18067t bsnl
18068s/["\\]/\\&/g
18069s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18070D["\1"]=" \3"/p
18071s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18072d
18073:bsnl
18074s/["\\]/\\&/g
18075s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18076D["\1"]=" \3\\\\\\n"\\/p
18077t cont
18078s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18079t cont
18080d
18081:cont
18082n
18083s/.\{148\}/&'"$ac_delim"'/g
18084t clear
18085:clear
18086s/\\$//
18087t bsnlc
18088s/["\\]/\\&/g; s/^/"/; s/$/"/p
18089d
18090:bsnlc
18091s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18092b cont
18093' <confdefs.h | sed '
18094s/'"$ac_delim"'/"\\\
18095"/g' >>$CONFIG_STATUS || ac_write_fail=1
18096
18097cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18098 for (key in D) D_is_set[key] = 1
18099 FS = ""
18100}
18101/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18102 line = \$ 0
18103 split(line, arg, " ")
18104 if (arg[1] == "#") {
18105 defundef = arg[2]
18106 mac1 = arg[3]
18107 } else {
18108 defundef = substr(arg[1], 2)
18109 mac1 = arg[2]
18110 }
18111 split(mac1, mac2, "(") #)
18112 macro = mac2[1]
18113 prefix = substr(line, 1, index(line, defundef) - 1)
18114 if (D_is_set[macro]) {
18115 # Preserve the white space surrounding the "#".
18116 print prefix "define", macro P[macro] D[macro]
18117 next
18118 } else {
18119 # Replace #undef with comments. This is necessary, for example,
18120 # in the case of _POSIX_SOURCE, which is predefined and required
18121 # on some systems where configure will not decide to define it.
18122 if (defundef == "undef") {
18123 print "/*", prefix defundef, macro, "*/"
18124 next
18125 }
18126 }
18127}
18128{ print }
18129_ACAWK
18130_ACEOF
18131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018132 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018133fi # test -n "$CONFIG_HEADERS"
18134
18135
18136eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18137shift
18138for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139do
18140 case $ac_tag in
18141 :[FHLC]) ac_mode=$ac_tag; continue;;
18142 esac
18143 case $ac_mode$ac_tag in
18144 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018145 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146 :[FH]-) ac_tag=-:-;;
18147 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18148 esac
18149 ac_save_IFS=$IFS
18150 IFS=:
18151 set x $ac_tag
18152 IFS=$ac_save_IFS
18153 shift
18154 ac_file=$1
18155 shift
18156
18157 case $ac_mode in
18158 :L) ac_source=$1;;
18159 :[FH])
18160 ac_file_inputs=
18161 for ac_f
18162 do
18163 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018164 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165 *) # Look for the file first in the build tree, then in the source tree
18166 # (if the path is not absolute). The absolute path cannot be DOS-style,
18167 # because $ac_f cannot contain `:'.
18168 test -f "$ac_f" ||
18169 case $ac_f in
18170 [\\/$]*) false;;
18171 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18172 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018173 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018175 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18176 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018177 done
18178
18179 # Let's still pretend it is `configure' which instantiates (i.e., don't
18180 # use $as_me), people would be surprised to read:
18181 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018182 configure_input='Generated from '`
18183 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18184 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185 if test x"$ac_file" != x-; then
18186 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018187 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18188$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 # Neutralize special characters interpreted by sed in replacement strings.
18191 case $configure_input in #(
18192 *\&* | *\|* | *\\* )
18193 ac_sed_conf_input=`$as_echo "$configure_input" |
18194 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18195 *) ac_sed_conf_input=$configure_input;;
18196 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018197
18198 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018199 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18200 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201 esac
18202 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018203 esac
18204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018206$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018207 X"$ac_file" : 'X\(//\)[^/]' \| \
18208 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018209 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018210$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018211 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18212 s//\1/
18213 q
18214 }
18215 /^X\(\/\/\)[^/].*/{
18216 s//\1/
18217 q
18218 }
18219 /^X\(\/\/\)$/{
18220 s//\1/
18221 q
18222 }
18223 /^X\(\/\).*/{
18224 s//\1/
18225 q
18226 }
18227 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018228 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 ac_builddir=.
18230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231case "$ac_dir" in
18232.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18233*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018234 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018235 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018236 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237 case $ac_top_builddir_sub in
18238 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18239 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18240 esac ;;
18241esac
18242ac_abs_top_builddir=$ac_pwd
18243ac_abs_builddir=$ac_pwd$ac_dir_suffix
18244# for backward compatibility:
18245ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018246
18247case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250 ac_top_srcdir=$ac_top_builddir_sub
18251 ac_abs_top_srcdir=$ac_pwd ;;
18252 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018254 ac_top_srcdir=$srcdir
18255 ac_abs_top_srcdir=$srcdir ;;
18256 *) # Relative name.
18257 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18258 ac_top_srcdir=$ac_top_build_prefix$srcdir
18259 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018260esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018262
Martin v. Löwis11437992002-04-12 09:54:03 +000018263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018264 case $ac_mode in
18265 :F)
18266 #
18267 # CONFIG_FILE
18268 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018269
18270 case $INSTALL in
18271 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018272 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018274 ac_MKDIR_P=$MKDIR_P
18275 case $MKDIR_P in
18276 [\\/$]* | ?:[\\/]* ) ;;
18277 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18278 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018279_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280
Matthias Kloseb9621712010-04-24 17:59:49 +000018281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018282# If the template does not know about datarootdir, expand it.
18283# FIXME: This hack should be removed a few years after 2.60.
18284ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018285ac_sed_dataroot='
18286/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287 p
18288 q
18289}
18290/@datadir@/p
18291/@docdir@/p
18292/@infodir@/p
18293/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018294/@mandir@/p'
18295case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296*datarootdir*) ac_datarootdir_seen=yes;;
18297*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18299$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018301cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018302 ac_datarootdir_hack='
18303 s&@datadir@&$datadir&g
18304 s&@docdir@&$docdir&g
18305 s&@infodir@&$infodir&g
18306 s&@localedir@&$localedir&g
18307 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018308 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309esac
18310_ACEOF
18311
18312# Neutralize VPATH when `$srcdir' = `.'.
18313# Shell code in configure.ac might set extrasub.
18314# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018315cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18316ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018317$extrasub
18318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018319cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018320:t
18321/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018322s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018323s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018324s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325s&@srcdir@&$ac_srcdir&;t t
18326s&@abs_srcdir@&$ac_abs_srcdir&;t t
18327s&@top_srcdir@&$ac_top_srcdir&;t t
18328s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18329s&@builddir@&$ac_builddir&;t t
18330s&@abs_builddir@&$ac_abs_builddir&;t t
18331s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18332s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018333s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018334$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018335"
Victor Stinnere0be4232011-10-25 13:06:09 +020018336eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18337 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018340 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18341 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18342 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018344which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018345$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018346which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018347
Victor Stinnere0be4232011-10-25 13:06:09 +020018348 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018349 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018350 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18351 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018352 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018353 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354 ;;
18355 :H)
18356 #
18357 # CONFIG_HEADER
18358 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018360 {
18361 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018362 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18363 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018364 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018365 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018366 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18367$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018369 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018370 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018371 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018372 fi
18373 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018374 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018375 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018376 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018377 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380
18381 esac
18382
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018383
18384 case $ac_file$ac_mode in
18385 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18386
18387 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018388done # for ac_tag
18389
Guido van Rossum627b2d71993-12-24 10:39:16 +000018390
Matthias Kloseb9621712010-04-24 17:59:49 +000018391as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018392_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018393ac_clean_files=$ac_clean_files_save
18394
Matthias Kloseb9621712010-04-24 17:59:49 +000018395test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018396 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018397
Martin v. Löwis11437992002-04-12 09:54:03 +000018398
18399# configure is writing to config.log, and then calls config.status.
18400# config.status does its own redirection, appending to config.log.
18401# Unfortunately, on DOS this fails, as config.log is still kept open
18402# by configure, so config.status won't be able to write to it; its
18403# output is simply discarded. So we exec the FD to /dev/null,
18404# effectively closing config.log, so it can be properly (re)opened and
18405# appended to by config.status. When coming back to configure, we
18406# need to make the FD available again.
18407if test "$no_create" != yes; then
18408 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018409 ac_config_status_args=
18410 test "$silent" = yes &&
18411 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018413 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018414 exec 5>>config.log
18415 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18416 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018417 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018418fi
18419if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18421$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018422fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018423
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018424
Christian Heimes75ed8902013-11-20 01:11:18 +010018425echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018426if test ! -f Modules/Setup
18427then
18428 cp $srcdir/Modules/Setup.dist Modules/Setup
18429fi
18430
Christian Heimes75ed8902013-11-20 01:11:18 +010018431echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018432if test ! -f Modules/Setup.local
18433then
18434 echo "# Edit this file for local setup changes" >Modules/Setup.local
18435fi
18436
Christian Heimes75ed8902013-11-20 01:11:18 +010018437echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018438$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018439 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018440 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018441mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018442
18443if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18444 echo "" >&6
18445 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018446 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 +000018447 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018448 echo "" >&6
18449 echo "" >&6
18450fi
18451